Last active
February 19, 2021 10:08
-
-
Save okitavera/b0d88911628291d3c2d3217e4eaddf6a to your computer and use it in GitHub Desktop.
wttr.in example with dzen2 and polybar module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# width of window | |
W=250 | |
# City | |
C=Malang | |
prin_weather() { | |
printf '\n\n %s Now \n\n' $C | |
curl -s "wttr.in/$C?0QT" | |
printf '\n' | |
} | |
eval $(xdotool getdisplaygeometry --shell) | |
prin_weather | dzen2 -p -l 9 \ | |
-w $W -x $((WIDTH/2-W/2)) -y 18 \ | |
-fn 'Fira Code:bold:size=8' \ | |
-e 'onstart=hide,togglecollapse;button1=exit;button3=exit' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[module/weather] | |
type = custom/text | |
content = "view weather" | |
click-left = sh ~/.config/polybar/dzen2-wttr.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment