Browse Source

New configuration for Summer School and MacBook Air

main
parent
commit
08c1f2bb10
3 changed files with 14 additions and 8 deletions
  1. +3
    -2
      bar-functions/dwm_battery.sh
  2. +2
    -2
      bar-functions/dwm_weather.sh
  3. +9
    -4
      dwm_bar.sh

+ 3
- 2
bar-functions/dwm_battery.sh View File

@ -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


+ 2
- 2
bar-functions/dwm_weather.sh View File

@ -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
}


+ 9
- 4
dwm_bar.sh View File

@ -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

Loading…
Cancel
Save