This commit is contained in:
Hadi
2024-06-25 09:49:11 +02:00
committed by GitHub
parent c0a0afd077
commit 4e5cdbbac5
4 changed files with 29 additions and 12 deletions

View File

@@ -15,4 +15,20 @@ let
notif "night-shift" "$message"
'';
in { home.packages = [ night-shift-on night-shift-off ]; }
night-shift-toggle = pkgs.writeShellScriptBin "night-shift-toggle" ''
if pgrep wlsunset; then
night-shift-off
else
night-shift-on
fi
'';
night-shift-status = pkgs.writeShellScriptBin "night-shift-status" ''
if pgrep wlsunset; then
echo "1"
else
echo "0"
fi
'';
in { home.packages = [ night-shift-on night-shift-off night-shift-toggle night-shift-status ]; }