StumpWM: command to toggle window floating

This commit is contained in:
Marcel Kapfer 2018-02-03 18:26:33 +01:00
parent 433e6e1a07
commit 60bfaa9e49
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -208,6 +208,16 @@
(run-commands (concatenate 'string "gselect " n))
(echo (concatenate 'string "Switched to " n)))
;; toggle window floating
(defcommand toggle-float ()
()
"Toggle weather window is floating or not"
(if (typep (current-window) 'STUMPWM::FLOAT-WINDOW)
(unfloat-this)
(float-this)))
;; and the key for it
(define-key *root-map* (kbd "C-f") "toggle-float")
;; working with emacsclient
(defvar *es-win* nil
"to hold the window called emacsclient")