From 9867e4bbee2bcfe7050b0c9d98cbf72653f658ac Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sat, 13 Mar 2021 23:44:05 -0500 Subject: Many uncommitted changes --- .emacs.d/lisp/bandali-ebdb.el | 3 +- .emacs.d/lisp/bandali-erc.el | 25 +++---- .emacs.d/lisp/bandali-exwm.el | 107 ++++++++++++++++++++++++---- .emacs.d/lisp/bandali-gnus.el | 158 ++++------------------------------------- .emacs.d/lisp/page-break-lines | 1 - .emacs.d/lisp/refinery-theme | 1 - 6 files changed, 124 insertions(+), 171 deletions(-) delete mode 160000 .emacs.d/lisp/page-break-lines delete mode 160000 .emacs.d/lisp/refinery-theme (limited to '.emacs.d/lisp') diff --git a/.emacs.d/lisp/bandali-ebdb.el b/.emacs.d/lisp/bandali-ebdb.el index 4d21978..3d959c4 100644 --- a/.emacs.d/lisp/bandali-ebdb.el +++ b/.emacs.d/lisp/bandali-ebdb.el @@ -35,6 +35,7 @@ (with-eval-after-load 'ebdb (with-eval-after-load 'ebdb-complete ;; (csetq ebdb-complete-mail 'capf) + (csetq ebdb-completion-display-record nil) ; <87pn2kk2ig.fsf@ericabrahamsen.net> (ebdb-complete-enable)) (require 'ebdb-message) @@ -43,7 +44,7 @@ (csetq ebdb-gnus-window-size 0.3) (require 'ebdb-mua) - (csetq ebdb-mua-pop-up t)) + (csetq ebdb-mua-pop-up nil)) ;; (with-eval-after-load 'company-ebdb ;; (defun company-ebdb--post-complete (_) nil)) diff --git a/.emacs.d/lisp/bandali-erc.el b/.emacs.d/lisp/bandali-erc.el index ed27df3..bc0657a 100644 --- a/.emacs.d/lisp/bandali-erc.el +++ b/.emacs.d/lisp/bandali-erc.el @@ -40,6 +40,7 @@ erc-nick "bandali" erc-prompt "erc>" erc-prompt-for-password nil + erc-query-display 'buffer erc-rename-buffers t erc-server-reconnect-attempts 5 erc-server-reconnect-timeout 3) @@ -67,14 +68,14 @@ (declare-function erc-update-modules "erc") (erc-update-modules) - (set-face-attribute - 'erc-nick-default-face nil - ;; :weight 'semibold - ;; :background "#f2f2f2" - ;; :foreground "#222222" - :weight 'bold - :background "#f8f8f8" - :foreground "#6a6a6a") + ;; (set-face-attribute + ;; 'erc-nick-default-face nil + ;; ;; :weight 'semibold + ;; ;; :background "#f2f2f2" + ;; ;; :foreground "#222222" + ;; :weight 'bold + ;; :background "#f8f8f8" + ;; :foreground "#6a6a6a") ;; (set-face-attribute ;; 'erc-notice-face nil @@ -96,16 +97,16 @@ (csetq erc-pal-highlight-type 'nick erc-pals - '("aindilis" "blackbeard" "bremner" "~brettgilio?@*" "civodul" - "dto" "ggoes" "iank" "jrasata" "mplsCorwin" "quidam" "rwp" - "sachac" "sudoman" "technomancy")) + '("bremner" "^gopar" "^iank" "quidam" "^rwp" "sudoman" + "technomancy" "thomzane")) (with-eval-after-load 'erc-match (set-face-attribute 'erc-pal-face nil :foreground 'unspecified :weight 'unspecified :inherit 'erc-nick-default-face - :background (face-attribute 'font-lock-string-face :background))) + ;; :background (face-attribute 'font-lock-string-face :background) + :background "#ffffdf")) ;; erc-pcomplete (csetq erc-pcomplete-nick-postfix ",") diff --git a/.emacs.d/lisp/bandali-exwm.el b/.emacs.d/lisp/bandali-exwm.el index f94757d..99a186b 100644 --- a/.emacs.d/lisp/bandali-exwm.el +++ b/.emacs.d/lisp/bandali-exwm.el @@ -27,6 +27,8 @@ (add-to-list 'load-path (b/lisp "xelb")) (add-to-list 'load-path (b/lisp "exwm")) (require 'exwm) +(csetq ;; exwm-replace t + exwm-workspace-show-all-buffers t) ;; make class name the buffer name, truncating beyond 60 characters (defun b/exwm-rename-buffer () (interactive) @@ -58,15 +60,43 @@ around if needed." 0 (1+ exwm-workspace-current-index))) +(defun b/exwm-ws-prev () + "Switch to previous EXWM workspace, wrapping around if needed." + (interactive) + (exwm-workspace-switch-create + (b/exwm-ws-prev-index))) + +(defun b/exwm-ws-next () + "Switch to next EXWM workspace, wrapping around if needed." + (interactive) + (exwm-workspace-switch-create + (b/exwm-ws-next-index))) + ;; shorten 'C-c C-q' to 'C-q' (define-key exwm-mode-map [?\C-q] #'exwm-input-send-next-key) +;; scroll up/down/left/right on the echo area +(define-key minibuffer-inactive-mode-map [mouse-4] #'b/exwm-ws-prev) +(define-key minibuffer-inactive-mode-map [mouse-5] #'b/exwm-ws-next) +(define-key minibuffer-inactive-mode-map [mouse-6] #'b/exwm-ws-prev) +(define-key minibuffer-inactive-mode-map [mouse-7] #'b/exwm-ws-next) + +(defvar b/shifted-ws-names + '(0 \) 1 \! 2 \@ 3 \# 4 \$ + 5 \% 6 \^ 7 \& 8 \* 9 \() + "Mapping of shifted numbers on my keyboard.") + (csetq exwm-workspace-number 10 exwm-input-global-keys `(([?\s-R] . exwm-reset) + ([?\s-b] . exwm-workspace-switch-to-buffer) ([?\s-\\] . exwm-workspace-switch) ([?\s-\s] . dmenu) - ([?\S-\s-\s] . (lambda (command) + ;; ([?\s-\s] . (lambda () + ;; (interactive) + ;; (start-process-shell-command + ;; "rofi" nil "rofi -show run"))) + ([?\S-\s-\s] . (lambda (command) ; doesn't work in X windows (interactive (list (read-shell-command "➜ "))) (start-process-shell-command @@ -74,6 +104,10 @@ around if needed." ([s-return] . (lambda () (interactive) (start-process "" nil "urxvt"))) + ([S-s-return] . (lambda () + (interactive) + (start-process "" nil "urxvt" + "-name" "floating"))) ([?\C-\s-\s] . counsel-linux-app) ([?\M-\s-\s] . (lambda () (interactive) @@ -87,18 +121,32 @@ around if needed." ([?\s-J] . windmove-swap-states-down) ([?\s-K] . windmove-swap-states-up) ([?\s-L] . windmove-swap-states-right) + ([?\s-N ?d] . (lambda () + (interactive) + (start-process + "" nil "dunstctl" "close"))) + ([?\s-N ?D] . (lambda () + (interactive) + (start-process + "" nil "dunstctl" "close-all"))) + ([?\s-N ?h] . (lambda () + (interactive) + (start-process + "" nil "dunstctl" "history-pop"))) + ([?\s-N return] . (lambda () + (interactive) + (start-process + "" nil "dunstctl" "context"))) ([?\M-\s-h] . shrink-window-horizontally) ([?\M-\s-l] . enlarge-window-horizontally) ([?\M-\s-k] . shrink-window) ([?\M-\s-j] . enlarge-window) - ([?\s-\[] . (lambda () - (interactive) - (exwm-workspace-switch-create - (b/exwm-ws-prev-index)))) - ([?\s-\]] . (lambda () - (interactive) - (exwm-workspace-switch-create - (b/exwm-ws-next-index)))) + ([?\s-\[] . b/exwm-ws-prev) + ([?\s-\]] . b/exwm-ws-next) + ([mode-line mouse-4] . b/exwm-ws-prev) ; up + ([mode-line mouse-5] . b/exwm-ws-next) ; down + ([mode-line mouse-6] . b/exwm-ws-prev) ; left + ([mode-line mouse-7] . b/exwm-ws-next) ; right ([?\s-{] . (lambda () (interactive) (exwm-workspace-move-window @@ -113,7 +161,16 @@ around if needed." (interactive) (exwm-workspace-switch-create ,i)))) (number-sequence 0 (1- exwm-workspace-number))) - ([?\s-t] . exwm-floating-toggle-floating) + ,@(mapcar + (lambda (i) + `(,(kbd (format "s-%s" + (plist-get b/shifted-ws-names i))) + . + (lambda () + (interactive) + (exwm-workspace-move-window ,i)))) + (number-sequence 0 (1- exwm-workspace-number))) + ([?\s-F] . exwm-floating-toggle-floating) ([?\s-f] . exwm-layout-toggle-fullscreen) ([?\s-W] . (lambda () (interactive) @@ -160,6 +217,14 @@ around if needed." (lambda () (interactive) (start-process "" nil "mpc" "next"))) + ([XF86MonBrightnessDown] . + (lambda () + (interactive) + (start-process "" nil "light" "-U" "5"))) + ([XF86MonBrightnessUp] . + (lambda () + (interactive) + (start-process "" nil "light" "-A" "5"))) ([XF86ScreenSaver] . (lambda () (interactive) @@ -199,15 +264,20 @@ around if needed." ([?\C-g] . [escape]))) (require 'exwm-manage) +(csetq + exwm-manage-configurations + '(((equal exwm-instance-name "floating") + floating t + floating-mode-line nil))) (add-hook 'exwm-manage-finish-hook (lambda () (when exwm-class-name (cond - ((member exwm-class-name '("IceCat" "Iceweasel")) + ((member exwm-class-name '("Abrowser" "IceCat" "Iceweasel")) (exwm-input-set-local-simulation-keys `(,@exwm-input-simulation-keys ([?\C-\S-d] . [?\C-d])))) - ((string= exwm-class-name "URxvt") + ((member exwm-class-name '("URxvt" "Mate-terminal")) (exwm-input-set-local-simulation-keys '(([?\C-c ?\C-c] . [?\C-c]) ([?\C-c ?\C-u] . [?\C-u])))) @@ -217,8 +287,19 @@ around if needed." ([?\C-n] . [C-down])))))))) (require 'exwm-randr) +(csetq + exwm-randr-workspace-monitor-plist + '(0 "eDP-1" + 1 "eDP-1" 2 "eDP-1" 3 "eDP-1" + 4 "eDP-1" 5 "eDP-1" 6 "eDP-1" + 7 "HDMI-1" 8 "HDMI-1" 9 "HDMI-1")) +;; (add-hook +;; 'exwm-randr-screen-change-hook +;; (lambda () +;; (start-process-shell-command +;; "xrandr" nil +;; "xrandr --output HDMI-1 --mode 1280x720 --above eDP-1 --auto"))) (exwm-randr-enable) -(csetq exwm-randr-workspace-monitor-plist '(1 "VGA-1")) (require 'exwm-systemtray) (exwm-systemtray-enable) diff --git a/.emacs.d/lisp/bandali-gnus.el b/.emacs.d/lisp/bandali-gnus.el index 671a1cb..fdb1e7a 100644 --- a/.emacs.d/lisp/bandali-gnus.el +++ b/.emacs.d/lisp/bandali-gnus.el @@ -75,8 +75,6 @@ (list ".*<\\(.*\\)\\.libreplanet\\.org>.*" "l.\\1") ;; iana (e.g. tz-announce) (list ".*<\\(.*\\)\\.iana\\.org>.*" "l.\\1") - ;; orbitalfox (e.g. gemini) - (list ".*<\\(.*\\)\\.lists\\.orbitalfox\\.eu>.*" "l.\\1") ;; haskell (list ".*<\\(.*\\)\\.haskell\\.org>.*" "l.\\1") ;; *.lists.sr.ht, omitting one dot if present @@ -85,6 +83,7 @@ ;; webmasters (from "webmasters\\(-comment\\)?@gnu\\.org" "webmasters") ;; other + ("subject" "nagios-fsf:.*" "nagios-fsf") (list ".*atreus.freelists.org" "l.atreus") (list ".*deepspec.lists.cs.princeton.edu" "l.deepspec") ;; (list ".*haskell-art.we.lurk.org" "l.haskell.art") ;d @@ -133,146 +132,22 @@ (nnimap-user "amin.bandali"))) gnus-message-archive-group "nnimap+gnu:INBOX" gnus-parameters - '(("l\\.atreus" - (to-address . "atreus@freelists.org") - (to-list . "atreus@freelists.org")) - ("l\\.deepspec" + '(("l\\.deepspec" (to-address . "deepspec@lists.cs.princeton.edu") (to-list . "deepspec@lists.cs.princeton.edu") (list-identifier . "\\[deepspec\\]")) - ("l\\.emacs-devel" - (to-address . "emacs-devel@gnu.org") - (to-list . "emacs-devel@gnu.org")) - ("l\\.help-gnu-emacs" - (to-address . "help-gnu-emacs@gnu.org") - (to-list . "help-gnu-emacs@gnu.org")) - ("l\\.info-gnu-emacs" - (to-address . "info-gnu-emacs@gnu.org") - (to-list . "info-gnu-emacs@gnu.org")) - ("l\\.emacs-orgmode" - (to-address . "emacs-orgmode@gnu.org") - (to-list . "emacs-orgmode@gnu.org") - (list-identifier . "\\[O\\]")) - ("l\\.emacs-tangents" - (to-address . "emacs-tangents@gnu.org") - (to-list . "emacs-tangents@gnu.org")) - ("l\\.emacsconf-committee" - (to-address . "emacsconf-committee@gnu.org") - (to-list . "emacsconf-committee@gnu.org")) - ("l\\.emacsconf-discuss" - (to-address . "emacsconf-discuss@gnu.org") - (to-list . "emacsconf-discuss@gnu.org")) - ("l\\.emacsconf-org" - (to-address . "emacsconf-org@gnu.org") - (to-list . "emacsconf-org@gnu.org")) - ("l\\.emacsconf-org-private" - (to-address . "emacsconf-org-private@gnu.org") - (to-list . "emacsconf-org-private@gnu.org")) - ("l\\.emacsconf-register" - (to-address . "emacsconf-register@gnu.org") - (to-list . "emacsconf-register@gnu.org")) - ("l\\.emacsconf-submit" - (to-address . "emacsconf-submit@gnu.org") - (to-list . "emacsconf-submit@gnu.org")) ("l\\.fencepost-users" (to-address . "fencepost-users@gnu.org") (to-list . "fencepost-users@gnu.org") (list-identifier . "\\[Fencepost-users\\]")) - ("l\\.gnewsense-art" - (to-address . "gnewsense-art@nongnu.org") - (to-list . "gnewsense-art@nongnu.org") - (list-identifier . "\\[gNewSense-art\\]")) - ("l\\.gnewsense-dev" - (to-address . "gnewsense-dev@nongnu.org") - (to-list . "gnewsense-dev@nongnu.org") - (list-identifier . "\\[Gnewsense-dev\\]")) - ("l\\.gnewsense-users" - (to-address . "gnewsense-users@nongnu.org") - (to-list . "gnewsense-users@nongnu.org") - (list-identifier . "\\[gNewSense-users\\]")) - ("l\\.gnunet-developers" - (to-address . "gnunet-developers@gnu.org") - (to-list . "gnunet-developers@gnu.org") - (list-identifier . "\\[GNUnet-developers\\]")) - ("l\\.help-gnunet" - (to-address . "help-gnunet@gnu.org") - (to-list . "help-gnunet@gnu.org") - (list-identifier . "\\[Help-gnunet\\]")) - ("l\\.bug-gnuzilla" - (to-address . "bug-gnuzilla@gnu.org") - (to-list . "bug-gnuzilla@gnu.org") - (list-identifier . "\\[Bug-gnuzilla\\]")) - ("l\\.gnuzilla-dev" - (to-address . "gnuzilla-dev@gnu.org") - (to-list . "gnuzilla-dev@gnu.org") - (list-identifier . "\\[Gnuzilla-dev\\]")) - ("l\\.guile-devel" - (to-address . "guile-devel@gnu.org") - (to-list . "guile-devel@gnu.org")) - ("l\\.guile-user" - (to-address . "guile-user@gnu.org") - (to-list . "guile-user@gnu.org")) - ("l\\.guix-devel" - (to-address . "guix-devel@gnu.org") - (to-list . "guix-devel@gnu.org")) - ("l\\.help-guix" - (to-address . "help-guix@gnu.org") - (to-list . "help-guix@gnu.org")) - ("l\\.info-guix" - (to-address . "info-guix@gnu.org") - (to-list . "info-guix@gnu.org")) - ("l\\.savannah-hackers-public" - (to-address . "savannah-hackers-public@gnu.org") - (to-list . "savannah-hackers-public@gnu.org")) - ("l\\.savannah-users" - (to-address . "savannah-users@gnu.org") - (to-list . "savannah-users@gnu.org")) - ("l\\.www-commits" - (to-address . "www-commits@gnu.org") - (to-list . "www-commits@gnu.org")) - ("l\\.www-discuss" - (to-address . "www-discuss@gnu.org") - (to-list . "www-discuss@gnu.org")) - ("l\\.haskell-art" - (to-address . "haskell-art@we.lurk.org") - (to-list . "haskell-art@we.lurk.org") - (list-identifier . "\\[haskell-art\\]")) ("l\\.haskell-cafe" (to-address . "haskell-cafe@haskell.org") (to-list . "haskell-cafe@haskell.org") (list-identifier . "\\[Haskell-cafe\\]")) - ("l\\.notmuch" - (to-address . "notmuch@notmuchmail.org") - (to-list . "notmuch@notmuchmail.org")) - ("l\\.parabola-dev" - (to-address . "dev@lists.parabola.nu") - (to-list . "dev@lists.parabola.nu") - (list-identifier . "\\[Dev\\]")) - ("l\\.~bandali\\.public-inbox" - (to-address . "~bandali/public-inbox@lists.sr.ht") - (to-list . "~bandali/public-inbox@lists.sr.ht")) - ("l\\.~sircmpwn\\.free-writers-club" - (to-address . "~sircmpwn/free-writers-club@lists.sr.ht") - (to-list . "~sircmpwn/free-writers-club@lists.sr.ht")) - ("l\\.~sircmpwn\\.srht-admins" - (to-address . "~sircmpwn/sr.ht-admins@lists.sr.ht") - (to-list . "~sircmpwn/sr.ht-admins@lists.sr.ht")) - ("l\\.~sircmpwn\\.srht-announce" - (to-address . "~sircmpwn/sr.ht-announce@lists.sr.ht") - (to-list . "~sircmpwn/sr.ht-announce@lists.sr.ht")) - ("l\\.~sircmpwn\\.srht-dev" - (to-address . "~sircmpwn/sr.ht-dev@lists.sr.ht") - (to-list . "~sircmpwn/sr.ht-dev@lists.sr.ht")) - ("l\\.~sircmpwn\\.srht-discuss" - (to-address . "~sircmpwn/sr.ht-discuss@lists.sr.ht") - (to-list . "~sircmpwn/sr.ht-discuss@lists.sr.ht")) - ("webmasters" - (to-address . "webmasters@gnu.org") - (to-list . "webmasters@gnu.org")) ("gnu.*" (gcc-self . t)) - ("l\\." - (subscribed . t)) + ;; ("l\\." + ;; (subscribed . t)) ("nnimap\\+uwaterloo:.*" (gcc-self . t))) ;; nnimap-record-commands t @@ -310,8 +185,6 @@ (add-hook 'gnus-group-mode-hook #'gnus-topic-mode) (add-hook 'gnus-group-mode-hook #'gnus-agent-mode)) ;; global key bindings -(global-set-key (kbd "s-m") #'gnus-plugged) -(global-set-key (kbd "s-M") #'gnus-unplugged) (global-set-key (kbd "C-c m") #'gnus-plugged) (global-set-key (kbd "C-c M") #'gnus-unplugged) @@ -388,14 +261,14 @@ (defvar b/shemshak-signature "Amin Bandali https://shemshak.org/~bandali") (defvar b/uwaterloo-signature "Amin Bandali, MMath -https://bndl.org") - (defvar b/csc-signature "Amin Bandali (https://bndl.org) +https://shemshak.org/~bandali") + (defvar b/csc-signature "Amin Bandali (https://shemshak.org/~bandali) Systems Committee Computer Science Club of the University of Waterloo") (defvar b/sfl-signature "Amin Bandali Free Software Consultant Savoir-faire Linux -GNU Jami: bandali") +jami:bandali") (csetq gnus-message-replysign t gnus-posting-styles @@ -403,8 +276,6 @@ GNU Jami: bandali") (address "bandali@gnu.org")) ("nnimap\\+gnu:l\\..*" (signature nil)) - ("nnimap\\+gnu:.*" - (organization "GNU")) ((header "subject" "ThankCRM") (to "webmasters-comment@gnu.org") (body "") @@ -429,14 +300,15 @@ GNU Jami: bandali") (address "amin.bandali@savoirfairelinux.com") (signature b/sfl-signature) (gcc "nnimap+sfl:Sent") - (eval (setq-local b/sfl-p t)))))) + ;; (eval (setq-local b/sfl-p t)) + )))) ;; hooks -(with-eval-after-load 'gnus - (add-hook 'gnus-message-setup-hook - (lambda () - (unless (or (mml-secure-is-encrypted-p) - b/sfl-p) - (mml-secure-message-sign))))) +;; (with-eval-after-load 'gnus +;; (add-hook 'gnus-message-setup-hook +;; (lambda () +;; (unless (or (mml-secure-is-encrypted-p) +;; b/sfl-p) +;; (mml-secure-message-sign))))) (with-eval-after-load 'gnus-topic (csetq gnus-topic-line-format "%i[ %A: %(%{%n%}%) ]%v\n")) diff --git a/.emacs.d/lisp/page-break-lines b/.emacs.d/lisp/page-break-lines deleted file mode 160000 index f8c4cd7..0000000 --- a/.emacs.d/lisp/page-break-lines +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f8c4cd7fc67638ae4113551dcffdf87fcd252d9b diff --git a/.emacs.d/lisp/refinery-theme b/.emacs.d/lisp/refinery-theme deleted file mode 160000 index 761ecca..0000000 --- a/.emacs.d/lisp/refinery-theme +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 761ecca31d91cf55addab93d44aae1066ea77b02 -- cgit v1.2.3-60-g2f50