bunch of new stuff, a few fixes
[distro-setup] / system-status
index 3ac05d579dba88874ea5c1603a6641e107b0b09f..28b302441684782b49f838b50512b6c13912eca9 100755 (executable)
@@ -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