toggle-keyboard: New package.
This commit is contained in:
parent
3799873323
commit
2970b6a63f
8
mason/packages/scripts/toggle-keyboard/toggle-keyboard
Executable file
8
mason/packages/scripts/toggle-keyboard/toggle-keyboard
Executable file
@ -0,0 +1,8 @@
|
||||
!/bin/sh
|
||||
KEYBOARD_ENABLED=$(gsettings get org.gnome.desktop.a11y.applications screen-keyboard-enabled)
|
||||
if [ "$KEYBOARD_ENABLED" = "true" ]; then
|
||||
KEYBOARD_ENABLED="false"
|
||||
else
|
||||
KEYBOARD_ENABLED="true"
|
||||
fi
|
||||
gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled $KEYBOARD_ENABLED
|
@ -0,0 +1,5 @@
|
||||
[Desktop Entry]
|
||||
Name=Toggle Keyboard
|
||||
Type=Application
|
||||
Exec=@EXEC@
|
||||
Categories=Utility;
|
34
mason/packages/toggle-keyboard.scm
Normal file
34
mason/packages/toggle-keyboard.scm
Normal file
@ -0,0 +1,34 @@
|
||||
(define-module (mason packages toggle-keyboard)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix build-system copy)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (guix gexp))
|
||||
|
||||
(define-public toggle-keyboard
|
||||
(package
|
||||
(name "toggle-keyboard")
|
||||
(version "0.0.1")
|
||||
(home-page "https://forge.monarch-pass.net/malacoda/mason")
|
||||
(source
|
||||
(local-file "scripts/toggle-keyboard" #:recursive? #t))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
'(#:install-plan
|
||||
'(("toggle-keyboard" "bin/")
|
||||
("toggle-keyboard.desktop" "share/applications/"))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(substitute* (list "toggle-keyboard.desktop")
|
||||
(("@EXEC@")
|
||||
(string-append (assoc-ref outputs "out")
|
||||
"/bin/toggle-keyboard")))
|
||||
#t)))))
|
||||
(synopsis "Toggle keyboard")
|
||||
(description
|
||||
"Toggle keyboard")
|
||||
(license license:gpl3+)))
|
||||
|
||||
toggle-keyboard
|
Loading…
x
Reference in New Issue
Block a user