summaryrefslogtreecommitdiff
path: root/.config/stumpwm/commands.lisp
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-03-09 14:24:35 +0200
committerThanos Apollo <[email protected]>2023-03-09 14:24:35 +0200
commit4a2e50a9e42d0a8fd8a7178a8e0ad7d11f67d7d3 (patch)
treedc78f29b51e22fc7cd50238eab57219e005f7733 /.config/stumpwm/commands.lisp
parent5068573c04ca9537469d921bda489f2cacf5f215 (diff)
stumpwm: Add commands
Diffstat (limited to '.config/stumpwm/commands.lisp')
-rw-r--r--.config/stumpwm/commands.lisp29
1 files changed, 29 insertions, 0 deletions
diff --git a/.config/stumpwm/commands.lisp b/.config/stumpwm/commands.lisp
new file mode 100644
index 0000000..a47040e
--- /dev/null
+++ b/.config/stumpwm/commands.lisp
@@ -0,0 +1,29 @@
+;; Commands
+
+(defcommand firefox () ()
+ "Run or raise Firefox."
+ (sb-thread:make-thread (lambda () (run-or-raise "firefox" '(:class "Firefox") t nil))))
+
+
+(defcommand delete-window-and-frame () ()
+ "Delete the current frame with its window."
+ (delete-window)
+ (remove-split))
+
+(defcommand hsplit-and-focus () ()
+ "Create a new frame on the right and focus it."
+ (hsplit)
+ (move-focus :right))
+
+(defcommand vsplit-and-focus () ()
+ "Create a new frame below and move focus to it."
+ (vsplit)
+ (move-focus :down))
+
+(defcommand term (&optional program) ()
+ "Invoke a terminal, possibly with a @arg{program}."
+ (sb-thread:make-thread
+ (lambda ()
+ (run-shell-command (if program
+ (format nil "kitty ~A" program)
+ "kitty")))))