From f00866bc3fcc618d4f1aaf4812c70b94bd15f78f Mon Sep 17 00:00:00 2001 From: earnest ma Date: Sun, 12 Jun 2022 14:13:22 -0400 Subject: [PATCH] Update Doom Emacs config --- doom/.config/doom/+elfeed.el | 20 ------- doom/.config/doom/+projects.el | 5 +- doom/.config/doom/+ui.el | 32 ++--------- doom/.config/doom/config.el | 53 ++++++++++--------- doom/.config/doom/init.el | 7 ++- .../doom/modules/personal/music/config.el | 15 ------ .../doom/modules/personal/music/doctor.el | 4 -- .../doom/modules/personal/music/packages.el | 4 -- doom/.config/doom/packages.el | 6 +-- 9 files changed, 37 insertions(+), 109 deletions(-) delete mode 100644 doom/.config/doom/+elfeed.el delete mode 100644 doom/.config/doom/modules/personal/music/config.el delete mode 100644 doom/.config/doom/modules/personal/music/doctor.el delete mode 100644 doom/.config/doom/modules/personal/music/packages.el diff --git a/doom/.config/doom/+elfeed.el b/doom/.config/doom/+elfeed.el deleted file mode 100644 index 7ca7c3a..0000000 --- a/doom/.config/doom/+elfeed.el +++ /dev/null @@ -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)) diff --git a/doom/.config/doom/+projects.el b/doom/.config/doom/+projects.el index 024bec1..4c45109 100644 --- a/doom/.config/doom/+projects.el +++ b/doom/.config/doom/+projects.el @@ -1,9 +1,8 @@ -;;; ../../.dotfiles/doom/.config/doom/+projects.el -*- lexical-binding: t; -*- -;;; Project management +;;; $DOOMDIR/+projects.el -*- lexical-binding: t; -*- (defvar project-locations '(("~/ghq/" . 3) ("~/.dotfiles" . 0) - ("~/ansible" . 0)) + ("~/configs" . 0)) "Where all my projects are located. Most of them are managed using `ghq' in ~/ghq/, however there are also some diff --git a/doom/.config/doom/+ui.el b/doom/.config/doom/+ui.el index 14aa590..7eee037 100644 --- a/doom/.config/doom/+ui.el +++ b/doom/.config/doom/+ui.el @@ -1,42 +1,17 @@ -;;; ../../.dotfiles/doom/.config/doom/+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 +;;; $DOOMDIR/+ui.el -*- lexical-binding: t; -*- (setq doom-font (font-spec :family "Jetbrains Mono" :size 13)) -;; Theme (setq doom-theme 'doom-gruvbox) -;; Display -(setq display-line-numbers-type 'relative) (menu-bar-mode +1) ; add back menu bar +(setq display-line-numbers-type 'relative) ; line numbers + ;; slightly nicer default buffer names (setq doom-fallback-buffer-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 (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" @@ -45,5 +20,4 @@ '(coding-category-undecided coding-category-utf-8)) (not (memq (coding-system-eol-type buffer-file-coding-system) '(1 2)))) t))) - (add-hook 'after-change-major-mode-hook #'doom-modeline-conditional-buffer-encoding) diff --git a/doom/.config/doom/config.el b/doom/.config/doom/config.el index bb47dce..313d419 100644 --- a/doom/.config/doom/config.el +++ b/doom/.config/doom/config.el @@ -4,12 +4,37 @@ ;; sync' after modifying this file! (setq user-full-name "earnest ma" - user-mail-address "me@earne.link" - org-directory "~/org/") + user-mail-address "me@earne.link") + +;; 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! "+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 ;; `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 ;; 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") diff --git a/doom/.config/doom/init.el b/doom/.config/doom/init.el index b7c4966..b26915d 100644 --- a/doom/.config/doom/init.el +++ b/doom/.config/doom/init.el @@ -15,6 +15,7 @@ ;; directory (for easy access to its source code). (doom! :input + bidi ; (tfel ot) thgir etirw uoy gnipleh ;;chinese ;;japanese ;;layout ; auie,ctsrnm is the superior home row @@ -134,6 +135,7 @@ ;;fstar ; (dependent) types and (monadic) effects and Z3 ;;gdscript ; the language you waited for ;;(go +lsp) ; the hipster dialect + ;;(graphql +lsp) ; Give queries a REST ;;(haskell +lsp) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; a language you can depend on @@ -154,7 +156,7 @@ ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;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 ;;racket ; a DSL for DSLs ;;raku ; the artist formerly known as perl6 @@ -186,9 +188,6 @@ ;;(rss +org) ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought - :personal - music - :config ;;literate (default +bindings +smartparens)) diff --git a/doom/.config/doom/modules/personal/music/config.el b/doom/.config/doom/modules/personal/music/config.el deleted file mode 100644 index e8910fc..0000000 --- a/doom/.config/doom/modules/personal/music/config.el +++ /dev/null @@ -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)) diff --git a/doom/.config/doom/modules/personal/music/doctor.el b/doom/.config/doom/modules/personal/music/doctor.el deleted file mode 100644 index 811fd42..0000000 --- a/doom/.config/doom/modules/personal/music/doctor.el +++ /dev/null @@ -1,4 +0,0 @@ -;;; personal/music/doctor.el -*- lexical-binding: t; -*- - -(unless (executable-find "playerctl") - (warn! "Couldn't find playerctl executable")) diff --git a/doom/.config/doom/modules/personal/music/packages.el b/doom/.config/doom/modules/personal/music/packages.el deleted file mode 100644 index e46a881..0000000 --- a/doom/.config/doom/modules/personal/music/packages.el +++ /dev/null @@ -1,4 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; personal/music/packages.el - -(package! playerctl :pin "4c3a6132616fd28f902590bf6e63332e6055492b") diff --git a/doom/.config/doom/packages.el b/doom/.config/doom/packages.el index 09b955c..d530eae 100644 --- a/doom/.config/doom/packages.el +++ b/doom/.config/doom/packages.el @@ -48,11 +48,7 @@ ;(unpin! pinned-package another-pinned-package) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;(unpin! t) -(package! speed-type :pin "5ef695f7159aa1f20c7c9e55f0c39bcdacce8d21") (package! ghq :pin "582bd6daa505d04c7cc06d6c82ed8aee0624bfbe") (package! smudge :pin "9e3488f485b7d7f3c97ebaad34ed552bb0cc228a") - -(package! elfeed :pin "162d7d545ed41c27967d108c04aa31f5a61c8e16") -(package! elfeed-protocol :pin "d2e22f5506bc75dbf4ca42ac87257fd1b259dd66") -(package! elfeed-goodies :pin "6711de66c22360f80fcfd9730293e5f3d419f787") +(package! speed-type :pin "5ef695f7159aa1f20c7c9e55f0c39bcdacce8d21")