X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=system-status;h=28b302441684782b49f838b50512b6c13912eca9;hp=3ac05d579dba88874ea5c1603a6641e107b0b09f;hb=523b7ff889aaafdcd997d84b2a06744993018e89;hpb=2ff8740f1061a31683152a4447340921de82b1b9 diff --git a/system-status b/system-status index 3ac05d5..28b3024 100755 --- a/system-status +++ b/system-status @@ -414,20 +414,20 @@ mute() { fi midnight=$(date -d 00:00 +%s) mdiff=$(( EPOCHSECONDS - midnight )) - if $locked && (( mdiff < 6 || mdiff > 21 )); then + if $locked && (( mdiff < 6 *60*60 || mdiff > 21 *60*60 )); then case $(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}') in no) # for log purposes - echo unmuted + echo muted pactl set-sink-mute @DEFAULT_SINK@ true ;; esac fi - if ! $locked && (( mdiff > 6 || mdiff < 12 )) && [[ ! -e /tmp/ianknap ]]; then + if ! $locked && (( mdiff > 6 *60*60 || mdiff < 12 *60*60 )) && [[ ! -e /tmp/ianknap ]]; then case $(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}') in yes) # for log purposes - echo muted + echo unmuted pactl set-sink-mute @DEFAULT_SINK@ false ;; esac