prevent-sleep: new package
This commit is contained in:
parent
2afdcb7ee7
commit
9c3bb7c95c
25
mason/packages/prevent-sleep.scm
Normal file
25
mason/packages/prevent-sleep.scm
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
(define-module (mason packages prevent-sleep)
|
||||||
|
#: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 prevent-sleep
|
||||||
|
(package
|
||||||
|
(name "prevent-sleep")
|
||||||
|
(version "0.0.1")
|
||||||
|
(home-page "https://wiki.mobian-project.org/doku.php?id=tweaks#suspend-sleep")
|
||||||
|
(source
|
||||||
|
(local-file (string-append (dirname (current-filename)) "/scripts/prevent-sleep")
|
||||||
|
#:recursive? #t))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
'(#:install-plan
|
||||||
|
'(("prevent-sleep" "bin/"))))
|
||||||
|
(synopsis "Prevent sleep")
|
||||||
|
(description
|
||||||
|
"Prevent sleep")
|
||||||
|
(license license:cc-by-sa4.0)))
|
||||||
|
|
||||||
|
prevent-sleep
|
9
mason/packages/scripts/prevent-sleep/prevent-sleep
Executable file
9
mason/packages/scripts/prevent-sleep/prevent-sleep
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
gnome-session-inhibit --reason "$(whoami) said so..." \
|
||||||
|
--inhibit suspend \
|
||||||
|
yad --title "Prevent Suspend" \
|
||||||
|
--text "We will NOT sleep, unless you click \"OK\"!" \
|
||||||
|
--button=gtk-ok \
|
||||||
|
|
||||||
|
echo "OK! Zzzzzzzz"
|
Loading…
x
Reference in New Issue
Block a user