home | add weather to waybar

This commit is contained in:
Don Harper 2024-07-06 23:15:51 -05:00
parent daa8270aeb
commit e8760c8250
3 changed files with 344 additions and 2 deletions

View file

@ -7,6 +7,8 @@
...
}: {
xdg.configFile."sway/config".source = ./files/sway/${osConfig.networking.hostName};
xdg.configFile."waybar/weather.py".source = ./files/sway/weather.py;
xdg.configFile."waybar/weather.conf".source = ./files/sway/weather.conf;
programs = {
swaylock = {
@ -30,7 +32,8 @@
spacing = 0;
modules-left = ["sway/workspaces" "sway/mode" "wlr/workspaces" "custom/mycal"];
modules-center = [];
modules-right = ["idle_inhibitor" "custom/mytimew" "pulseaudio" "custom/mymusic" "bluetooth" "network" "backlight" "battery" "battery#bat2" "tray" "custom/mycal" "clock"];
# modules-right = ["idle_inhibitor" "custom/mytimew" "pulseaudio" "custom/mymusic" "bluetooth" "network" "backlight" "battery" "battery#bat2" "tray" "custom/mycal" "clock"];
modules-right = ["idle_inhibitor" "custom/weather" "pulseaudio" "custom/mymusic" "bluetooth" "network" "backlight" "battery" "battery#bat2" "tray" "custom/mycal" "clock"];
bluetooth = {
format-alt = "bt: {status}";
format-on = "bt";
@ -47,6 +50,11 @@
on-scroll-down = "${pkgs.light}/bin/light -A 1";
on-scroll-up = "${pkgs.light}/bin/lightlight -U 1";
};
"custom/weather" = {
exec = "~/.config/waybar/weather.py";
interval = 300;
return-type = "json";
};
"custom/mytimew" = {
exec = "~/bin/timebar";
interval = 30;
@ -157,7 +165,7 @@
#workspaces button.focused { background: #64727D; border-bottom: 3px solid #ffffff; }
#workspaces button.urgent { background-color: #eb4d4b; }
#mode { background: #64727D; border-bottom: 3px solid #ffffff; }
#clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-mymusic, #tray, #mode, #idle_inhibitor, #bluetooth {
#clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-weather, #custom-mymusic, #tray, #mode, #idle_inhibitor, #bluetooth {
padding: 0 5px;
margin: 0 0px;
}
@ -182,6 +190,7 @@
#network.disconnected { background: #ff5555; }
#pulseaudio { background: #ffb86c; color: #000000; }
#pulseaudio.muted { background: #90b1b1; color: #2a5c45; }
#custom-weather { background: #bd93f9; color: #000000; }
#custom-mytimew { background: #bd93f9; color: #000000; }
#custom-mymusic { background: #8be9fd; color: #000000; }
#custom-mycal { background: #cccc99; color: #2a5c45; }