Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; Extension code for the Stump Window Manager
- ;; https://stumpwm.github.io/
- (defcommand grenumber (new-number &optional (screen (current-screen))) ((:number "Number: "))
- "Change the current group's number to the specified number. If another group
- is using the number, then the groups swap numbers. Defaults to current screen."
- (let* ((this-group (current-group screen))
- (current-number (group-number this-group))
- (other-group (find-if
- #'(lambda (grp) (= (group-number grp) new-number))
- (screen-groups screen))))
- ;; If another group has the new number, change it to the number of the
- ;; current group.
- (when other-group
- (setf (group-number other-group) current-number))
- ;; Now, set the current group to the new number.
- (setf (group-number this-group) new-number)))
Advertisement
Comments
-
- This seems like an obvious extension to Stump WM. I'm a bit surprised it's not already part of the baseline.
Add Comment
Please, Sign In to add comment
Advertisement