Update hyprshade-auto.sh
This commit is contained in:
@@ -16,6 +16,10 @@ STATE=$(cat "$STATE_FILE")
|
||||
case "$STATE" in
|
||||
0)
|
||||
# DEFAULT (AUTO)
|
||||
sudo systemctl --user start hyprshade-auto.service
|
||||
sudo systemctl --user enable hyprshade-auto.service
|
||||
sudo systemctl --user start hyprshade-auto.timer
|
||||
sudo systemctl --user enable hyprshade-auto.timer
|
||||
if [ "$HOUR" -ge 19 ] || [ "$HOUR" -lt 7 ]; then
|
||||
hyprshade on "$SHADER"
|
||||
else
|
||||
@@ -28,21 +32,29 @@ case "$STATE" in
|
||||
else
|
||||
echo "Default (auto) mod"
|
||||
echo 1 > "$STATE_FILE"
|
||||
notify-send "night screen" "auto mode active"
|
||||
notify-send "Night Screen" "auto mode active"
|
||||
fi
|
||||
;;
|
||||
1)
|
||||
# KAPALI
|
||||
sudo systemctl --user stop hyprshade-auto.service
|
||||
sudo systemctl --user disable hyprshade-auto.service
|
||||
sudo systemctl --user stop hyprshade-auto.timer
|
||||
sudo systemctl --user disable hyprshade-auto.timer
|
||||
hyprshade off
|
||||
echo "Kapalı mod"
|
||||
echo 2 > "$STATE_FILE"
|
||||
notify-send "night screen" "effect is deactive"
|
||||
notify-send "Night Screen" "effect is deactive"
|
||||
;;
|
||||
2)
|
||||
# HEP AÇIK
|
||||
sudo systemctl --user stop hyprshade-auto.service
|
||||
sudo systemctl --user disable hyprshade-auto.service
|
||||
sudo systemctl --user stop hyprshade-auto.timer
|
||||
sudo systemctl --user disable hyprshade-auto.timer
|
||||
hyprshade on "$SHADER"
|
||||
echo "Hep açık mod"
|
||||
echo 0 > "$STATE_FILE"
|
||||
notify-send "night screen" "effect is active"
|
||||
notify-send "Night Screen" "effect is active"
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user