From c568502c9557d66e41a26ca56089913600f2e175 Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Thu, 30 Sep 2021 23:08:26 -0500 Subject: [PATCH] only audio, battery and date --- bar-functions/dwm_battery.sh | 13 ++++++++---- bar-functions/dwm_pulse.sh | 10 ++++----- dwm_bar.sh | 40 ++++++++++++++++++------------------ 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/bar-functions/dwm_battery.sh b/bar-functions/dwm_battery.sh index 6321e64..2a8d493 100755 --- a/bar-functions/dwm_battery.sh +++ b/bar-functions/dwm_battery.sh @@ -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" } diff --git a/bar-functions/dwm_pulse.sh b/bar-functions/dwm_pulse.sh index 96395a2..6f17317 100755 --- a/bar-functions/dwm_pulse.sh +++ b/bar-functions/dwm_pulse.sh @@ -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" diff --git a/dwm_bar.sh b/dwm_bar.sh index ea2e3f0..7f6a219 100755 --- a/dwm_bar.sh +++ b/dwm_bar.sh @@ -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=""