** 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
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
("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
A well balanced completion framework.
#+begin_src emacs-lisp
(use-package ivy
+ :bind (:map ivy-minibuffer-map
+ ("TAB" . ivy-alt-done))
+ (:map ivy-switch-buffer-map
+ ("M-d" . ivy-switch-buffer-kill))
:config (ivy-mode))
#+end_src
** Ivy-rich
Ivy everywhere.
#+begin_src emacs-lisp
(use-package counsel
+ :bind ("C-M-j" . 'counsel-switch-buffer)
:config (counsel-mode))
#+end_src
** Remember frequent commands
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"
: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
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))
(interactive)
(if (get-buffer "irc.armaanb.net:6696")
(switch-to-buffer "irc.armaanb.net:6696")
- (progn (circe "libera")
+ (progn (switch-to-buffer "*scratch*")
+ (circe "libera")
(circe "oftc")
(circe "tilde"))))
** 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))))
#+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
#+end_src
**** Programs
#+begin_src conf :tangle ~/.spectrwm.conf
- program[email] = emacsclient -ce "(mu4e)"
+ program[email] = emacsclient -ce '(progn (switch-to-buffer "*scratch*") (mu4e))'
program[irc] = emacsclient -ce '(acheam-irc)'
program[rss] = emacsclient -ce '(elfeed)'
program[calendar] = emacsclient -ce '(acheam-calendar)'
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"
#+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'
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