From 9e85fd42b1e4e196b2c6f66a8e98df6701a4a59b Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Sun, 24 Mar 2019 11:29:23 -0400 Subject: Add configuration for using WIP exwm-buffer-groups --- jakob.org | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'jakob.org') diff --git a/jakob.org b/jakob.org index e8cb92d..eff4e9c 100644 --- a/jakob.org +++ b/jakob.org @@ -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 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 -- cgit v1.3