Update Doom Emacs config

main
earnest ma 2022-06-12 14:13:22 -04:00
parent 72b40fb072
commit f00866bc3f
Signed by: earnest ma
GPG Key ID: A343F43342EB6E2A
9 changed files with 37 additions and 109 deletions

View File

@ -1,20 +0,0 @@
;;; ../../.dotfiles/doom/.config/doom/+elfeed.el -*- lexical-binding: t; -*-
;;; Thanks https://github.com/alrayyes/dotfiles/blob/master/emacs/.config/doom/config.org#elfeed
(use-package! elfeed
:defer t
:config
(setq elfeed-use-curl t)
(elfeed-set-timeout 36000)
(setq elfeed-protocol-ttrss-maxsize 200) ; bigger than 200 is invalid
(elfeed-protocol-enable)
(setq elfeed-feeds (list
(list "ttrss+https://earne@rss.tildeverse.org"
:password (shell-command-to-string "echo -n `pash show rss`"))))
(add-hook! 'elfeed-search-mode-hook 'elfeed-update))
(use-package! elfeed-goodies
:after elfeed
:config
(elfeed-goodies/setup))

View File

@ -1,9 +1,8 @@
;;; ../../.dotfiles/doom/.config/doom/+projects.el -*- lexical-binding: t; -*- ;;; $DOOMDIR/+projects.el -*- lexical-binding: t; -*-
;;; Project management
(defvar project-locations '(("~/ghq/" . 3) (defvar project-locations '(("~/ghq/" . 3)
("~/.dotfiles" . 0) ("~/.dotfiles" . 0)
("~/ansible" . 0)) ("~/configs" . 0))
"Where all my projects are located. "Where all my projects are located.
Most of them are managed using `ghq' in ~/ghq/, however there are also some Most of them are managed using `ghq' in ~/ghq/, however there are also some

View File

@ -1,42 +1,17 @@
;;; ../../.dotfiles/doom/.config/doom/+ui.el -*- lexical-binding: t; -*- ;;; $DOOMDIR/+ui.el -*- lexical-binding: t; -*-
;;; UI Adjustments
;; Font!
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-unicode-font' -- for unicode glyphs
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
(setq doom-font (font-spec :family "Jetbrains Mono" :size 13)) (setq doom-font (font-spec :family "Jetbrains Mono" :size 13))
;; Theme
(setq doom-theme 'doom-gruvbox) (setq doom-theme 'doom-gruvbox)
;; Display
(setq display-line-numbers-type 'relative)
(menu-bar-mode +1) ; add back menu bar (menu-bar-mode +1) ; add back menu bar
(setq display-line-numbers-type 'relative) ; line numbers
;; slightly nicer default buffer names ;; slightly nicer default buffer names
(setq doom-fallback-buffer-name "► Doom" (setq doom-fallback-buffer-name "► Doom"
+doom-dashboard-name "► Doom") +doom-dashboard-name "► Doom")
;; Frames and windows
;; Move to split window
(setq evil-vsplit-window-right t
evil-split-window-below t)
;; Modeline
(setq display-time-day-and-date t)
(display-time-mode +1) ; show the time
;; show battery level (when on a laptop)
;; (unless (string-match-p "^Power N/A" (battery))
;; (display-battery-mode 1))
;; From Tecosaur's config: hide encoding when it's what's expected ;; From Tecosaur's config: hide encoding when it's what's expected
(defun doom-modeline-conditional-buffer-encoding () (defun doom-modeline-conditional-buffer-encoding ()
"We expect the encoding to be LF UTF-8, so only show the modeline when this is not the case" "We expect the encoding to be LF UTF-8, so only show the modeline when this is not the case"
@ -45,5 +20,4 @@
'(coding-category-undecided coding-category-utf-8)) '(coding-category-undecided coding-category-utf-8))
(not (memq (coding-system-eol-type buffer-file-coding-system) '(1 2)))) (not (memq (coding-system-eol-type buffer-file-coding-system) '(1 2))))
t))) t)))
(add-hook 'after-change-major-mode-hook #'doom-modeline-conditional-buffer-encoding) (add-hook 'after-change-major-mode-hook #'doom-modeline-conditional-buffer-encoding)

View File

