summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.scm14
-rw-r--r--schewm.c14
-rw-r--r--wm.scm3
3 files changed, 30 insertions, 1 deletions
diff --git a/main.scm b/main.scm
index 8a34528..d048e8b 100644
--- a/main.scm
+++ b/main.scm
@@ -1,8 +1,20 @@
-(use-modules (wm))
+(use-modules (srfi srfi-9)
+ (wm))
+
+(define-record-type <wm-config>
+ (make-config border-width outer-border-width)
+ wm-config?
+ (border-width config-border-width set-config-border-width!)
+ (outer-border-width config-outer-border-width set-config-outer-border-width!))
+
+(define config
+ (make-config 2 0))
(when (wm-init)
(wm-set-configure-notify-handler!
(lambda (x y w h)
(display (+ x y w h))
(display "\n")))
+ (display config)
+ (display "\n")
(wm-quit))
diff --git a/schewm.c b/schewm.c
index 53919bd..e4c52fe 100644
--- a/schewm.c
+++ b/schewm.c
@@ -8,6 +8,20 @@
#include <xcb/xcb_keysyms.h>
#include <X11/keysym.h>
+static uint16_t mod_key = XCB_MOD_MASK_4;
+static const uint16_t SHIFT = XCB_MOD_MASK_SHIFT;
+
+void wm_set_mod_key(uint16_t mod) {
+ mod_key = mod;
+}
+
+uint16_t wm_get_mod_key(bool with_shift) {
+ if (with_shift) {
+ return mod_key | SHIFT;
+ }
+ return mod_key;
+}
+
/*
* Array of (internal) event handlers. They cast the event pointer to
* the proper type and call the custom handlers defined in Scheme.
diff --git a/wm.scm b/wm.scm
index 3d46652..fcd0bc9 100644
--- a/wm.scm
+++ b/wm.scm
@@ -34,3 +34,6 @@
(procedure->pointer void
handler
(list int16 int16 uint32 uint32))))
+
+(define (wm-set-keybind mod keysym handler)
+ )