diff options
| author | Jakob L. Kreuze | 2019-03-24 11:29:23 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze | 2019-03-24 11:29:23 -0400 |
| commit | 9e85fd42b1e4e196b2c6f66a8e98df6701a4a59b (patch) | |
| tree | 0effad70108ff9436de7a914d445c2fd4e73bc66 /jakob.org | |
| parent | 2846e79af135400fa8ea86809267347f7649a524 (diff) | |
Add configuration for using WIP exwm-buffer-groups
Diffstat (limited to 'jakob.org')
| -rw-r--r-- | jakob.org | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -922,6 +922,40 @@ pinentry's job. (setq epa-pinentry-mode 'loopback)) #+END_SRC +** Workspaces + +This package is a work-in-progress, so until I fix it up to the point that it's +ready to be published on MELPA, I'll just pull it from sourcehut. + +#+BEGIN_SRC elisp +(straight-use-package + '(exwm-buffer-groups :type git :repo "https://git.sr.ht/~jakob/exwm-buffer-groups")) +(require 'exwm-buffer-groups) +#+END_SRC + +Replace <C-x b> with a version of =counsel-switch-buffer= adapted to work with +=exwm-buffer-groups=. + +#+BEGIN_SRC elisp +(defun counsel-switch-buffer-workspace () + "Switch to another buffer in the current workspace. +Display a preview of the selected ivy completion candidate buffer +in the current window." + (interactive) + (ivy-read "Switch to buffer: " + (map 'list + #'buffer-name + (elt exwm-buffer-groups-buffers exwm-workspace-current-index)) + :preselect (buffer-name (other-buffer (current-buffer))) + :action #'ivy--switch-buffer-action + :matcher #'ivy--switch-buffer-matcher + :caller 'counsel-switch-buffer + :unwind #'counsel--switch-buffer-unwind + :update-fn 'counsel--switch-buffer-update-fn)) + +(bind-key "C-x b" #'counsel-switch-buffer-workspace) +#+END_SRC + * System ** ag |