mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2025-11-16 09:24:58 +00:00
Compare commits
2 Commits
5172fac369
...
55e4d889a6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55e4d889a6 | ||
|
|
fbcf6a1d7d |
@ -29,6 +29,7 @@
|
|||||||
(build-system cargo-build-system)
|
(build-system cargo-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-source? #f
|
(list #:install-source? #f
|
||||||
|
#:tests? #f ;Requires running display server.
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'fix-paths
|
(add-after 'unpack 'fix-paths
|
||||||
@ -36,10 +37,7 @@
|
|||||||
(substitute* "src/lib.rs"
|
(substitute* "src/lib.rs"
|
||||||
(("\"Xwayland\"")
|
(("\"Xwayland\"")
|
||||||
(format #f "\"~a\""
|
(format #f "\"~a\""
|
||||||
(search-input-file inputs "bin/Xwayland"))))))
|
(search-input-file inputs "bin/Xwayland")))))))))
|
||||||
(add-before 'check 'prepare-for-tests
|
|
||||||
(lambda _
|
|
||||||
(setenv "XDG_RUNTIME_DIR" "/tmp"))))))
|
|
||||||
(native-inputs (list pkg-config))
|
(native-inputs (list pkg-config))
|
||||||
(inputs
|
(inputs
|
||||||
(cons* clang
|
(cons* clang
|
||||||
|
|||||||
28
rosenthal/services/keyboard.scm
Normal file
28
rosenthal/services/keyboard.scm
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
;;; SPDX-FileCopyrightText: 2021 Andrew Tropin <andrew@trop.in>
|
||||||
|
;;;
|
||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal services keyboard)
|
||||||
|
#:use-module (gnu system keyboard)
|
||||||
|
#:use-module (gnu home services)
|
||||||
|
#:export (home-keyboard-service-type))
|
||||||
|
|
||||||
|
(define (set-xkb-variables layout)
|
||||||
|
(if layout
|
||||||
|
`(("XKB_DEFAULT_LAYOUT" . ,(keyboard-layout-name layout))
|
||||||
|
("XKB_DEFAULT_VARIANT" . ,(keyboard-layout-variant layout))
|
||||||
|
("XKB_DEFAULT_OPTIONS" . ,(string-join
|
||||||
|
(keyboard-layout-options layout) ","))
|
||||||
|
("XKB_DEFAULT_MODEL" . ,(keyboard-layout-model layout)))
|
||||||
|
'()))
|
||||||
|
|
||||||
|
(define home-keyboard-service-type
|
||||||
|
(service-type (name 'home-keyboard)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension
|
||||||
|
home-environment-variables-service-type
|
||||||
|
set-xkb-variables)))
|
||||||
|
(default-value #f)
|
||||||
|
(description "Set layouts by configuring XKB_*
|
||||||
|
environment variables. Service accepts an instance of
|
||||||
|
@code{keyboard-layout} from @code{(gnu system keyboard)}.")))
|
||||||
Loading…
Reference in New Issue
Block a user