]> git.armaanb.net Git - config.org.git/blobdiff - config.org
Switch modus-themes to using use-package
[config.org.git] / config.org
index deb1c21d670c6b14721293f107cc310a0d7ed13d..43e7c29798be8cb222aa6931e5a1a4cf191126f6 100644 (file)
@@ -42,12 +42,14 @@ straight.el is really nice for managing package, and it integrates nicely with u
 ** Theme
 Use the Modus Operandi theme by Protesilaos Stavrou. Its the best theme for Emacs by far, because how clear and readable it is. It is highly customizable, but I just set a few options here.
 #+begin_src emacs-lisp
-  (setq modus-themes-slanted-constructs t
-        modus-themes-bold-constructs t
-        modus-themes-mode-line '3d
-        modus-themes-scale-headings t
-        modus-themes-diffs 'desaturated)
-  (load-theme 'modus-vivendi t)
+  (use-package modus-themes
+    :custom
+    (modus-themes-slanted-constructs t)
+    (modus-themes-bold-constructs t)
+    (modus-themes-mode-line '3d)
+    (modus-themes-scale-headings t)
+    (modus-themes-diffs 'desaturated)
+    :config (load-theme 'modus-vivendi t))
 #+end_src
 ** Typography
 *** Font
@@ -136,6 +138,12 @@ Soft wrap words and do operations by visual lines in some modes.
                   mu4e-view-mode-hook))
     (add-hook hook (lambda () (visual-line-mode 1))))
 #+end_src
+** Auto fill mode
+#+begin_src emacs-lisp
+  (dolist (hook '(scdoc-mode-hook
+                  mu4e-compose-mode-hook))
+    (add-hook hook (lambda () (auto-fill-mode 1))))
+#+end_src
 ** Display number of matches in search
 #+begin_src emacs-lisp
   (use-package anzu
@@ -257,7 +265,8 @@ Define templates for lots of common structure elements. Mostly just used within
                         ("xr" . "src conf :tangle ~/.Xresources")
                         ("tm" . "src conf :tangle ~/.tmux.conf")
                         ("gp" . "src conf :tangle ~/.gnupg/gpg.conf")
-                        ("ag" . "src conf :tangle ~/.gnupg/gpg-agent.conf")))
+                        ("ag" . "src conf :tangle ~/.gnupg/gpg-agent.conf")
+                        ("xm" . "src conf :tangle ~/.config/xmodmap")))
       (add-to-list 'org-structure-template-alist addition)))
 #+end_src
 * Autocompletion
@@ -329,7 +338,7 @@ Contexts are a not very well known feature of mu4e that makes it super easy to m
           mu4e-confirm-quit nil
           mu4e-view-use-gnus t
           mail-user-agent 'mu4e-user-agent
-          mail-context-policy 'pick-first
+          mu4e-context-policy 'pick-first
           mu4e-contexts
           `( ,(make-mu4e-context
                :name "school"
@@ -367,7 +376,6 @@ Contexts are a not very well known feature of mu4e that makes it super easy to m
                          :query "maildir:\"/personal/INBOX\" or maildir:\"/school/INBOX\""
                          :key ?b))
     :hook ((mu4e-compose-mode . flyspell-mode)
-           (mu4e-compose-mode . auto-fill-mode)
            (message-send-hook . (lambda () (unless (yes-or-no-p "Ya sure 'bout that?")
                                              (signal 'quit nil))))))
 #+end_src
@@ -381,7 +389,7 @@ Contexts are a not very well known feature of mu4e that makes it super easy to m
 Set EWW as default browser except for multimedia which should open in MPV.
 #+begin_src emacs-lisp
   (defun browse-url-mpv (url &optional new-window)
-    "Open URL in MPV."
+    "Ask MPV to load URL."
     (interactive)
     (start-process "mpv" "*mpv*" "mpv" url))
 
@@ -605,7 +613,9 @@ Automatically indent after every change. I'm not sure how much I like this. It s
 ** Spell checking
 Spell check in text mode, and in prog-mode comments.
 #+begin_src emacs-lisp
-  (dolist (hook '(text-mode-hook))
+  (dolist (hook '(text-mode-hook
+                  markdown-mode-hook
+                  scdoc-mode-hook))
     (add-hook hook (lambda () (flyspell-mode))))
   (dolist (hook '(change-log-mode-hook log-edit-mode-hook))
     (add-hook hook (lambda () (flyspell-mode -1))))
@@ -664,6 +674,13 @@ Abbreviate things! I just use this for things like my email address and copyrigh
 #+begin_src emacs-lisp
   (use-package markdown-mode)
 #+end_src
+** scdoc mode
+Get it for yourself at https://git.armaanb.net/scdoc
+#+begin_src emacs-lisp
+  (add-to-list 'load-path "~/Code/scdoc-mode")
+  (autoload 'scdoc-mode "scdoc-mode" "Major mode for editing scdoc files" t)
+  (add-to-list 'auto-mode-alist '("\\.scd\\'" . scdoc-mode))
+#+end_src
 * Keybindings
 ** Switch windows
 #+begin_src emacs-lisp
@@ -884,6 +901,8 @@ Use the vi editing mode. I still haven't found a good way to show visual feedbac
   export LC_CTYPE="en_US.UTF-8"
   export LANGUAGE="en_US.UTF-8"
 
+  export CDPATH=:~
+
   export KISS_PATH="/home/armaa/Virtual/kiss/home/armaa/kiss-repo"
   export KISS_PATH="$KISS_PATH:/home/armaa/Clone/repo-main/core"
   export KISS_PATH="$KISS_PATH:/home/armaa/Clone/repo-main/extra"
@@ -907,7 +926,7 @@ Use the vi editing mode. I still haven't found a good way to show visual feedbac
 #+end_src
 **** File management
 #+begin_src shell :tangle ~/.config/ash/ashrc
-  alias ls='ls -lh --group-directories-first'
+  alias ls='LC_COLLATE=C ls -lh --group-directories-first'
   alias la='ls -A'
   alias df='df -h / /boot'
   alias du='du -h'
@@ -1236,3 +1255,28 @@ I use tmux in order to keep my st build light. Still learning how it works.
   default-cache-ttl 600
   allow-emacs-pinentry
 #+end_src
+** Xmodmap
+#+begin_src conf :tangle ~/.config/xmodmap
+  !
+  ! Unmap left super
+  !
+  clear mod4
+
+  !
+  ! Turn right alt into super
+  !
+  remove mod1 = Alt_R
+  add mod4 = Alt_R
+
+  !
+  ! Swap caps and control
+  !
+  remove Lock = Caps_Lock
+  remove Control = Control_L
+  remove Lock = Control_L
+  remove Control = Caps_Lock
+  keysym Control_L = Caps_Lock
+  keysym Caps_Lock = Control_L
+  add Lock = Caps_Lock
+  add Control = Control_L
+#+end_src