summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jakob.org34
1 files changed, 34 insertions, 0 deletions
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 <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

© 2015 - 2026 Jakob L. Kreuze