moved weather stuff around
This commit is contained in:
@@ -12,6 +12,13 @@ while true; do
|
||||
#set date: 04.03 15:22
|
||||
final_output=$(date +"%m.%d %H:%M")
|
||||
|
||||
### weather stuff
|
||||
wttr_file="/tmp/weather"
|
||||
if [[ -s "$wttr_file" ]]; then
|
||||
wttr=$(<"$wttr_file")
|
||||
final_output="${wttr} ${final_output}"
|
||||
fi
|
||||
|
||||
# get charge percentage
|
||||
if [[ -d "/sys/class/power_supply/BAT0" ]]; then
|
||||
battery_output="$(< /sys/class/power_supply/BAT0/capacity)%"
|
||||
@@ -24,13 +31,6 @@ while true; do
|
||||
final_output="${battery_output} ${final_output}"
|
||||
fi
|
||||
|
||||
### weather stuff
|
||||
wttr_file="/tmp/weather"
|
||||
if [[ -s "$wttr_file" ]]; then
|
||||
wttr=$(<"$wttr_file")
|
||||
final_output="${wttr} ${final_output}"
|
||||
fi
|
||||
|
||||
# final output to status bar
|
||||
xsetroot -name "$final_output"
|
||||
sleep 1;
|
||||
|
||||
Reference in New Issue
Block a user