about summary refs log tree commit diff
path: root/users/wpcarro/emacs/.emacs.d/wpc/window-manager.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2022-07-30T04·12-0700
committerclbot <clbot@tvl.fyi>2022-07-30T04·26+0000
commitd1ab0c7cbcda92114cce4d51b36aac5f07d26e4d (patch)
tree631c5ca2a5268394ecedada1db24a7937a7a341b /users/wpcarro/emacs/.emacs.d/wpc/window-manager.el
parent65fb82097bc35a8b06da6b8a1c4b36c0c459932d (diff)
feat(wpcarro/emacs): Package cycle.el r/4349
This will likely break a few things since I've changed the names of a few
functions to reflect their mutative APIs.

Change-Id: If6279999fba50813b68e66d7713c12afd209eb90
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6004
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/wpcarro/emacs/.emacs.d/wpc/window-manager.el')
-rw-r--r--users/wpcarro/emacs/.emacs.d/wpc/window-manager.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/users/wpcarro/emacs/.emacs.d/wpc/window-manager.el b/users/wpcarro/emacs/.emacs.d/wpc/window-manager.el
index 4c61138f94..94fb99d427 100644
--- a/users/wpcarro/emacs/.emacs.d/wpc/window-manager.el
+++ b/users/wpcarro/emacs/.emacs.d/wpc/window-manager.el
@@ -97,12 +97,12 @@
 (defun window-manager-next-workspace ()
   "Cycle forwards to the next workspace."
   (interactive)
-  (window-manager--change-workspace (cycle-next window-manager--workspaces)))
+  (window-manager--change-workspace (cycle-next! window-manager--workspaces)))
 
 (defun window-manager-prev-workspace ()
   "Cycle backwards to the previous workspace."
   (interactive)
-  (window-manager--change-workspace (cycle-prev window-manager--workspaces)))
+  (window-manager--change-workspace (cycle-prev! window-manager--workspaces)))
 
 ;; Here is the code required to toggle EXWM's modes.
 (defun window-manager--line-mode ()
@@ -120,7 +120,7 @@
   (interactive)
   (with-current-buffer (window-buffer)
     (when (eq major-mode 'exwm-mode)
-      (funcall (cycle-next window-manager--modes)))))
+      (funcall (cycle-next! window-manager--modes)))))
 
 (defun window-manager--label->index (label workspaces)
   "Return the index of the workspace in WORKSPACES named LABEL."
@@ -152,10 +152,10 @@ Currently using super- as the prefix for switching workspaces."
 
 (defun window-manager--switch (label)
   "Switch to a named workspaces using LABEL."
-  (cycle-focus (lambda (x)
-                 (equal label
-                        (window-manager-named-workspace-label x)))
-               window-manager--workspaces)
+  (cycle-focus! (lambda (x)
+                  (equal label
+                         (window-manager-named-workspace-label x)))
+                window-manager--workspaces)
   (window-manager--change-workspace (cycle-current window-manager--workspaces)))
 
 (defun window-manager-toggle-previous ()