aboutsummaryrefslogtreecommitdiff
path: root/stumpwm/.stumpwm.d/window.lisp
diff options
context:
space:
mode:
authorBardofSprites <bard>2025-09-25 16:54:17 -0400
committerBardofSprites <bard>2025-09-25 16:54:17 -0400
commit78441a99ebc93d8f284a6a64c98fae5ef847184d (patch)
tree27cfc5fb695c8096d15a577a2fea07c36d601616 /stumpwm/.stumpwm.d/window.lisp
parentd0e9b38db5cdbba8c29f730f1c2eb5eb478fa776 (diff)
renamed
Diffstat (limited to 'stumpwm/.stumpwm.d/window.lisp')
-rw-r--r--stumpwm/.stumpwm.d/window.lisp38
1 files changed, 38 insertions, 0 deletions
diff --git a/stumpwm/.stumpwm.d/window.lisp b/stumpwm/.stumpwm.d/window.lisp
new file mode 100644
index 0000000..daa3ffc
--- /dev/null
+++ b/stumpwm/.stumpwm.d/window.lisp
@@ -0,0 +1,38 @@
+(in-package :stumpwm)
+
+;;;; Groups
+(grename "home")
+(gnew "alt")
+
+;;;; Window Format
+(setf *window-format* "%s%n%30t"
+ *window-border-style* :tight
+ *normal-border-width* 5
+ *maxsize-border-width* 5
+ )
+
+;;;; Gaps
+(load-module "swm-gaps")
+(setq swm-gaps:*gaps-on* t)
+
+;;; Focus
+(load-module "beckon")
+(defmacro with-focus-lost (&body body)
+ "Make sure WIN is on the top level while the body is running and
+restore it's always-on-top state afterwords"
+ `(progn (banish)
+ ,@body
+ (when (current-window)
+ (beckon:beckon))))
+;;; Splits
+(defcommand hsplit-and-focus () ()
+ "create a new frame on the right and focus it."
+ (with-focus-lost
+ (hsplit)
+ (move-focus :right)))
+
+(defcommand vsplit-and-focus () ()
+ "create a new frame below and focus it."
+ (with-focus-lost
+ (vsplit)
+ (move-focus :down)))