summaryrefslogtreecommitdiff
path: root/init.scm
diff options
context:
space:
mode:
authorSamuel Fadel <samuel@nihil.ws>2022-12-21 22:37:36 +0100
committerSamuel Fadel <samuel@nihil.ws>2022-12-21 22:37:36 +0100
commit475f4dc3d514edef85633999809bb028aff01b97 (patch)
tree0e44a699c02670cca0732b7eeac9a07fbed32e16 /init.scm
parente48ed1e15400fcc42c513870f84bca5277cc1579 (diff)
Fix border drawing in tile toggling functions & launcher impl.
* init.scm: Launcher impl and helpers * wm.scm: Launcher with fork & execlp (execvp) * schewm.c: Fix border by explicitly calling border drawing proc after restoring window size
Diffstat (limited to 'init.scm')
-rw-r--r--init.scm19
1 files changed, 17 insertions, 2 deletions
diff --git a/init.scm b/init.scm
index b712add..b24432d 100644
--- a/init.scm
+++ b/init.scm
@@ -19,12 +19,27 @@
"#0d131a" ; outer-color
))
-(define (make-callback proc arg)
- (lambda () (proc arg)))
+(define (make-callback proc . args)
+ (lambda () (apply proc args)))
+
+(define terminal-cmd "xterm")
+
+(define menu-raw-callback
+ (make-callback wm-exec-cmd "bemenu" "-b" "-s" "-l" "10" "-p" ">>>"))
+
+(define menu-callback
+ (make-callback
+ wm-exec-cmd
+ "j4-dmenu-desktop"
+ "--dmenu=bemenu -b -i -s -l 10 -p >>>"
+ (string-append "--term=" terminal-cmd)))
(define wm-keybindings
`((,(make-shift-key "q") . ,wm-quit)
(,(make-key "q") . ,wm-focus-close)
+ (,(make-shift-key "p") . ,menu-raw-callback)
+ (,(make-key "p") . ,menu-callback)
+ (,(make-key "Enter") . ,(make-callback wm-exec-cmd terminal-cmd))
;; Focus
(,(make-key "Tab") . ,wm-focus-prev)
(,(make-shift-key "Tab") . ,wm-focus-next)