diff options
| author | tslil clingman <> | 2020-04-24 14:51:42 -0700 |
|---|---|---|
| committer | tslil clingman <> | 2020-04-24 14:51:42 -0700 |
| commit | 18bb5178ea2d2d1f2f0e788ab33bfbdf59376837 (patch) | |
| tree | 89e597d08d0a1d656a1a5f4772c7e138fb36a0e9 /emacs/inits/00-exwm.el | |
| parent | 6ba333c21a29be757a5f7735ae8bcde153346e60 (diff) | |
EXWM workspace fixes & tray, Verilog, still not good input method
Diffstat (limited to 'emacs/inits/00-exwm.el')
| -rw-r--r-- | emacs/inits/00-exwm.el | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/emacs/inits/00-exwm.el b/emacs/inits/00-exwm.el index 7ad3deb..7735629 100644 --- a/emacs/inits/00-exwm.el +++ b/emacs/inits/00-exwm.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2020-04-01 22:13:15 (tslil@bison)> +;; Time-stamp: <2020-04-21 19:17:12 (tslil@bison)> (defun banish-rat () (interactive) @@ -65,22 +65,36 @@ (exwm-workspace-switch-create ,i)))) ;; buffer and window management - (exwm-input-set-key (kbd "s-<tab>") 'next-buffer) + (exwm-input-set-key (kbd "s-SPC") 'switch-to-buffer) + + (defvar exwm-workspace-last-index 0) + + (defun exwm-workspace-lighter () + (format " @%d (*%d)" exwm-workspace-current-index exwm-workspace-last-index)) + + (defun exwm-store-workspace-last-index (next) + (when (/= next exwm-workspace-current-index) + (setq exwm-workspace-last-index exwm-workspace-current-index))) + + (advice-add 'exwm-workspace-switch-create :before #'exwm-store-workspace-last-index) + ;; (advice-add 'exwm-workspace-switch :before #'exwm-store-workspace-last-index) + + (defun exwm-sanitise-workspace-last-index () + (when (> (1+ exwm-workspace-last-index) (exwm-workspace--count)) + (setq exwm-workspace-last-index exwm-workspace-current-index))) + + (push #'exwm-sanitise-workspace-last-index exwm-workspace-list-change-hook) - (defvar exwm-last-workspace-index 0) (defun exwm-last-workspace () (interactive) - (let ((temp exwm-workspace-current-index)) - (exwm-workspace-switch exwm-last-workspace-index) - (setq exwm-last-workspace-index temp))) + (exwm-workspace-switch-create exwm-workspace-last-index)) (defun exwm-last-buffer () (interactive) (switch-to-buffer (other-buffer (current-buffer) 1))) - (exwm-input-set-key (kbd "s-n") 'ivy-switch-buffer) (exwm-input-set-key (kbd "s-o") 'exwm-last-buffer) - (exwm-input-set-key (kbd "s-\\") 'exwm-last-workspace) + (exwm-input-set-key (kbd "s-<tab>") 'exwm-last-workspace) (exwm-input-set-key (kbd "s-b") 'banish-rat) @@ -99,6 +113,12 @@ (start-process-shell-command command nil command))) ;; ------------------------------------------------------------------- + ;; Tray + + (require 'exwm-systemtray) + (exwm-systemtray-enable) + + ;; ------------------------------------------------------------------- ;; RandR (require 'exwm-randr) |
