Browse Source

only audio, battery and date

patch-fontkeys
parent
commit
c568502c95
3 changed files with 34 additions and 29 deletions
  1. +9
    -4
      bar-functions/dwm_battery.sh
  2. +5
    -5
      bar-functions/dwm_pulse.sh
  3. +20
    -20
      dwm_bar.sh

+ 9
- 4
bar-functions/dwm_battery.sh View File

@ -6,18 +6,23 @@
dwm_battery () {
# Change BAT1 to whatever your battery is identified as. Typically BAT0 or BAT1
CHARGE=$(cat /sys/class/power_supply/BAT1/capacity)
STATUS=$(cat /sys/class/power_supply/BAT1/status)
CHARGE=$(cat /sys/class/power_supply/BAT0/capacity)
STATUS=$(cat /sys/class/power_supply/BAT0/status)
printf "%s" "$SEP1"
if [ "$IDENTIFIER" = "unicode" ]; then
if [ "$IDENTIFIER" = "" ]; then
if [ "$STATUS" = "Charging" ]; then
printf "🔌 %s%% %s" "$CHARGE" "$STATUS"
else
printf "🔋 %s%% %s" "$CHARGE" "$STATUS"
fi
else
printf "BAT %s%% %s" "$CHARGE" "$STATUS"
if [ "$STATUS" = "Charging" ]; then
printf " %s%%" "$CHARGE"
else
printf " %s%%" "$CHARGE"
#printf "BAT %s%% %s" "$CHARGE" "$STATUS"
fi
fi
printf "%s\n" "$SEP2"
}


+ 5
- 5
bar-functions/dwm_pulse.sh View File

@ -10,7 +10,7 @@ dwm_pulse () {
VOL=$(pamixer --get-volume)
printf "%s" "$SEP1"
if [ "$IDENTIFIER" = "unicode" ]; then
if [ "$IDENTIFIER" = "" ]; then
if [ "$VOL" = "muted" ] || [ "$VOL" -eq 0 ]; then
printf "🔇"
elif [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then
@ -22,13 +22,13 @@ dwm_pulse () {
fi
else
if [ "$VOL" = "muted" ] || [ "$VOL" -eq 0 ]; then
printf "MUTE"
printf ""
elif [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then
printf "VOL %s%%" "$VOL"
printf " %s%%" "$VOL"
elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then
printf "VOL %s%%" "$VOL"
printf " %s%%" "$VOL"
else
printf "VOL %s%%" "$VOL"
printf " %s%%" "$VOL"
fi
fi
printf "%s\n" "$SEP2"


+ 20
- 20
dwm_bar.sh View File

@ -18,8 +18,8 @@ DIR=$(dirname "$LOC")
export IDENTIFIER="unicode"
# Change the charachter(s) used to seperate modules. If two are used, they will be placed at the start and end.
export SEP1="["
export SEP2="]"
export SEP1=" "
export SEP2=" "
# Import the modules
. "$DIR/bar-functions/dwm_countdown.sh"
@ -59,28 +59,28 @@ parallelize &
while true
do
# Append results of each func one by one to the upperbar string
upperbar=""
upperbar="$upperbar$(dwm_connman)"
upperbar="$upperbar$(dwm_countdown)"
upperbar="$upperbar$(dwm_alarm)"
upperbar="$upperbar$(dwm_transmission)"
upperbar="$upperbar$(dwm_cmus)"
upperbar="$upperbar$(dwm_mpc)"
upperbar="$upperbar$(dwm_spotify)"
upperbar="$upperbar$(dwm_resources)"
upperbar=""
# upperbar="$upperbar$(dwm_connman)"
# upperbar="$upperbar$(dwm_countdown)"
# upperbar="$upperbar$(dwm_alarm)"
# upperbar="$upperbar$(dwm_transmission)"
# upperbar="$upperbar$(dwm_cmus)"
# upperbar="$upperbar$(dwm_mpc)"
# upperbar="$upperbar$(dwm_spotify)"
# upperbar="$upperbar$(dwm_resources)"
upperbar="$upperbar$(dwm_battery)"
upperbar="$upperbar$(dwm_mail)"
upperbar="$upperbar$(dwm_backlight)"
upperbar="$upperbar$(dwm_alsa)"
# upperbar="$upperbar$(dwm_mail)"
# upperbar="$upperbar$(dwm_backlight)"
# upperbar="$upperbar$(dwm_alsa)"
upperbar="$upperbar$(dwm_pulse)"
upperbar="$upperbar${__DWM_BAR_WEATHER__}"
upperbar="$upperbar$(dwm_vpn)"
upperbar="$upperbar${__DWM_BAR_NETWORKMANAGER__}"
# upperbar="$upperbar${__DWM_BAR_WEATHER__}"
# upperbar="$upperbar$(dwm_vpn)"
# upperbar="$upperbar${__DWM_BAR_NETWORKMANAGER__}"
upperbar="$upperbar$(dwm_keyboard)"
upperbar="$upperbar$(dwm_ccurse)"
# upperbar="$upperbar$(dwm_ccurse)"
upperbar="$upperbar$(dwm_date)"
upperbar="$upperbar$(dwm_loadavg)"
upperbar="$upperbar$(dwm_currency)"
# upperbar="$upperbar$(dwm_loadavg)"
# upperbar="$upperbar$(dwm_currency)"
# Append results of each func one by one to the lowerbar string
lowerbar=""


Loading…
Cancel
Save