X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/14bd63980f1a70d007f2fa8476892870fb4199db..78f2a2b0d40c9d427c71cbd11cc9e3b59dc77b7e:/.emacs.d/init.el diff --git a/.emacs.d/init.el b/.emacs.d/init.el index eb739a4..4449544 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -184,6 +184,9 @@ ;;; Initial setup +(defvar b/exwm-p (string= (system-name) "jirud") + "Whether or not we will be using `exwm'.") + ;; keep ~/.emacs.d clean (use-package no-littering :demand @@ -394,7 +397,7 @@ For disabling the behaviour for certain buffers and/or modes." ;; time and battery in mode-line (use-feature time - :disabled + :if b/exwm-p :demand :config (display-time-mode) @@ -403,7 +406,7 @@ For disabling the behaviour for certain buffers and/or modes." (display-time-format "%a %b %-e, %-l:%M%P")) (use-feature battery - :disabled + :if b/exwm-p :demand :config (display-battery-mode) @@ -568,7 +571,7 @@ For disabling the behaviour for certain buffers and/or modes." ;;; Essential packages (use-package exwm - :disabled + :if b/exwm-p :demand :config ;; make class name the buffer name, truncating beyond 60 characters @@ -764,18 +767,7 @@ around if needed." :config (exwm-randr-enable) :custom - (exwm-randr-workspace-monitor-plist '(1 "VGA-1")) - :hook - (exwm-randr-screen-change . (lambda () - (let ((xrandr - (string-join - '("xrandr" - "--output VGA-1" - "--same-as LVDS-1" - "--auto") - " "))) - (start-process-shell-command - "xrandr" nil xrandr))))) + (exwm-randr-workspace-monitor-plist '(1 "VGA-1"))) (use-feature exwm-systemtray :demand @@ -1517,10 +1509,10 @@ This function is intended for use with `ivy-ignore-buffers'." (load-theme 'tangomod t) (use-package smart-mode-line - :disabled :commands (sml/apply-theme) :demand :config + (setq sml/theme 'tangomod) (sml/setup) (smart-mode-line-enable)) @@ -1539,6 +1531,7 @@ This function is intended for use with `ivy-ignore-buffers'." (load-theme 'solarized-light t)) (use-package moody + :disabled :demand :config (setq x-underline-at-descent-line t) @@ -1552,6 +1545,11 @@ This function is intended for use with `ivy-ignore-buffers'." (moody-replace-mode-line-buffer-identification) (moody-replace-vc-mode)) +(use-package mini-modeline + :disabled + :demand + :config (mini-modeline-mode)) + (defvar b/org-mode-font-lock-keywords '(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)" (1 '(:foreground "#5a5b5a" :background "#292b2b") t) ; directive @@ -1564,18 +1562,22 @@ This function is intended for use with `ivy-ignore-buffers'." (interactive) (mapc #'disable-theme custom-enabled-themes) (load-theme 'tangomod t) - ;; (sml/apply-theme 'automatic) + (sml/apply-theme 'tangomod) (font-lock-remove-keywords - 'org-mode b/org-mode-font-lock-keywords)) + 'org-mode b/org-mode-font-lock-keywords) + (when (featurep 'exwm-systemtray) + (exwm-systemtray--refresh))) (defun b/lights-off () "Go dark." (interactive) (mapc #'disable-theme custom-enabled-themes) (load-theme 'doom-one t) - ;; (sml/apply-theme 'automatic) + (sml/apply-theme 'automatic) (font-lock-add-keywords - 'org-mode b/org-mode-font-lock-keywords t)) + 'org-mode b/org-mode-font-lock-keywords t) + (when (featurep 'exwm-systemtray) + (exwm-systemtray--refresh))) (bind-keys ("C-c t d" . b/lights-off) @@ -1898,11 +1900,18 @@ This function is intended for use with `ivy-ignore-buffers'." (use-feature window :bind - (("C-c w " . split-window-right) - ("C-c w " . split-window-below) - ("C-c w s l" . split-window-right) - ("C-c w s j" . split-window-below) - ("C-c w q" . quit-window)) + (("C-c w s l" . b/split-window-right) + ("C-c w s j" . b/split-window-below) + ("C-c w q" . quit-window)) + :init + (defun b/split-window-right () + (interactive) + (split-window-right) + (other-window 1)) + (defun b/split-window-below () + (interactive) + (split-window-below) + (other-window 1)) :custom (split-width-threshold 150)) @@ -1932,7 +1941,9 @@ This function is intended for use with `ivy-ignore-buffers'." ("" . pdf-history-forward) ("" . pdf-history-forward) ("" . pdf-history-forward) - ("M-RET" . image-previous-line)) + ("M-RET" . image-previous-line) + ("C-s" . isearch-forward) + ("s s" . isearch-forward)) :config (pdf-tools-install nil t) :custom (pdf-view-resize-factor 1.05)) @@ -2092,6 +2103,9 @@ This function is intended for use with `ivy-ignore-buffers'." ("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")) @@ -2448,7 +2462,6 @@ https://csclub.uwaterloo.ca/~abandali") (defun company-ebdb--post-complete (_) nil)) (use-feature ebdb-gnus - :demand :after ebdb :custom (ebdb-gnus-window-size 0.3))