@ -4,12 +4,37 @@
;; sync' after modifying this file! ;; sync' after modifying this file!
(setq user-full-name "earnest ma" (setq user-full-name "earnest ma"
user-mail-address "me@earne.link" user-mail-address "me@earne.link")
org-directory "~/org/")
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
(load! ".local" doom-private-dir t) (load! ".local" doom-private-dir t)
(load! "+ui") (load! "+ui") ; theme, font, and appearance tweaks
(load! "+projects") ; project-related
(load! "+smudge") ; spotify
;; Defaults
(setq-default delete-by-moving-to-trash t)
(setq undo-limit 80000000 ; 80Mb
evil-want-fine-undo t ; more history when in insert mode
evil-split-window-below t ; switch to window after creation
evil-vsplit-window-right t
truncate-string-ellipsis "" ; Unicode ellispis are nicer than "...", and also save /precious/ space
password-cache-expiry nil ; don't expire
)
(global-subword-mode 1) ; Iterate through CamelCase words
(setq which-key-idle-delay 0.25)
(setq company-idle-delay 0.1)
;; speed-type
(use-package! speed-type)
;; Whenever you reconfigure a package, make sure to wrap your config in an ;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g. ;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
@ -42,25 +67,3 @@
;; ;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented. ;; they are implemented.
;; Defaults
(setq-default delete-by-moving-to-trash t)
(setq undo-limit 80000000 ; 80Mb
evil-want-fine-undo t ; more history when in insert mode
truncate-string-ellipsis "" ; Unicode ellispis are nicer than "...", and also save /precious/ space
password-cache-expiry nil ; don't expire
)
(global-subword-mode 1) ; Iterate through CamelCase words
(setq which-key-idle-delay 0.25)
(setq company-idle-delay 0.1)
;; speed-type
(use-package! speed-type)
;; load
(load! "+projects")
(load! "+smudge")
(load! "+elfeed")

View File

@ -15,6 +15,7 @@
;; directory (for easy access to its source code). ;; directory (for easy access to its source code).
(doom! :input (doom! :input
bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese ;;chinese
;;japanese ;;japanese
;;layout ; auie,ctsrnm is the superior home row ;;layout ; auie,ctsrnm is the superior home row
@ -134,6 +135,7 @@
;;fstar ; (dependent) types and (monadic) effects and Z3 ;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for ;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect ;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazier than I am ;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python ;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on ;;idris ; a language you can depend on
@ -154,7 +156,7 @@
;;php ; perl's insecure younger brother ;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more ;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional ;;purescript ; javascript, but functional
(python +poetry +lsp) ; beautiful is better than ugly (python +lsp +poetry) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever ;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs ;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6 ;;raku ; the artist formerly known as perl6
@ -186,9 +188,6 @@
;;(rss +org) ; emacs as an RSS reader ;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought ;;twitter ; twitter client https://twitter.com/vnought
:personal
music
:config :config
;;literate ;;literate
(default +bindings +smartparens)) (default +bindings +smartparens))

View File

@ -1,15 +0,0 @@
;;; personal/music/config.el -*- lexical-binding: t; -*-
(use-package! playerctl
:when (executable-find "playerctl")
:config
;; keybindings
;; k prefix looks like it isn't defined, so let's borrow it for now
(map! :n "SPC k SPC" #'playerctl-play-pause-song
:n "SPC k s" #'playerctl-stop-song
:n "SPC k S" #'playerctl-status
:n "SPC k m" #'playerctl-metadata ; currently broken
:n "SPC k n" #'playerctl-next-song
:n "SPC k N" #'playerctl-seek-forward
:n "SPC k p" #'playerctl-previous-song
:n "SPC k P" #'playerctl-seek-backward))

View File

@ -1,4 +0,0 @@
;;; personal/music/doctor.el -*- lexical-binding: t; -*-
(unless (executable-find "playerctl")
(warn! "Couldn't find playerctl executable"))

View File

@ -1,4 +0,0 @@
;; -*- no-byte-compile: t; -*-
;;; personal/music/packages.el
(package! playerctl :pin "4c3a6132616fd28f902590bf6e63332e6055492b")

View File

@ -48,11 +48,7 @@
;(unpin! pinned-package another-pinned-package) ;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t) ;(unpin! t)
(package! speed-type :pin "5ef695f7159aa1f20c7c9e55f0c39bcdacce8d21")
(package! ghq :pin "582bd6daa505d04c7cc06d6c82ed8aee0624bfbe") (package! ghq :pin "582bd6daa505d04c7cc06d6c82ed8aee0624bfbe")
(package! smudge :pin "9e3488f485b7d7f3c97ebaad34ed552bb0cc228a") (package! smudge :pin "9e3488f485b7d7f3c97ebaad34ed552bb0cc228a")
(package! speed-type :pin "5ef695f7159aa1f20c7c9e55f0c39bcdacce8d21")
(package! elfeed :pin "162d7d545ed41c27967d108c04aa31f5a61c8e16")
(package! elfeed-protocol :pin "d2e22f5506bc75dbf4ca42ac87257fd1b259dd66")
(package! elfeed-goodies :pin "6711de66c22360f80fcfd9730293e5f3d419f787")