mirror of
https://github.com/stumpwm/stumpwm-contrib.git
synced 2026-09-10 07:26:25 -04:00
Adds a list of default commands.
This commit is contained in:
parent
c92dc3c88c
commit
73739fbc34
|
|
@ -27,13 +27,14 @@ needs to hook into stumpwm to dump layouts.
|
|||
|
||||
You *have* to add the hooks yourself.
|
||||
|
||||
Here are the minimum hooks you want to add:
|
||||
For convenience, =winner-mode= provides a list of commands in
|
||||
=winner-mode:*default-commands*=, so you can just add this hook to
|
||||
start off:
|
||||
|
||||
#+BEGIN_SRC lisp
|
||||
(add-hook *new-frame-hook* #'winner-mode:dump-group-to-file)
|
||||
(add-hook *new-window-hook* #'winner-mode:dump-group-to-file)
|
||||
(add-hook *destroy-window-hook* #'winner-mode:dump-group-to-file)
|
||||
(add-hook *place-window-hook* #'winner-mode:dump-group-to-file)
|
||||
(add-hook *post-command-hook* (lambda (command)
|
||||
(when (member command winner-mode:*default-commands*)
|
||||
(winner-mode:dump-group-to-file))))
|
||||
#+END_SRC
|
||||
|
||||
** Example
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
(defpackage #:winner-mode
|
||||
(:use :cl)
|
||||
(:export :winner-undo :winner-redo :*tmp-folder* :dump-group-to-file))
|
||||
(:export :winner-undo :winner-redo :*tmp-folder* :dump-group-to-file :*default-commands*))
|
||||
|
|
|
|||
|
|
@ -3,3 +3,32 @@
|
|||
(defvar *current-ids* (make-hash-table))
|
||||
(defvar *max-ids* (make-hash-table))
|
||||
(defvar *tmp-folder* #p"/tmp/")
|
||||
(defvar *default-commands*
|
||||
'(stumpwm:only
|
||||
stumpwm:pull-from-windowlist
|
||||
stumpwm:pull-hidden-next
|
||||
stumpwm:pull-hidden-other
|
||||
stumpwm:pull-hidden-previous
|
||||
stumpwm:pull-marked
|
||||
stumpwm:pull-window-by-number
|
||||
stumpwm:next
|
||||
stumpwm:next-in-frame
|
||||
stumpwm:next-urgent
|
||||
stumpwm:prev
|
||||
stumpwm:prev-in-frame
|
||||
stumpwm:select-window
|
||||
stumpwm:select-from-menu
|
||||
stumpwm:select-window-by-name
|
||||
stumpwm:select-window-by-number
|
||||
stumpwm::pull
|
||||
stumpwm::remove
|
||||
stumpwm:iresize
|
||||
stumpwm:vsplit
|
||||
stumpwm:hsplit
|
||||
stumpwm:move-window
|
||||
stumpwm:move-windows-to-group
|
||||
stumpwm:move-window-to-group
|
||||
stumpwm:balance-frames
|
||||
stumpwm::delete
|
||||
stumpwm::kill
|
||||
stumpwm:fullscreen))
|
||||
|
|
|
|||
Loading…
Reference in a new issue