aboutsummaryrefslogtreecommitdiffstats
path: root/oni
diff options
context:
space:
mode:
authorGravatar Tom Willemse2022-04-06 23:44:55 -0700
committerGravatar Tom Willemse2022-04-06 23:44:55 -0700
commit15b1898664c41b60fefad9ba844efb5ee6a03af4 (patch)
tree7d36e78e827fb42ddccb69a829a99a3cca4a5148 /oni
parentfde6941d93f35b7cba4144a116df223fca0fe661 (diff)
downloadnew-dotfiles-15b1898664c41b60fefad9ba844efb5ee6a03af4.tar.gz
new-dotfiles-15b1898664c41b60fefad9ba844efb5ee6a03af4.zip
Add xbindkeys configuration
Diffstat (limited to 'oni')
-rw-r--r--oni/home/data/config.scm7
-rw-r--r--oni/home/services/xbindkeys.scm46
2 files changed, 51 insertions, 2 deletions
diff --git a/oni/home/data/config.scm b/oni/home/data/config.scm
index 7f47da0..070f4c2 100644
--- a/oni/home/data/config.scm
+++ b/oni/home/data/config.scm
@@ -12,7 +12,8 @@
#:use-module (oni home services xmodmap)
#:use-module (oni home services kitty)
#:use-module (oni home services xsession)
- #:use-module (oni home services compton))
+ #:use-module (oni home services compton)
+ #:use-module (oni home services xbindkeys))
(home-environment
(packages (list (specification->package+output "glibc-locales")
@@ -231,4 +232,6 @@
(shadow-radius . 10)
(shadow-exclude ("name = 'mowedline'"
"class_g = 'trayer'"
- "bounding_shaped")))))))))
+ "bounding_shaped"))))))
+
+ (service home-xbindkeys-service-type))))
diff --git a/oni/home/services/xbindkeys.scm b/oni/home/services/xbindkeys.scm
new file mode 100644
index 0000000..e832a07
--- /dev/null
+++ b/oni/home/services/xbindkeys.scm
@@ -0,0 +1,46 @@
+(define-module (oni home services xbindkeys)
+ #:use-module (gnu services configuration)
+ #:use-module (gnu packages xdisorg)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services shepherd)
+ #:use-module (gnu home services utils)
+ #:use-module (guix packages)
+ #:use-module (guix gexp)
+
+ #:export (home-xbindkeys-service-type
+ home-xbindkeys-configuration))
+
+(define-configuration/no-serialization home-xbindkeys-configuration
+ (package
+ (package xbindkeys)
+ "Package to use for setting xbindkeys"))
+
+(define (add-xbindkeys-packages config)
+ (list (home-xbindkeys-configuration-package config)))
+
+(define (home-xbindkeys-shepherd-service config)
+ (list
+ (shepherd-service
+ (documentation "Start xbindkeys")
+ (provision '(xbindkeys))
+ (auto-start? #t)
+ (start
+ #~(make-forkexec-constructor
+ (list #$(file-append (home-xbindkeys-configuration-package config) "/bin/xbindkeys")
+ "--nodaemon")
+ #:log-file (format #f "~a/.local/var/log/xbindkeys.scm" (getenv "HOME"))))
+ (stop #~(make-kill-destructor)))))
+
+(define home-xbindkeys-service-type
+ (service-type
+ (name 'home-xbindkeys)
+ (extensions
+ (list (service-extension
+ home-profile-service-type
+ add-xbindkeys-packages)
+ (service-extension
+ home-shepherd-service-type
+ home-xbindkeys-shepherd-service)))
+ (compose identity)
+ (default-value (home-xbindkeys-configuration))
+ (description "Install and configure xbindkeys.")))