[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[STUMP] [PATCH] New command "grouplist" for a menu-based group selection
From: |
Lionel Flandrin |
Subject: |
[STUMP] [PATCH] New command "grouplist" for a menu-based group selection |
Date: |
Mon, 12 May 2008 14:14:17 +0200 |
---
user.lisp | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/user.lisp b/user.lisp
index 2f64dde..2379681 100644
--- a/user.lisp
+++ b/user.lisp
@@ -1521,6 +1521,7 @@ escape C-z
(define-key m (kbd "C-p") "gprev")
(define-key m (kbd "o") "gother")
(define-key m (kbd "'") "gselect")
+ (define-key m (kbd "\"") "grouplist")
(define-key m (kbd "m") "gmove")
(define-key m (kbd "M") "gmove-marked")
(define-key m (kbd "k") "gkill")
@@ -1629,6 +1630,17 @@ the default group formatting and window formatting,
respectively."
(when to-group
(switch-to-group to-group)))
+(defcommand grouplist (&optional (fmt *group-format*)) (:rest)
+ "Allow the user to select a group from a list, like windowlist but
+ for groups"
+ (let ((group (second (select-from-menu
+ (current-screen)
+ (mapcar (lambda (g)
+ (list (format-expand *group-formatters* fmt g) g))
+ (screen-groups (current-screen)))))))
+ (when group
+ (switch-to-group group))))
+
(defcommand gmove (to-group) ((:group "To Group: "))
"Move the current window to the specified group."
(when (and to-group
--
1.5.5
- [STUMP] [PATCH] New command "grouplist" for a menu-based group selection,
Lionel Flandrin <=