From 08c1f2bb1056f5361455341b96b7ea581825ac43 Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Wed, 27 Jul 2022 08:55:08 -0500 Subject: [PATCH] New configuration for Summer School and MacBook Air --- bar-functions/dwm_battery.sh | 5 +++-- bar-functions/dwm_weather.sh | 4 ++-- dwm_bar.sh | 13 +++++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/bar-functions/dwm_battery.sh b/bar-functions/dwm_battery.sh index 2a8d493..f7d13b9 100755 --- a/bar-functions/dwm_battery.sh +++ b/bar-functions/dwm_battery.sh @@ -11,6 +11,7 @@ dwm_battery () { printf "%s" "$SEP1" if [ "$IDENTIFIER" = "" ]; then + #if [ "$IDENTIFIER" = "unicode" ]; then if [ "$STATUS" = "Charging" ]; then printf "🔌 %s%% %s" "$CHARGE" "$STATUS" else @@ -18,9 +19,9 @@ dwm_battery () { fi else if [ "$STATUS" = "Charging" ]; then - printf " %s%%" "$CHARGE" + printf "  %s%%" "$CHARGE" else - printf " %s%%" "$CHARGE" + printf "  %s%%" "$CHARGE" #printf "BAT %s%% %s" "$CHARGE" "$STATUS" fi fi diff --git a/bar-functions/dwm_weather.sh b/bar-functions/dwm_weather.sh index 8689a8d..d7825f0 100755 --- a/bar-functions/dwm_weather.sh +++ b/bar-functions/dwm_weather.sh @@ -10,12 +10,12 @@ dwm_weather() { LOCATION=London - if [ "$IDENTIFIER" = "unicode" ]; then + if [ "$IDENTIFIER" = "" ]; then DATA=$(curl -s wttr.in/$LOCATION?format=1) export __DWM_BAR_WEATHER__="${SEP1} ${DATA} ${SEP2}" else DATA=$(curl -s wttr.in/$LOCATION?format=1 | grep -o ".[0-9].*") - export __DWM_BAR_WEATHER__="${SEP1} WEA ${DATA} ${SEP2}" + export __DWM_BAR_WEATHER__="${SEP1}  ${DATA} ${SEP2}" fi } diff --git a/dwm_bar.sh b/dwm_bar.sh index 7f6a219..cb54722 100755 --- a/dwm_bar.sh +++ b/dwm_bar.sh @@ -16,10 +16,11 @@ DIR=$(dirname "$LOC") # Change the appearance of the module identifier. if this is set to "unicode", then symbols will be used as identifiers instead of text. E.g. [📪 0] instead of [MAIL 0]. # Requires a font with adequate unicode character support export IDENTIFIER="unicode" +#export IDENTIFIER="un" # 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" @@ -83,12 +84,16 @@ do # upperbar="$upperbar$(dwm_currency)" # Append results of each func one by one to the lowerbar string - lowerbar="" +# lowerbar="" +# lowerbar="$lowerbar$(dwm_resources)" + #lowerbar="$lowerbar$(dwm_ccurse)" + #lowerbar="$lowerbar${__DWM_BAR_WEATHER__}" + #lowerbar="$lowerbar$(dwm_alarm)" xsetroot -name "$upperbar" # Uncomment the line below to enable the lowerbar -# xsetroot -name "$upperbar;$lowerbar" + # xsetroot -name "$upperbar;$lowerbar" sleep 1 done