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" printf "%s" "$SEP1"
if [ "$IDENTIFIER" = "" ]; then if [ "$IDENTIFIER" = "" ]; then
#if [ "$IDENTIFIER" = "unicode" ]; then
if [ "$STATUS" = "Charging" ]; then if [ "$STATUS" = "Charging" ]; then
printf "🔌 %s%% %s" "$CHARGE" "$STATUS" printf "🔌 %s%% %s" "$CHARGE" "$STATUS"
else else
@ -18,9 +19,9 @@ dwm_battery () {
fi fi
else else
if [ "$STATUS" = "Charging" ]; then if [ "$STATUS" = "Charging" ]; then
printf " %s%%" "$CHARGE"
printf "  %s%%" "$CHARGE"
else else
printf " %s%%" "$CHARGE"
printf "  %s%%" "$CHARGE"
#printf "BAT %s%% %s" "$CHARGE" "$STATUS" #printf "BAT %s%% %s" "$CHARGE" "$STATUS"
fi fi
fi fi


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

@ -10,12 +10,12 @@
dwm_weather() { dwm_weather() {
LOCATION=London LOCATION=London
if [ "$IDENTIFIER" = "unicode" ]; then
if [ "$IDENTIFIER" = "" ]; then
DATA=$(curl -s wttr.in/$LOCATION?format=1) DATA=$(curl -s wttr.in/$LOCATION?format=1)
export __DWM_BAR_WEATHER__="${SEP1} ${DATA} ${SEP2}" export __DWM_BAR_WEATHER__="${SEP1} ${DATA} ${SEP2}"
else else
DATA=$(curl -s wttr.in/$LOCATION?format=1 | grep -o ".[0-9].*") 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 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]. # 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 # Requires a font with adequate unicode character support
export IDENTIFIER="unicode" 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. # 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 # Import the modules
. "$DIR/bar-functions/dwm_countdown.sh" . "$DIR/bar-functions/dwm_countdown.sh"
@ -83,12 +84,16 @@ do
# upperbar="$upperbar$(dwm_currency)" # upperbar="$upperbar$(dwm_currency)"
# Append results of each func one by one to the lowerbar string # 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" xsetroot -name "$upperbar"
# Uncomment the line below to enable the lowerbar # Uncomment the line below to enable the lowerbar
# xsetroot -name "$upperbar;$lowerbar"
# xsetroot -name "$upperbar;$lowerbar"
sleep 1 sleep 1
done done

Loading…
Cancel
Save