Automatically start xmodmap when I first log in
This commit is contained in:
parent
8d5eb70a19
commit
fde6941d93
1 changed files with 18 additions and 8 deletions
|
@ -13,6 +13,9 @@
|
|||
(package
|
||||
(package xmodmap)
|
||||
"Package to use for setting Xmodmap")
|
||||
(auto-start?
|
||||
(boolean #t)
|
||||
"Should xmodmap be started automatically")
|
||||
(pointer
|
||||
(list '())
|
||||
"List of numbers indicating the order of numbers")
|
||||
|
@ -28,24 +31,31 @@
|
|||
"")
|
||||
(string-join (home-xmodmap-configuration-extra config) "\n" 'suffix))))
|
||||
|
||||
(define (xmodmap-home-files config)
|
||||
`(("Xmodmap" ,(mixed-text-file
|
||||
(define (xmodmap-home-config-file config)
|
||||
(mixed-text-file
|
||||
"Xmodmap"
|
||||
(serialize-xmodmap-config config)))))
|
||||
(serialize-xmodmap-config config)))
|
||||
|
||||
(define (add-xmodmap-packages config)
|
||||
(list (home-xmodmap-configuration-package config)))
|
||||
|
||||
(define (launch-xmodmap-gexp config)
|
||||
(let ((xmodmap (home-xmodmap-configuration-package config)))
|
||||
(if (home-xmodmap-configuration-auto-start? config)
|
||||
#~(system* #$(file-append xmodmap "/bin/xmodmap")
|
||||
#$(xmodmap-home-config-file config))
|
||||
#~"")))
|
||||
|
||||
(define home-xmodmap-service-type
|
||||
(service-type
|
||||
(name 'home-xmodmap)
|
||||
(extensions
|
||||
(list (service-extension
|
||||
home-files-service-type
|
||||
xmodmap-home-files)
|
||||
(service-extension
|
||||
home-profile-service-type
|
||||
add-xmodmap-packages)))
|
||||
add-xmodmap-packages)
|
||||
(service-extension
|
||||
home-run-on-first-login-service-type
|
||||
launch-xmodmap-gexp)))
|
||||
(compose identity)
|
||||
(default-value (home-xmodmap-configuration))
|
||||
(description "Install and configure Xmodmap.")))
|
||||
|
|
Loading…
Reference in a new issue