moved weather stuff around

This commit is contained in:
forl0rn
2026-05-10 02:11:55 -05:00
parent 1761d2702e
commit 69ad7310bc
+7 -7
View File
@@ -12,6 +12,13 @@ while true; do
#set date: 04.03 15:22 #set date: 04.03 15:22
final_output=$(date +"%m.%d %H:%M") 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 # get charge percentage
if [[ -d "/sys/class/power_supply/BAT0" ]]; then if [[ -d "/sys/class/power_supply/BAT0" ]]; then
battery_output="$(< /sys/class/power_supply/BAT0/capacity)%" battery_output="$(< /sys/class/power_supply/BAT0/capacity)%"
@@ -24,13 +31,6 @@ while true; do
final_output="${battery_output} ${final_output}" final_output="${battery_output} ${final_output}"
fi 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 # final output to status bar
xsetroot -name "$final_output" xsetroot -name "$final_output"
sleep 1; sleep 1;