From 475f4dc3d514edef85633999809bb028aff01b97 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Wed, 21 Dec 2022 22:37:36 +0100 Subject: 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 --- init.scm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'init.scm') 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) -- cgit v1.2.3