From 60bfaa9e49b0cb02a26b552207f1abdb33961d93 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 3 Feb 2018 18:26:33 +0100 Subject: [PATCH] StumpWM: command to toggle window floating --- stumpwm/stumpwmrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stumpwm/stumpwmrc b/stumpwm/stumpwmrc index 4039468..a5dcfad 100644 --- a/stumpwm/stumpwmrc +++ b/stumpwm/stumpwmrc @@ -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")