This commit is contained in:
Hadi
2024-06-28 16:32:52 +02:00
parent 921c359693
commit 06f5e03e66
6 changed files with 13 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }:
let
caffeine-status = pkgs.writeShellScriptBin "caffeine-status" ''
[[ -f /tmp/caffeine ]] && echo "active" || echo "inactive"
[[ -f /tmp/caffeine ]] && echo "1" || echo "0"
'';
caffeine = pkgs.writeShellScriptBin "caffeine" ''
@@ -19,7 +19,7 @@ let
caffeine-status-icon = pkgs.writeShellScriptBin "caffeine-status-icon" ''
status=$(caffeine-status)
if [[ $status == "active" ]]; then
if [[ $status == "1" ]]; then
echo "󰅶"
else
echo "󰾪"

View File

@@ -15,7 +15,7 @@ let
notif "night-shift" "$message"
'';
night-shift-toggle = pkgs.writeShellScriptBin "night-shift-toggle" ''
night-shift = pkgs.writeShellScriptBin "night-shift" ''
if pgrep wlsunset; then
night-shift-off
else
@@ -43,7 +43,7 @@ in {
home.packages = [
night-shift-on
night-shift-off
night-shift-toggle
night-shift
night-shift-status
night-shift-status-icon
];