diff options
author | Samuel Fadel <samuel@nihil.ws> | 2022-12-18 13:34:54 +0100 |
---|---|---|
committer | Samuel Fadel <samuel@nihil.ws> | 2022-12-18 13:34:54 +0100 |
commit | c33bba0db6e5c0d439a8aa5a1eb3a8a4ebcf03cf (patch) | |
tree | 554c8b793db509311aa0360ed825a91c5c40f19b /wm.scm | |
parent | ec2ecf9085d1c001b803d27261ecf7ae3fe6d298 (diff) |
WM reconfiguration code.
* main.scm: Added wm-reconifgure call to set initial config
* wm.scm: Added wiring to call C code for reconfiguration
* schewm.c: bugfix in ev_unmap_notify(); new wm_reconfigure() function
Diffstat (limited to 'wm.scm')
-rw-r--r-- | wm.scm | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -4,6 +4,7 @@ #:use-module (system foreign) #:export (wm-init make-config + wm-reconfigure make-key make-shift-key wm-grab-keys @@ -88,6 +89,42 @@ (define wm-run (schewm-func void "wm_run" '())) +(define c/parse-color + (schewm-func uint32 "parse_color" (list '*))) + +(define (parse-color s) + (c/parse-color (string->pointer s))) + +(define c/wm-reconfigure + (schewm-func void + "wm_reconfigure" + (list uint16 + uint16 + uint16 + int16 + int16 + uint16 + uint16 + uint32 + uint32 + uint32 + uint32 + uint32))) + +(define (wm-reconfigure config) + (c/wm-reconfigure (config-inner-border-width config) + (config-outer-border-width config) + (config-magnet-border-width config) + (config-offset-x config) + (config-offset-y config) + (config-offset-width config) + (config-offset-height config) + (parse-color (config-focused-color config)) + (parse-color (config-unfocused-color config)) + (parse-color (config-unkillable-color config)) + (parse-color (config-empty-color config)) + (parse-color (config-outer-color config)))) + (define wm-focus-prev (schewm-func void "wm_focus_prev" '())) |