From 58704035ddb381a15784829c82da01960fcc28a5 Mon Sep 17 00:00:00 2001 From: steven Date: Sat, 19 Apr 2025 18:37:11 -0400 Subject: [PATCH] weather tooltip information --- waybar/config.jsonc | 5 ++++- waybar/scripts/wttr.sh | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 waybar/scripts/wttr.sh diff --git a/waybar/config.jsonc b/waybar/config.jsonc index 7c8c155..ba948fc 100644 --- a/waybar/config.jsonc +++ b/waybar/config.jsonc @@ -21,11 +21,14 @@ "mpris":{ "interval":1, "format":"{dynamic}", + "dynamic-len":44, + "dynamic-importance-order":["title","position","length","artist","album"], "tooltip":false }, "custom/weather":{ "interval":600, - "exec":"curl 'https://wttr.in/?m&format=%C+(%t)'" + "return-type":"json", + "exec":"~/.config/waybar/scripts/wttr.sh" }, "network#warp":{ "interval":5, diff --git a/waybar/scripts/wttr.sh b/waybar/scripts/wttr.sh new file mode 100755 index 0000000..9f91d2b --- /dev/null +++ b/waybar/scripts/wttr.sh @@ -0,0 +1,3 @@ +wttr=$(curl -s "https://wttr.in/Louisville?m&format=%t") +tooltip=$(curl -s "https://wttr.in/Louisville?m&format=%C:RealFeel+%f:UV+Index+%u:Precip.+%p:Wind+%w"|sed 's/:/\\n/g') +echo -E "{\"text\":\"$wttr\",\"tooltip\":\"$tooltip\"}"