Changed quoting convention
This commit is contained in:
parent
d763d33e20
commit
e2201ce340
|
@ -8,31 +8,31 @@ read -r charge_now </sys/class/power_supply/BAT0/charge_now
|
|||
|
||||
if [ "$ac" = 1 ] ; then
|
||||
read -r charge_full </sys/class/power_supply/BAT0/charge_full
|
||||
val=$(( charge_full-charge_now ))
|
||||
val="$(( charge_full-charge_now ))"
|
||||
else
|
||||
val=$charge_now
|
||||
val="$charge_now"
|
||||
fi
|
||||
|
||||
hr=$(( val / rate ))
|
||||
mn=$(( (val * 60) / rate - hr * 60 ))
|
||||
hr="$(( val / rate ))"
|
||||
mn="$(( (val * 60) / rate - hr * 60 ))"
|
||||
|
||||
case $hr in
|
||||
case "$hr" in
|
||||
0)
|
||||
case $mn in
|
||||
case "$mn" in
|
||||
0) notify-send "Battery fully charged" ;;
|
||||
1) notify-send "1 minute remaining" ;;
|
||||
*) notify-send "$mn minutes remaining" ;;
|
||||
esac
|
||||
;;
|
||||
1)
|
||||
case $mn in
|
||||
case "$mn" in
|
||||
0) notify-send "1 hour remaining" ;;
|
||||
1) notify-send "1 hour, 1 minute remaining" ;;
|
||||
*) notify-send "1 hour, $mn minutes remaining" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
case $mn in
|
||||
case "$mn" in
|
||||
0) notify-send "$hr hours remaining" ;;
|
||||
1) notify-send "$hr hours, 1 minute remaining" ;;
|
||||
*) notify-send "$hr hours, $mn minutes remaining" ;;
|
||||
|
|
|
@ -6,7 +6,7 @@ ICONc="
" # icon for critical temperatures
|
|||
crit=70 # critical temperature
|
||||
|
||||
read -r temp </sys/class/thermal/thermal_zone0/temp
|
||||
temp=${temp%???}
|
||||
temp="${temp%???}"
|
||||
|
||||
if [ "$temp" -lt "$crit" ] ; then
|
||||
printf "$ICONn%s°C" "$temp"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
case $1 in
|
||||
case "$1" in
|
||||
1) exec "$TERMINAL" -e "htop -s PERCENT_CPU" ;;
|
||||
2) exec "$TERMINAL" -e "htop" ;;
|
||||
3) exec "$TERMINAL" -e "htop -s PERCENT_MEM" ;;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# This script parses the output of `pactl list sinks' to find volume and mute
|
||||
# status of the default audio sink and whether headphones are plugged in or not
|
||||
# Also see ../daemons/pulse_daemon.sh
|
||||
sink=$(pactl info | awk '$1 == "Default" && $2 == "Sink:" {print $3}')
|
||||
sink="$(pactl info | awk '$1 == "Default" && $2 == "Sink:" {print $3}')"
|
||||
[ -n "$sink" ] || exit
|
||||
pactl list sinks | awk -v sink="$sink" '
|
||||
BEGIN {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
case $1 in
|
||||
case "$1" in
|
||||
1) pactl set-sink-mute @DEFAULT_SINK@ toggle ;;
|
||||
3) pactl set-sink-volume @DEFAULT_SINK@ 50% ;;
|
||||
esac
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# It signals volume block to update on audio related events
|
||||
pactl subscribe |
|
||||
while IFS='' read -r output ; do
|
||||
case $output in
|
||||
case "$output" in
|
||||
*" sink "*) sigdwmblocks 1 ;;
|
||||
esac
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue