diff options
author | mms <michal@sapka.me> | 2024-06-13 16:56:56 +0200 |
---|---|---|
committer | mms <michal@sapka.me> | 2024-06-13 16:56:56 +0200 |
commit | a6f933fe524f544ec02afe9bd08a1c8ee909c784 (patch) | |
tree | 49d24b95ffdab891b1e9442d045c192276814568 | |
parent | 11760041c7ebf7301e37f07e1e1a78bbdcc50a87 (diff) |
feat: tidy up
-rw-r--r-- | mms-gui.org | 28 | ||||
-rw-r--r-- | mms-keyboard.org | 113 | ||||
-rw-r--r-- | mms-misc-rss.org | 5 | ||||
-rw-r--r-- | mms-misc.org | 57 | ||||
-rw-r--r-- | mms-ox-publish.org | 9 | ||||
-rw-r--r-- | mms-ox.org | 10 | ||||
-rw-r--r-- | mms-prog.org | 12 |
7 files changed, 14 insertions, 220 deletions
diff --git a/mms-gui.org b/mms-gui.org index 9f70ad0..c26ab70 100644 --- a/mms-gui.org +++ b/mms-gui.org @@ -12,7 +12,7 @@ #+EXPORT_FILE_NAME: gui Here I set up how emacs looks when in GUI mode. - +# * Generic thingies Let's start with some basic settings. @@ -74,22 +74,22 @@ All I know is that orange is a fruit, and not a color. This is 1:1 copy of what [[https://howardabrams.com/hamacs/ha-display.html#orgb97059f][Howard Abrams]] uses. #+begin_src emacs-lisp - (use-package color-theme-sanityinc-tomorrow + (use-package ef-themes :ensure t) + (setq ef-themes-mixed-fonts t + ef-themes-variable-pitch-ui t) + + (setq mms-bright-theme 'ef-spring + mms-dark-theme 'ef-autumn) + (defun mms-dark-room-mode() (interactive) - (load-theme 'sanityinc-tomorrow-night t) - (set-face-attribute 'region nil :background "#000096") - (set-face-attribute 'mode-line nil :background "black") - (set-face-attribute 'mode-line-inactive nil :background "#444444")) + (load-theme mms-dark-theme t)) (defun mms-light-room-mode () (interactive) - (load-theme 'sanityinc-tomorrow-day t) - (set-face-attribute 'region nil :background "orange1") - (set-face-attribute 'mode-line nil :background "#cccccc") - (set-face-attribute 'mode-line-inactive nil :background "#888888")) + (load-theme mms-bright-theme t)) #+end_src * Auto-setup @@ -115,18 +115,12 @@ Lets auto enable those on Emacs start By default, all devices run in external-monitor mode, so I will call respective function in local configs. #+begin_src emacs-lisp - (with-eval-after-load 'color-theme-sanityinc-tomorrow + (with-eval-after-load 'ef-themes (if mms-is-voyager (mms-default-voyager-mode) (mms-default-mac-mode))) #+end_src * Org-mode -First of all, let's disable presenting emphasis markers - -#+begin_src emacs-lisp - (setq org-hide-emphasis-markers t) -#+end_src - After that - I don't need line numbers #+begin_src emacs-lisp diff --git a/mms-keyboard.org b/mms-keyboard.org index 32c5715..33320f8 100644 --- a/mms-keyboard.org +++ b/mms-keyboard.org @@ -11,28 +11,6 @@ #+HUGO_CUSTOM_FRONT_MATTER: :menu-abstract "evil mode, basic key bindings and misc" #+EXPORT_FILE_NAME: keyboard -* Evil mode - -I've been using Vim for a long time so those keybindings are a must. -My last attempt to use Emacs failed as I decided to learn Emacs native keybindings. -While those aren't *bad*, I much prefer the classic VIM style. -This time I am starting with Evil so anything I add to this config will be configured with those bindings at day 1. - -#+BEGIN_SRC emacs-lisp - (use-package evil - :ensure t - :init - (setq evil-want-keybinding nil - evil-vsplit-window-right t - evil-split-window-below t - evil-want-C-u-scroll t) - :config - (evil-mode 0)) -#+END_SRC - -#+RESULTS: -: t - * Which key WK adds a on-the-fly cheatsheet. @@ -44,97 +22,6 @@ WK adds a on-the-fly cheatsheet. (which-key-mode)) #+end_src -* Evil Collection - -Evil Collection is a ready-made package of evil mode keybings for multiple packages. -You can see the full list [[https://github.com/emacs-evil/evil-collection/tree/master/modes][on Github]]. -It saves me from doing /all that config/ by hand. -It's also good that those bindings are kinda good actually. - -#+BEGIN_SRC emacs-lisp -(use-package evil-collection - :after evil - :ensure t - :config - (evil-collection-init)) -#+END_SRC - -* General - -I use General to manage keybindings. -People said it's good, and I have to find a downside. - -All those bindings here should be to moved dedicated sections, but for now they are here. - -#+BEGIN_SRC emacs-lisp - (use-package general - :ensure t - :config - (setq general-use-package-emit-autoloads t) - (general-evil-setup)) -#+END_SRC - -I manage my packages via Elpaca. -It has the amazing capability of loading the packages asynchronously, speeding up Emacs start. -But this also means that order becomes a problem. -I will define keybindings using =general-*= functions all over the place, and the package may not be loaded yet. -To save myself the problem, just pause execution of the config until General is fully loaded. - -#+begin_src emacs-lisp - (elpaca-wait) -#+end_src - -* Basic keybindings - -I use =space= as my leader. -It's a muscle memory back from when I first learned Vim. - -#+begin_src emacs-lisp - (general-create-definer mms-leader-keys - :states '(normal insert visual emacs) - :keymaps 'override - :prefix "SPC" ;; set leader - :global-prefix "M-SPC") -#+end_src - -I want to access my config /blazingly fast/[tm] - -#+begin_src emacs-lisp - (mms-leader-keys - "o c" '((lambda () (interactive) (find-file "~/.emacs.d/")) :wk "Open config dir")) -#+end_src - -I also have a habit of wanting to quickly create new splits (/sigh/ windows) fast back from my Vim days. - -#+begin_src emacs-lisp - (general-create-definer mms-split-mgt-keys - :states '(normal visual) - :keymaps 'override - :prefix "s") - - (mms-split-mgt-keys - ;; Window splits - "s" '(evil-window-split :wk "Horizontal split window") - "v" '(evil-window-vsplit :wk "Vertical split window") - ;; Window motions - "h" '(evil-window-left :wk "Window left") - "j" '(evil-window-down :wk "Window down") - "k" '(evil-window-up :wk "Window up") - "l" '(evil-window-right :wk "Window right")) -#+end_src - -And I have a few keybindings that are here for now. -I'll move them to dedicated sections when I reach them. - -#+begin_src emacs-lisp - (mms-leader-keys - "c a" '(eglot-code-actions :wk "Code actions")) - - - -#+END_SRC - - * Xah Lee Flykeys # #+begin_src emacs-lisp diff --git a/mms-misc-rss.org b/mms-misc-rss.org index a7b850a..3eb72b2 100644 --- a/mms-misc-rss.org +++ b/mms-misc-rss.org @@ -38,11 +38,6 @@ You can read my intro to elfeed org [[https://michal.sapka.me/emacs/elfeed-liter And some keybindings -#+begin_src emacs-lisp - (mms-leader-keys - "m r" '(lambda () (interactive) (elfeed) :wk "Elfeed")) -#+end_src - I also don't need line numbers when reading RSS item * Youtube diff --git a/mms-misc.org b/mms-misc.org index 2de0096..4f34ecf 100644 --- a/mms-misc.org +++ b/mms-misc.org @@ -49,11 +49,6 @@ You can find my guide on my [[https://michal.sapka.me/emacs/notmuch/][emacs site notmuch-search-line-faces '(("gh-pr-todo" . ((t :foreground "#f77"))))) ) #+END_SRC -#+begin_src emacs-lisp - (mms-leader-keys - "m m" '(lambda () (interactive) (notmuch-hello) :wk "Notmuch hello")) -#+end_src - ** composing I use =msmtp= for email sendout. @@ -75,11 +70,6 @@ I set up =mms-email-address= in my config_local.el, as it changes between machin (concat "BCC: " mms-email-address)) #+end_src -#+begin_src emacs-lisp - (mms-leader-keys - "m c" '(lambda () (interactive) (compose-mail) :wk "compose email")) -#+end_src - * Jabber I self-host an XMPP server for my family. @@ -111,17 +101,7 @@ Of course I want to have it inside Emacs! First, let's be able to run Youtube inside emacs #+begin_src emacs-lisp (use-package yeetube - :general - (:states 'normal - :keymaps 'yeetube-mode-map - "RET" 'yeetube-play - "d" 'yeetube-download-video - "b" 'yeetube-play-saved-video - "B" 'yeetube-save-video - "x" 'yeetube-remove-saved-video - "/" 'yeetube-search - "0" 'yeetube-toggle-video - )) + :ensure t) #+end_src Then, let's create linkhandler to pass the link to the correct handler. @@ -138,40 +118,13 @@ Then, let's create linkhandler to pass the link to the correct handler. ) #+end_src -#+RESULTS: -: mms-open-link-under-point - - -And I want to have as =leader - enter - enter= - -#+begin_src emacs-lisp - (mms-leader-keys - "RET RET" '(lambda () (interactive) (mms-open-link-under-point) :wk "follow link")) -#+end_src - * Music player -** EMMS - -I listen to local files, so I want to control it in Emacs. - -#+begin_src emacs-lisp - (use-package emms - :config - (emms-all) - (setq emms-player-list '(emms-player-mpv) - emms-info-functions '(emms-info-native)) - ) - - (mms-leader-keys - "p p" '(lambda () (interactive) (emms-pause) :wk "Pause") - "p e" '(lambda () (interactive) (emms) :wk "Emms") - ) -#+end_src - ** Listen +Listen.el is a new package for music playback. + #+begin_src emacs-lisp (use-package listen :ensure t) @@ -190,9 +143,5 @@ Yeah, I'm trying it. :config (setq gnus-select-method '(nntp "news.gwene.org")) ;; Read feeds/atom through gwene (setq gnus-summary-line-format "%U%R%z%d %I%(%[ %F %] %s %)\n")) - - - (mms-leader-keys - "o g" '(lambda () (interactive) (gnus) :wk "Gnus")) #+end_src diff --git a/mms-ox-publish.org b/mms-ox-publish.org index d858ee3..4c3adbb 100644 --- a/mms-ox-publish.org +++ b/mms-ox-publish.org @@ -64,12 +64,6 @@ I open the folder via: Finally, I want to have quick access -#+begin_src emacs-lisp - (mms-leader-keys - "o h" (lambda () (interactive) (mms-open-homepage-org-files)) :wk "open homepage") -#+end_src - - * Thesarus #+begin_src emacs-lisp @@ -80,9 +74,6 @@ Finally, I want to have quick access :config (setq synosaurus-backend 'synosaurus-backend-wordnet synosaurus-choose-method 'popup)) - - (mms-leader-keys - "l s" (lambda () (interactive) (synosaurus-choose-and-replace)) :wk "lookup synonim") #+end_src * Grammarly @@ -39,8 +39,6 @@ I want to use all available languages. (plantuml . t))) #+end_src -#+RESULTS: - Don't ask for confirmation when evaluating, don't be annoying. #+begin_src emacs-lisp @@ -77,11 +75,3 @@ Why do markdown when you don't need to? (use-package ox-gfm) #+end_src -* Fast access - -Lastly, let's open my org folder /fast/ - -#+begin_src emacs-lisp - (mms-leader-keys - "o o" '((lambda () (interactive) (find-file "~/org")) :wk "Open org folder")) -#+end_src diff --git a/mms-prog.org b/mms-prog.org index 2131235..37e25eb 100644 --- a/mms-prog.org +++ b/mms-prog.org @@ -59,18 +59,6 @@ I use =consult= for the as-I-type propositions. :ensure t) #+end_src -#+begin_src emacs-lisp - (with-eval-after-load 'general - (mms-leader-keys - "f g" '(lambda () (interactive) (consult-ripgrep)) :wk "Ripgrep" - "f i" '(lambda () (interactive) (consult-imenu)) :wk "Imenu" - "f F" '(lambda () (interactive) (consult-recent-file)) :wk "Recent file" - "f B" '(lambda () (interactive) (consult-bookmark)) :wk "Bookmark" - "f b" '(lambda () (interactive) (consult-buffer)) :wk "Buffer" - "f f" '(lambda () (interactive) (consult-find)) :wk "File" - )) -#+end_src - * Prototyping #+begin_src emacs-lisp |