]> git.armaanb.net Git - config.org.git/blobdiff - config.org
ash: remove -i flag from pkill
[config.org.git] / config.org
index a6579af83b881682556696217778c501714739c8..82bd5a9e1dfd2452f2bca19bbbec1599038f88a4 100644 (file)
@@ -357,6 +357,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-contexts
           `( ,(make-mu4e-context
                :name "school"
@@ -395,8 +396,9 @@ Contexts are a not very well known feature of mu4e that makes it super easy to m
                          :key ?b))
     :hook ((mu4e-compose-mode . flyspell-mode)
            (mu4e-compose-mode . auto-fill-mode)
-           (mu4e-view-mode-hook . turn-on-visual-line-mode)))
-
+           (mu4e-view-mode-hook . turn-on-visual-line-mode)
+           (message-send-hook . (lambda () (unless (yes-or-no-p "Ya sure 'bout that?")
+                                             (signal 'quit nil))))))
 #+end_src
 Discourage Gnus from displaying HTML emails
 #+begin_src emacs-lisp
@@ -443,12 +445,8 @@ Some EWW enhancements.
   (global-set-key (kbd "C-c w") 'eww)
 #+end_src
 ** IRC
+Circe is a really nice IRC client, that claims to be above RCIRC and below ERC in terms of features. ERC felt a bit messy and finicky to me, and Circe has all the features that I need. This setup gets the password for my bouncer (Pounce) instances via my =~/.authinfo.gpg= file.
 #+begin_src emacs-lisp
-  (use-package circe
-    :config
-    (enable-lui-track)
-    (enable-circe-color-nicks))
-
   (defun fetch-password (&rest params)
     (require 'auth-source)
     (let ((match (car (apply 'auth-source-search params))))
@@ -459,18 +457,43 @@ Some EWW enhancements.
               secret))
         (error "Password not found for %S" params))))
 
-  (setq circe-network-options
-        '(("pounce"
-           :host "irc.armaanb.net"
-           :nick "emacs"
-           :use-tls t
-           :port "6697"
-           :pass (lambda (fetch-password
-                          :login "emacs"
-                          :machine "irc.armaanb.net"
-                          :port 6697))))
-
-        (circe "pounce")
+  (use-package circe
+    :config
+    (enable-lui-track)
+    (enable-circe-color-nicks)
+    (circe "libera")
+    (circe "oftc")
+    (circe "tilde")
+    (setq circe-networks '(("libera"
+                            :host "irc.armaanb.net"
+                            :nick "emacs"
+                            :use-tls t
+                            :port "6698"
+                            :pass (lambda (null) (fetch-password
+                                                  :login "emacs"
+                                                  :machine "irc.armaanb.net"
+                                                  :port 6698)))
+                           ("oftc"
+                            :host "irc.armaanb.net"
+                            :nick "emacs"
+                            :use-tls t
+                            :port "6699"
+                            :pass (lambda (null) (fetch-password
+                                                  :login "emacs"
+                                                  :machine "irc.armaanb.net"
+                                                  :port 6699)))
+                           ("tilde"
+                            :host "irc.armaanb.net"
+                            :nick "emacs"
+                            :use-tls t
+                            :port "6696"
+                            :pass (lambda (null) (fetch-password
+                                                  :login "emacs"
+                                                  :machine "irc.armaanb.net"
+                                                  :port 6696)))
+                           ))
+    :custom (circe-default-part-message "goodbye!")
+    :bind (:map circe-mode-map ("C-c C-r" . circe-reconnect-all)))
 #+end_src
 * Emacs IDE
 ** Code cleanup
@@ -713,6 +736,14 @@ No more clogging up init.el.
               "0c" '0x0-upload-kill-ring
               "0p" '0x0-upload-popup))
 #+end_src
+** Automatically clean buffers
+#+begin_src emacs-lisp
+  ;; Don't kill Circe buffers
+  (add-to-list 'clean-buffer-list-kill-never-regexps (lambda (buffer-name)
+                                                       (with-current-buffer buffer-name
+                                                         (derived-mode-p 'lui-mode))))
+  (midnight-mode)
+#+end_src
 * Tangles
 ** Spectrwm
 *** General settings
@@ -773,7 +804,7 @@ No more clogging up init.el.
 **** Programs
 #+begin_src conf :tangle ~/.spectrwm.conf
   program[email] = emacsclient -c --eval "(mu4e)"
-  program[irc] = emacsclient -c --eval '(switch-to-buffer "irc.armaanb.net:6697")'
+  program[irc] = emacsclient -c --eval '(switch-to-buffer "irc.armaanb.net:6698")'
   program[rss] = emacsclient -c --eval '(elfeed)'
   program[emacs] = emacsclient -c
   program[firefox] = firefox
@@ -917,12 +948,11 @@ No more clogging up init.el.
   alias grep='grep -in --color=auto'
   alias mkdir='mkdir -pv'
   alias lanex='java -jar ~/.local/share/lxc/lanxchange.jar'
-  alias vim=$EDITOR
-  alias emacs=$EDITOR
+  emacs() { $EDITOR "$@" & }
+  alias vim="emacs"
 #+end_src
 **** System management
 #+begin_src shell :tangle ~/.config/ash/ashrc
-  alias pkill='pkill -i'
   alias crontab='crontab-argh'
   alias sudo='doas'
   alias pasu='git -C ~/.password-store push'
@@ -1240,6 +1270,8 @@ Modus operandi theme.
   set -g status off
   set -g mouse on
   set-window-option -g mode-keys vi
+  bind-key -T copy-mode-vi 'v' send -X begin-selection
+  bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
 #+end_src
 ** GPG
 *** Config