waybar: add weather module using wttrbar

This commit is contained in:
Evie Litherland-Smith 2024-02-21 10:00:18 +00:00
parent 30df75daf7
commit 6fa95c45f7
2 changed files with 11 additions and 1 deletions

View file

@ -65,6 +65,7 @@ tooltip {
#battery, #battery,
#clock, #clock,
#custom-notification, #custom-notification,
#custom-weather,
#tray { #tray {
margin: 0px; margin: 0px;
padding: 1px 5px; padding: 1px 5px;
@ -75,7 +76,8 @@ tooltip {
#mpris, #mpris,
#tray, #tray,
#backlight, #backlight,
#battery { #battery,
#custom-weather {
color: @base05; color: @base05;
} }

View file

@ -32,6 +32,7 @@
"clock" "clock"
"backlight" "backlight"
"battery" "battery"
"custom/weather"
"tray" "tray"
]; ];
# Module config # Module config
@ -205,6 +206,13 @@
"on-click-right" = "${swaync}/bin/swaync-client -d -sw"; "on-click-right" = "${swaync}/bin/swaync-client -d -sw";
"escape" = true; "escape" = true;
}; };
"custom/weather" = {
"format" = "{}°";
"tooltip" = true;
"interval" = 3600;
"exec" = "${pkgs.wttrbar}/bin/wttrbar --location London --hide-conditions";
"return-type" = "json";
};
tray = { tray = {
icon-size = config.stylix.fonts.sizes.desktop; icon-size = config.stylix.fonts.sizes.desktop;
show-passive-items = true; show-passive-items = true;