diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-10-09 14:49:04 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-10-09 14:49:04 +0800 |
| commit | 86ad4d28fcfba1cd9d9ca8f03873627f17771d60 (patch) | |
| tree | 13bce22bf3434aebd79a2fd7bef5bc0f6bad2b8f /hypridle.sh | |
| parent | 95c58b0e1a5ea004300b3033dff74541bdf0632c (diff) | |
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)
Diffstat (limited to 'hypridle.sh')
| -rwxr-xr-x | hypridle.sh | 15 |
1 files 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 |
