mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Added weather module.
This commit is contained in:
parent
30572115a9
commit
a7833d0d81
5 changed files with 78 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let colors = import ./colors.nix;
|
||||
secrets = import ../../../secrets.nix;
|
||||
in {
|
||||
config = lib.mkIf (lib.elem "sway" config.meta.deploy.profiles) {
|
||||
fonts.fonts = with pkgs; [
|
||||
|
|
@ -264,6 +265,7 @@ in {
|
|||
modules-right = [
|
||||
"pulseaudio"
|
||||
"network"
|
||||
"custom/weather"
|
||||
"cpu"
|
||||
"memory"
|
||||
"temperature"
|
||||
|
|
@ -273,6 +275,11 @@ in {
|
|||
];
|
||||
|
||||
modules = {
|
||||
"custom/weather" = {
|
||||
format = "{}";
|
||||
interval = 3600;
|
||||
exec = "nix-shell --command 'python ${../../../scripts/weather.py} ${secrets.profiles.sway.city} ${secrets.profiles.sway.api_key}' ${../../../scripts/weather.nix}";
|
||||
};
|
||||
cpu = { format = " {usage}%"; };
|
||||
memory = { format = " {percentage}%"; };
|
||||
temperature = { format = "﨎 {temperatureC}°C"; };
|
||||
|
|
@ -303,7 +310,7 @@ in {
|
|||
format-ethernet = " {ifname}: {ipaddr}/{cidr}";
|
||||
format-linked = " {ifname} (No IP)";
|
||||
format-disconnected = " Disconnected ";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
format-alt = " {ifname}: {ipaddr}/{cidr}";
|
||||
};
|
||||
clock = { format = " {:%A, %F %T %Z}"; };
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
min-height: 14px
|
||||
}
|
||||
|
||||
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery {
|
||||
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery, #custom-weather {
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
padding-left: 8px;
|
||||
|
|
@ -57,6 +57,7 @@
|
|||
#mpd { border-color: #5af78e }
|
||||
#mpd.disconnected, #mpd.stopped { border-color: #282a36 }
|
||||
#network { border-color: ${colors.base16.color3} }
|
||||
#custom-weather { border-color: ${colors.base16.color15} }
|
||||
#pulseaudio { border-color: ${colors.base16.color2} }
|
||||
#temperature { border-color: ${colors.base16.color4} }
|
||||
#battery { border-color: ${colors.base16.color6} }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue