prevent-sleep: Add desktop file

This commit is contained in:
Adrian Kuschelyagi Malacoda 2021-10-07 12:49:38 -05:00
parent ed379a1131
commit 3799873323
2 changed files with 13 additions and 2 deletions

View File

@ -16,15 +16,20 @@
(build-system copy-build-system)
(arguments
'(#:install-plan
'(("prevent-sleep" "bin/"))
'(("prevent-sleep" "bin/")
("prevent-sleep.desktop" "share/applications/"))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'configure
(lambda* (#:key inputs #:allow-other-keys)
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* (list "prevent-sleep")
(("@YAD_PATH@")
(string-append (assoc-ref inputs "yad")
"/bin")))
(substitute* (list "prevent-sleep.desktop")
(("@EXEC@")
(string-append (assoc-ref outputs "out")
"/bin/prevent-sleep")))
#t)))))
(inputs
`(("yad" ,yad)))

View File

@ -0,0 +1,6 @@
[Desktop Entry]
Type=Application
Name=Suspend Inhibitor
Icon=gnome-power-manager
Exec=@EXEC@
Terminal=false