[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm f4b8cc4 11/19: Support moving workspaces
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm f4b8cc4 11/19: Support moving workspaces |
Date: |
Tue, 19 Jul 2016 03:07:08 +0000 (UTC) |
branch: externals/exwm
commit f4b8cc47c7a00456566a8a794cd9ee0bf06efaaa
Author: Adrián Medraño Calvo <address@hidden>
Commit: Adrián Medraño Calvo <address@hidden>
Support moving workspaces
* exwm-workspace.el (exwm-workspace-move-workspace): New function
to move a workspace to a certain position.
---
exwm-workspace.el | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 8627432..9bbbf2a 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -396,7 +396,7 @@ The optional FORCE option is for internal use only."
;;;###autoload
(defun exwm-workspace-swap-workspaces (workspace1 workspace2)
- "Swap position of WORKSPACE1 with that of WORKSPACE2."
+ "Interchange position of WORKSPACE1 with that of WORKSPACE2."
(interactive
(unless (and (eq major-mode 'exwm-mode) exwm--fullscreen) ;it's invisible
(list
@@ -415,6 +415,20 @@ The optional FORCE option is for internal use only."
(setq exwm-workspace-current-index pos1))))
(user-error "[EXWM] Frames are not workspaces"))))
+;;;###autoload
+(defun exwm-workspace-move-workspace (workspace nth)
+ "Move WORKSPACE to the NTH position.
+When called interactively, prompt for a workspace and move current one just
+before it."
+ (interactive
+ (unless (and (eq major-mode 'exwm-mode) exwm--fullscreen) ;it's invisible
+ (list exwm-workspace--current
+ (exwm-workspace--position (exwm-workspace--prompt-for-workspace)))))
+ (let ((pos (exwm-workspace--position workspace)))
+ (if (= nth pos)
+ (user-error "[EXWM] Cannot move to same position")
+ (pop (nthcdr pos exwm-workspace--list))
+ (push workspace (nthcdr nth exwm-workspace--list)))))
(defun exwm-workspace--on-focus-in ()
"Handle unexpected frame switch."
- [elpa] externals/exwm updated (c22f356 -> b409d87), Chris Feng, 2016/07/18
- [elpa] externals/exwm ed6a18a 04/19: Add `exwm-workspace--position' helper, Chris Feng, 2016/07/18
- [elpa] externals/exwm f4b8cc4 11/19: Support moving workspaces,
Chris Feng <=
- [elpa] externals/exwm 9018545 06/19: New function exwm-workspace--workspace-p, Chris Feng, 2016/07/18
- [elpa] externals/exwm cd1372e 03/19: Apply minibuffer in own frame configuration to created frames, Chris Feng, 2016/07/18
- [elpa] externals/exwm d0797d0 13/19: Remove `exwm-worspace-number', Chris Feng, 2016/07/18
- [elpa] externals/exwm 18fc95d 01/19: Minor cleanup, Chris Feng, 2016/07/18
- [elpa] externals/exwm 983fd46 02/19: Add missing declarations, Chris Feng, 2016/07/18
- [elpa] externals/exwm 35e1655 07/19: Move defvars to the top, Chris Feng, 2016/07/18
- [elpa] externals/exwm e491118 10/19: Support swapping workspaces, Chris Feng, 2016/07/18
- [elpa] externals/exwm 8e2da00 05/19: Add helper for counting number of workspaces, Chris Feng, 2016/07/18
- [elpa] externals/exwm 2de2d42 09/19: Factor out prompt for workspace, Chris Feng, 2016/07/18
- [elpa] externals/exwm b51f3e6 18/19: Mention dynamic workspace in various places, Chris Feng, 2016/07/18