Add .config/waybar/_modules/dualsense-notifier.sh
Add .config/waybar/_modules/storage.sh Add .config/waybar/_modules/wittr.sh Add .config/waybar/dracula/colors.css Add .config/waybar/dracula/config Add .config/waybar/dracula/style.css Add .config/waybar/geo/config Add .config/waybar/geo/weather.sh Add .config/waybar/geo/style.css Add .config/waybar/jinks/bak.css Add .config/waybar/jinks/colors.css Add .config/waybar/jinks/config Add .config/waybar/jinks/style.css Add .config/waybar/siren/config Add .config/waybar/siren/style.css Add .config/waybar/sway/config Add .config/waybar/sway/config.save Add .config/waybar/sway/style.css
This commit is contained in:
parent
9fc7bf8ecb
commit
c2f4366fd0
18 changed files with 2122 additions and 0 deletions
12
private_dot_config/waybar/geo/executable_weather.sh
Normal file
12
private_dot_config/waybar/geo/executable_weather.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
LOC="$1"
|
||||
# HTML encode string as %20
|
||||
LOCATION=$(sed -e "s/ /%20/g" <<<"$LOC")
|
||||
content=$(curl -sS "https://thisdavej.azurewebsites.net/api/weather/current?loc=$LOCATION°=C")
|
||||
ICON=$(curl 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°]//g' )
|
||||
# echo $ICON
|
||||
TEMP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)"' | sed 's/"//g')
|
||||
TOOLTIP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)\n\(.skytext)"' | sed 's/"//g')
|
||||
CLASS=$(echo $content | jq .skytext)
|
||||
echo '{"text": "'$TEMP'", "tooltip": "'$ICON $TOOLTIP'", "class": '$CLASS' }'
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue