From 86ad4d28fcfba1cd9d9ca8f03873627f17771d60 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 9 Oct 2024 14:49:04 +0800 Subject: fix(hypridle): fixed brillo being spelled as brillio, fixed stopidle not being called when passing in --stopidle change(logic): $pmusic check merge remove(random): cleanup random stuff(unset m, xinput) --- hypridle.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hypridle.sh b/hypridle.sh index e1d7bde..99512ac 100755 --- a/hypridle.sh +++ b/hypridle.sh @@ -33,16 +33,16 @@ function idle() { if [ $pmusic ]; then if [[ $(playerctl status -p spotify) == "Playing" ]]; then - echo true > $XDG_CACHE_HOME/playing-music + touch $XDG_CACHE_HOME/playing-music fi - fi - if [ $pmusic ]; then playerctl --all-players pause fi # killall -STOP hyprpaper.sh # killall -STOP swww.sh - brillio -O - brillio -S 0 + brillo -O + brillo -S 0 + # turn off debug overlay just in case we forget + hyprctl keyword debug:overlay false } function stopidle() { @@ -54,7 +54,6 @@ function stopidle() { # notify-send "ERROR: \$soundlevel is not set, unknown sound level..." #fi # Re-enable mouse - xinput --enable 12 & if [ $mutev ] && [[ $(pactl get-sink-mute @DEFAULT_SINK@) == "Mute: yes" ]]; then amixer set Master unmute & elif [ $mutev ] && [[ $(pactl get-sink-mute @DEFAULT_SINK@) == "Mute: no" ]]; then @@ -65,12 +64,11 @@ function stopidle() { /sbin/killall update.sh yay & if [ $pmusic ] && [ -f $XDG_CACHE_HOME/playing-music ]; then playerctl play -p spotify - unset m fi # killall -CONT hyprpaper.sh || $HOME/scripts/hyprpaper.sh & # killall -CONT swww.sh || $HOME/scripts/swww.sh & rm -f $XDG_CACHE_HOME/playing-music - brillio -I + brillo -I } if [ "$1" ]; then @@ -78,6 +76,7 @@ if [ "$1" ]; then idle exit 0 elif [[ "$1" == '--continue' || "$1" == '--stopidle' ]]; then + stopidle exit 0 fi fi -- cgit v1.2.3