diff options
| author | tslil clingman <> | 2020-05-05 20:26:45 -0700 |
|---|---|---|
| committer | tslil clingman <> | 2020-05-05 20:26:45 -0700 |
| commit | 5035096a71436a47821fce05ef7a559095999e0f (patch) | |
| tree | d0de0427aa476d3bf184cda58c615a4b9f0819f2 /emacs/inits | |
| parent | 1d2c9def58d0ee5bd69c5f985ca97538cdf93c9b (diff) | |
Something close to correct for EXWM+workspaces+statusbar
Diffstat (limited to 'emacs/inits')
| -rw-r--r-- | emacs/inits/00-exwm.el | 38 | ||||
| -rw-r--r-- | emacs/inits/01-basic.el | 4 | ||||
| -rw-r--r-- | emacs/inits/02-modeline.el | 23 | ||||
| -rw-r--r-- | emacs/inits/11-selectrum.el | 6 | ||||
| -rw-r--r-- | emacs/inits/20-programming.el | 20 | ||||
| -rw-r--r-- | emacs/inits/24-latex.el | 10 | ||||
| -rw-r--r-- | emacs/inits/70-global-keybinds.el | 2 |
7 files changed, 47 insertions, 56 deletions
diff --git a/emacs/inits/00-exwm.el b/emacs/inits/00-exwm.el index e9fa71c..647c5c1 100644 --- a/emacs/inits/00-exwm.el +++ b/emacs/inits/00-exwm.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2020-04-28 11:04:55 (tslil@bison)> +;; Time-stamp: <2020-05-05 20:25:35 (tslil@bison)> (defun banish-rat () (interactive) @@ -90,7 +90,8 @@ (advice-add 'exwm-workspace-switch-create :after #'exwm-workspace-track-changes) (defun exwm-sanitise-workspace-last-index () - (when (> (1+ exwm-workspace-last-idx) (exwm-workspace--count)) + (when (and (< 0 (exwm-workspace--count)) + (> (1+ exwm-workspace-last-idx) (exwm-workspace--count))) (setq exwm-workspace-last-idx exwm-workspace-current-idx) (exwm-update-workspace-lighter))) @@ -130,21 +131,6 @@ (exwm-systemtray-enable) (setq exwm-systemtray-height 24) - ;; ----------------------------------------------------------------------------- - ;; Statusbar.el - - (add-to-list 'load-path (expand-file-name "~/.emacs.d/scripts/statusbar.el/")) - (use-package posframe :ensure t) - (use-package statusbar - :config - (advice-add 'exwm-update-workspace-lighter :after #'statusbar-refresh) - (setq statusbar-modeline-variables '(exwm-workspace-lighter display-time-string))) - - ;; This is an awful hack, i'm not sure why i can't just run this immediately after EXWM - (push (lambda () - (statusbar-mode 1) - (exwm-update-workspace-lighter)) exwm-init-hook) - ;; ------------------------------------------------------------------- ;; RandR @@ -161,6 +147,24 @@ (use-package exwm-edit :ensure t + :if (and exwm-state (window-system)) :config (add-hook 'exwm-edit-compose-hook (lambda () (text-mode)))) + +;; ----------------------------------------------------------------------------- +;; Statusbar.el + +(use-package posframe + :defer 1 ;; HACK: why can't i just run this immediately after EXWM? + :if (and (window-system) (fboundp 'exwm-systemtray-enable)) + :ensure t) + +(use-package statusbar + :if (and (window-system) (fboundp 'exwm-systemtray-enable)) + :after posframe + :load-path "~/.emacs.d/scripts/statusbar.el/" + :config + (advice-add 'exwm-update-workspace-lighter :after #'statusbar-refresh) + (setq statusbar-modeline-variables '(exwm-workspace-lighter display-time-string)) + (statusbar-mode +1)) diff --git a/emacs/inits/01-basic.el b/emacs/inits/01-basic.el index ecbfb45..34cb359 100644 --- a/emacs/inits/01-basic.el +++ b/emacs/inits/01-basic.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2020-04-16 10:44:32 (tslil@bison)> +;; Time-stamp: <2020-04-24 17:52:36 (tslil@bison)> ;; ----------------------------------------------------------------------------- ;; Interface @@ -41,7 +41,7 @@ (when (eq 'x (window-system)) (load-theme 'modus-operandi t) (set-face-attribute 'region nil :background "orange") - (set-face-attribute 'default nil :font "Iosevka-13")) + (set-face-attribute 'default nil :font "Iosevka-14")) (set-fringe-style 0) ;; (set-fringe-mode 128) diff --git a/emacs/inits/02-modeline.el b/emacs/inits/02-modeline.el index 9df8889..e4fef10 100644 --- a/emacs/inits/02-modeline.el +++ b/emacs/inits/02-modeline.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2020-04-26 20:33:20 (tslil@bison)> +;; Time-stamp: <2020-05-05 20:25:50 (tslil@bison)> ;; ----------------------------------------------------------------------------- ;; Mode-line @@ -26,21 +26,7 @@ ;; indicator in a posfrmae as provided by statusbar.el. Othewrise, use ;; minibuffer-line as the central location. -(if (fboundp 'exwm-systemtray-enable) - (progn - ;; ----------------------------------------------------------------------------- - ;; Statusbar.el - (add-to-list 'load-path (expand-file-name "~/.emacs.d/scripts/statusbar.el/")) - (use-package posframe :ensure t) - (use-package statusbar - :config - (advice-add 'exwm-update-workspace-lighter :after #'statusbar-refresh) - (setq statusbar-modeline-variables '(exwm-workspace-lighter display-time-string)) - (statusbar-mode 1) - (exwm-update-workspace-lighter))) - ;; ----------------------------------------------------------------------------- - ;; Not running under EXWM, use minibuffer-line - ;; +(unless (fboundp 'exwm-systemtray-enable) ;; First we define two ``modules'' for use in the mode-line ;; ----------------------------------------------------------------------------- @@ -98,10 +84,7 @@ (insert (format-mode-line minibuffer-line-format 'minibuffer-line)) (setq fill-column (frame-width)) (center-line))) - (minibuffer-line-mode 1) - - (when (symbolp exwm-workspace-switch-hook) - (push #'minibuffer-line--update exwm-workspace-switch-hook))) + (minibuffer-line-mode 1)) ;; really want to hook buffer changes at all, and focus (add-hook 'minibuffer-exit-hook #'minibuffer-line--update)) diff --git a/emacs/inits/11-selectrum.el b/emacs/inits/11-selectrum.el index 5704635..aea43d3 100644 --- a/emacs/inits/11-selectrum.el +++ b/emacs/inits/11-selectrum.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2020-04-24 14:39:20 (tslil@bison)> +;; Time-stamp: <2020-05-04 13:08:01 (tslil@bison)> (use-package deadgrep :ensure t @@ -15,6 +15,7 @@ (insert (selectrum-completing-read "Yank: " (delete-dups kill-ring) nil t)))) (use-package selectrum + :ensure t :bind (("C-x f" . selectrum-recentf) ("M-y" . selectrum-yank)) :config @@ -25,9 +26,6 @@ (setq enable-recursive-minibuffers t) (selectrum-mode +1)) -(use-package prescient - :ensure t) - (use-package selectrum-prescient :ensure t :config diff --git a/emacs/inits/20-programming.el b/emacs/inits/20-programming.el index 69d71b1..1ca76e0 100644 --- a/emacs/inits/20-programming.el +++ b/emacs/inits/20-programming.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2020-04-24 14:51:05 (tslil@bison)> +;; Time-stamp: <2020-04-25 21:17:05 (tslil@bison)> ;; ----------------------------------------------------------------------------- ;; General setup @@ -10,10 +10,10 @@ ;; ad-do-it)) ;; Resize to fill column (and a little bit) -(defadvice compile (after resize-window-properly activate) - (let ((ww (window-width))) - (when (< ww (+ 5 fill-column)) - (enlarge-window-horizontally (- (+ 5 fill-column) ww))))) +;; (defadvice compile (after resize-window-properly activate) +;; (let ((ww (window-width))) +;; (when (< ww (+ 5 fill-column)) +;; (enlarge-window-horizontally (- (+ 5 fill-column) ww))))) (defun programming-setup () (subword-mode 1) @@ -187,5 +187,11 @@ (setq verilog-tool 'verilog-compiler) (verilog-set-compile-command))) :config - (setq-default verilog-compiler "iverilog" - verilog-tool 'verilog-compiler)) + (setq verilog-compiler "iverilog" + verilog-tool 'verilog-compiler)) + +(use-package gforth + :commands forth-mode + :mode (("\\.fs$" . forth-mode) + ("\\.fb$" . forth-block-mode) + ("\\.4th$" . forth-mode))) diff --git a/emacs/inits/24-latex.el b/emacs/inits/24-latex.el index 0119cae..cadcd78 100644 --- a/emacs/inits/24-latex.el +++ b/emacs/inits/24-latex.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2020-04-23 20:45:55 (tslil@bison)> +;; Time-stamp: <2020-05-04 13:55:07 (tslil@bison)> (defvar latex-template-dir (expand-file-name "~/academic/typeset/latex-templates")) (defun prompt-latex-file-template () @@ -33,10 +33,9 @@ populated from the directory *latex-template-dir*" (use-package pdf-tools :demand :ensure t - ;; :bind (:map pdf-view-mode-map - ;; ("C-s" . isearch-forward)) - :config - (pdf-tools-install)) + :defer t) +;; :bind (:map pdf-view-mode-map +;; ("C-s" . isearch-forward)) (use-package latex :ensure auctex @@ -56,6 +55,7 @@ populated from the directory *latex-template-dir*" (company-auctex-init) (siege-mode 1) (cdm-mode) + (pdf-tools-install) (prompt-latex-file-template))) :init (defun better-TeX-insert-single-quote () diff --git a/emacs/inits/70-global-keybinds.el b/emacs/inits/70-global-keybinds.el index c86419a..fc46811 100644 --- a/emacs/inits/70-global-keybinds.el +++ b/emacs/inits/70-global-keybinds.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2020-04-24 14:34:02 (tslil@bison)> +;; Time-stamp: <2020-05-03 20:35:38 (tslil@bison)> (setq time-stamp-active t time-stamp-line-limit 3 |
