Fix sleep-nag script
This commit is contained in:
parent
dfff4bd258
commit
79f5d05b4f
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ let
|
||||||
"Control.Concurrent"
|
"Control.Concurrent"
|
||||||
"Data.Functor"
|
"Data.Functor"
|
||||||
];
|
];
|
||||||
bins = [ pkgs.libnotify ];
|
bins = [ pkgs.libnotify pkgs.systemd ];
|
||||||
} ''
|
} ''
|
||||||
main = forever $ do
|
main = forever $ do
|
||||||
time <- getZonedTime
|
time <- getZonedTime
|
||||||
|
@ -21,7 +21,7 @@ let
|
||||||
night = (hour < 6 && hour >= 1)
|
night = (hour < 6 && hour >= 1)
|
||||||
action
|
action
|
||||||
| evening = notify_send "Shutdown alert!" ([i|Rechner fährt in #{59-minute} Minuten runter.|]::String)
|
| evening = notify_send "Shutdown alert!" ([i|Rechner fährt in #{59-minute} Minuten runter.|]::String)
|
||||||
| night = exe "/run/wrappers/bin/sudo" "systemctl" "poweroff"
|
| night = systemctl "poweroff"
|
||||||
| otherwise = pass
|
| otherwise = pass
|
||||||
action
|
action
|
||||||
threadDelay 600000000
|
threadDelay 600000000
|
||||||
|
|
Loading…
Reference in a new issue