X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/b57457b2b42d734cd314849a82887fb9c864fed0..1684239430ac6fede09fbb0ebfd20fa6cba5da6d:/.emacs.d/init.el?ds=sidebyside diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 8c1ff78..8d80538 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -93,7 +93,9 @@ ;; Not necessary when using straight.el ;; (C-h v straight-package-neutering-mode RET) -(comment +(when (and + (not (featurep 'straight)) + (version< emacs-version "27")) (setq package-enable-at-startup nil) ;; (package-initialize) ) @@ -216,7 +218,6 @@ (exec-path-from-shell-copy-env "SSH_AGENT_PID") (exec-path-from-shell-copy-env "SSH_AUTH_SOCK")) - ;; only one custom theme at a time (comment (defadvice load-theme (before clear-previous-themes activate) @@ -672,6 +673,9 @@ For disabling the behaviour for certain buffers and/or modes." ("C-c x" . counsel-M-x) ("C-c f ." . counsel-find-file) ("C-c f l" . counsel-find-library) + ("C-c f r" . counsel-recentf) + ("s-." . counsel-find-file) + ("s-r" . ivy-switch-buffer) :map minibuffer-local-map ("C-r" . counsel-minibuffer-history)) :config @@ -883,6 +887,7 @@ For disabling the behaviour for certain buffers and/or modes." ;; highlight uncommitted changes in the left fringe (use-package diff-hl + :defer 0.6 :config (setq diff-hl-draw-borders nil) (global-diff-hl-mode) @@ -1366,13 +1371,19 @@ For disabling the behaviour for certain buffers and/or modes." (use-package multi-term :defer 0.6 - :bind (("C-c a s m" . multi-term-dedicated-toggle) + :bind (("C-c a s m m" . multi-term) + ("C-c a s m d" . multi-term-dedicated-toggle) + ("C-c a s m p" . multi-term-prev) + ("C-c a s m n" . multi-term-next) :map term-mode-map ("C-c C-j" . term-char-mode) :map term-raw-map ("C-c C-j" . term-line-mode)) :config - (setq multi-term-program "/bin/screen" + (setq multi-term-program "screen" + multi-term-program-switches (concat "-c" + (getenv "XDG_CONFIG_HOME") + "/screen/screenrc") ;; TODO: add separate bindings for connecting to existing ;; session vs. always creating a new one multi-term-dedicated-select-after-open-p t @@ -1382,18 +1393,34 @@ For disabling the behaviour for certain buffers and/or modes." '(("C-c C-c" . term-interrupt-subjob) ("C-c C-e" . term-send-esc) ("C-k" . kill-line) - ("C-y" . term-paste) + ;; ("C-y" . term-paste) + ("C-y" . term-send-raw) ("M-f" . term-send-forward-word) ("M-b" . term-send-backward-word) ("M-p" . term-send-up) ("M-n" . term-send-down) + ("M-j" . term-send-raw-meta) + ("M-y" . term-send-raw-meta) + ("M-/" . term-send-raw-meta) + ("M-0" . term-send-raw-meta) + ("M-1" . term-send-raw-meta) + ("M-2" . term-send-raw-meta) + ("M-3" . term-send-raw-meta) + ("M-4" . term-send-raw-meta) + ("M-5" . term-send-raw-meta) + ("M-6" . term-send-raw-meta) + ("M-7" . term-send-raw-meta) + ("M-8" . term-send-raw-meta) + ("M-9" . term-send-raw-meta) ("" . term-send-backward-kill-word) ("" . term-send-backward-kill-word) ("M-d" . term-send-delete-word) ("M-," . term-send-raw) ("M-." . comint-dynamic-complete)) term-unbind-key-alist - '("C-z" "C-x" "C-c" "C-h" "C-y" ""))) + '("C-z" "C-x" "C-c" "C-h" + ;; "C-y" + ""))) (use-package page-break-lines :defer 0.5 @@ -1517,19 +1544,19 @@ For disabling the behaviour for certain buffers and/or modes." (nnimap-address "127.0.0.1") (nnimap-server-port 143) (nnimap-authenticator plain) - (nnimap-user "amin@bndl.org")) - (nnimap "uwaterloo" + (nnimap-user "amin@bndl.local")) + (nnimap "uw" (nnimap-stream plain) (nnimap-address "127.0.0.1") (nnimap-server-port 143) (nnimap-authenticator plain) - (nnimap-user "abandali@uwaterloo.ca")) - (nnimap "csclub" + (nnimap-user "abandali@uw.local")) + (nnimap "csc" (nnimap-stream plain) (nnimap-address "127.0.0.1") (nnimap-server-port 143) (nnimap-authenticator plain) - (nnimap-user "abandali@csclub.uw"))) + (nnimap-user "abandali@csc.uw.local"))) gnus-message-archive-group "nnimap+amin:Sent" gnus-parameters '(("gnu\\.deepspec" @@ -1676,12 +1703,12 @@ For disabling the behaviour for certain buffers and/or modes." (to "webmasters-comment@gnu.org") (body "Added to 2019supporters.html.\n\nMoving to campaigns.\n\n-amin\n") (eval (setq a/message-cite-say-hi nil))) - ("nnimap\\+uwaterloo:.*" + ("nnimap\\+uw:.*" (address "abandali@uwaterloo.ca") - (gcc "\"nnimap+uwaterloo:Sent Items\"")) - ("nnimap\\+csclub:.*" + (gcc "\"nnimap+uw:Sent Items\"")) + ("nnimap\\+csc:.*" (address "abandali@csclub.uwaterloo.ca") - (gcc "nnimap+csclub:Sent"))))) + (gcc "nnimap+csc:Sent"))))) (use-feature gnus-topic :hook (gnus-group-mode . gnus-topic-mode) @@ -1696,6 +1723,15 @@ For disabling the behaviour for certain buffers and/or modes." :config (setq gnus-permanently-visible-groups "\\(:INBOX$\\|:gnu$\\)")) +(use-feature gnus-win + :config + (setq gnus-use-full-window nil)) + +(use-feature gnus-dired + :commands gnus-dired-mode + :init + (add-hook 'dired-mode-hook 'gnus-dired-mode)) + (use-feature mm-decode :config (setq mm-discouraged-alternatives '("text/html" "text/richtext")))