summaryrefslogtreecommitdiff
path: root/wm.scm
diff options
context:
space:
mode:
authorSamuel Fadel <samuel@nihil.ws>2022-12-08 18:25:18 +0100
committerSamuel Fadel <samuel@nihil.ws>2022-12-08 18:25:18 +0100
commit6f54084c0ee63f4b341f8f92efbc8b82d3dfa224 (patch)
tree454e8d7cf51aa4cded69535d60ec56a753325034 /wm.scm
parent6bdaee03c0fd3caac390dffdaaf52d54653b1430 (diff)
Working example with keybindings done from Scheme.
* main.scm: Added utility and keybinding calls * wm.scm: Added necessary bindings to C code * schewm.c: Some utility functions for grabbing keys
Diffstat (limited to 'wm.scm')
-rw-r--r--wm.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/wm.scm b/wm.scm
index 3241d94..4609ea9 100644
--- a/wm.scm
+++ b/wm.scm
@@ -1,7 +1,11 @@
(define-module (wm)
#:use-module (system foreign)
#:export (wm-init
+ key-from-str
+ wm-grab-key-with-mod
+ wm-grab-key-with-mod-shift
wm-set-key-press-handler!
+ wm-focus-next
wm-run
wm-quit))
@@ -36,6 +40,17 @@
(define wm-run
(schewm-func void "wm_run" '()))
+(define wm-grab-key-with-mod
+ (schewm-func void "wm_grab_key_with_mod"
+ (list uint32)))
+
+(define wm-grab-key-with-mod-shift
+ (schewm-func void "wm_grab_key_with_mod_shift"
+ (list uint32)))
+
+(define (wm-focus-next)
+ '())
+
(define c/wm-set-key-press-handler
(schewm-func void
"wm_set_key_press_handler"