Update waybar config to updated home-manager schema

This commit is contained in:
Erwin Boskma 2022-06-28 09:00:43 +02:00
parent 5567968ac9
commit dede79d7ac
Signed by: erwin
GPG key ID: 270B20D17394F7E5

View file

@ -49,145 +49,144 @@ in
"idle_inhibitor"
"custom/notifications"
];
modules = {
"clock#time" = {
interval = 1;
format = "{:%H:%M:%S}";
tooltip = false;
};
"clock#date" = {
interval = 10;
format = " {:%e %b %Y}";
tooltip-format = "{:%e %B %Y}";
};
"clock#time" = {
interval = 1;
format = "{:%H:%M:%S}";
tooltip = false;
};
"cpu" = {
interval = 5;
format = " {usage}% ({load})";
states = {
warning = 70;
critical = 90;
};
};
"clock#date" = {
interval = 10;
format = " {:%e %b %Y}";
tooltip-format = "{:%e %B %Y}";
};
"custom/keyboard-layout" = {
exec = "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4";
interval = 30;
format = " {}"; # Icon: keyboard
# Signal sent by Sway key binding (~/.config/sway/key-bindings)
signal = 1; # SIGHUP
tooltip = false;
"cpu" = {
interval = 5;
format = " {usage}% ({load})";
states = {
warning = 70;
critical = 90;
};
};
"memory" = {
interval = 5;
format = " {}%"; # Icon: memory
states = {
warning = 70;
critical = 90;
};
};
"custom/keyboard-layout" = {
exec = "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4";
interval = 30;
format = " {}"; # Icon: keyboard
# Signal sent by Sway key binding (~/.config/sway/key-bindings)
signal = 1; # SIGHUP
tooltip = false;
};
"network" = {
interval = 5;
format-wifi = " {essid} ({signalStrength}%)"; # Icon: wifi
format-ethernet = " {ifname}: {ipaddr}/{cidr}"; # Icon: ethernet
format-disconnected = " Disconnected";
tooltip-format = "{ifname}: {ipaddr}";
"memory" = {
interval = 5;
format = " {}%"; # Icon: memory
states = {
warning = 70;
critical = 90;
};
};
"sway/mode" = {
format = "<span style=\"italic\"> {}</span>"; # Icon: expand-arrows-alt
tooltip = false;
};
"network" = {
interval = 5;
format-wifi = " {essid} ({signalStrength}%)"; # Icon: wifi
format-ethernet = " {ifname}: {ipaddr}/{cidr}"; # Icon: ethernet
format-disconnected = " Disconnected";
tooltip-format = "{ifname}: {ipaddr}";
};
# TODO: package as nix thingy
"custom/now_playing" = {
exec = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token";
exec-on-event = false;
format = " {}";
restart-interval = 1;
return-type = "json";
on-click = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token play-pause";
on-scroll-down = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token volume-up";
on-scroll-up = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token volume-down";
};
"sway/mode" = {
format = "<span style=\"italic\"> {}</span>"; # Icon: expand-arrows-alt
tooltip = false;
};
"sway/window" = {
format = "{}";
max-length = 120;
};
# TODO: package as nix thingy
"custom/now_playing" = {
exec = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token";
exec-on-event = false;
format = " {}";
restart-interval = 1;
return-type = "json";
on-click = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token play-pause";
on-scroll-down = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token volume-up";
on-scroll-up = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token volume-down";
};
"sway/workspaces" = {
all-outputs = false;
disable-scroll = true;
format = "{icon} {name}";
format-icons = {
"urgent" = "";
"focused" = "";
"default" = "";
};
};
"sway/window" = {
format = "{}";
max-length = 120;
};
"pulseaudio" = {
#scroll-step = 1;
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
format-muted = "";
format-icons = {
headphones = "";
handsfree = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [ "" "奔" "" ];
};
on-click = "pavucontrol";
"sway/workspaces" = {
all-outputs = false;
disable-scroll = true;
format = "{icon} {name}";
format-icons = {
"urgent" = "";
"focused" = "";
"default" = "";
};
};
"temperature" = {
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
critical-threshold = 80;
interval = 5;
format = "{icon} {temperatureC}°C";
format-icons = [
"" # Icon = temperature-empty
"" # Icon = temperature-quarter
"" # Icon = temperature-half
"" # Icon = temperature-three-quarters
"" # Icon = temperature-full
];
tooltip = true;
"pulseaudio" = {
#scroll-step = 1;
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
format-muted = "";
format-icons = {
headphones = "";
handsfree = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [ "" "奔" "" ];
};
on-click = "pavucontrol";
};
"tray" = {
icon-size = 21;
spacing = 10;
"temperature" = {
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
critical-threshold = 80;
interval = 5;
format = "{icon} {temperatureC}°C";
format-icons = [
"" # Icon = temperature-empty
"" # Icon = temperature-quarter
"" # Icon = temperature-half
"" # Icon = temperature-three-quarters
"" # Icon = temperature-full
];
tooltip = true;
};
"tray" = {
icon-size = 21;
spacing = 10;
};
"idle_inhibitor" = {
format = "<span size=\"large\">{icon}</span>";
format-icons = {
activated = "";
deactivated = "";
};
"idle_inhibitor" = {
format = "<span size=\"large\">{icon}</span>";
format-icons = {
activated = "";
deactivated = "";
};
};
"custom/notifications" = {
exec = "${pkgs.swaynotificationcenter}/bin/swaync-client --subscribe-waybar";
on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel --skip-wait";
on-click-right = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait";
return-type = "json";
tooltip = false;
format = "{icon}";
format-icons = {
notification = "<span foreground='red'><sup></sup></span>";
none = "";
dnd-notification = "<span foreground='red'><sup></sup></span>";
dnd-none = "";
};
escape = true;
};
"custom/notifications" = {
exec = "${pkgs.swaynotificationcenter}/bin/swaync-client --subscribe-waybar";
on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel --skip-wait";
on-click-right = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait";
return-type = "json";
tooltip = false;
format = "{icon}";
format-icons = {
notification = "<span foreground='red'><sup></sup></span>";
none = "";
dnd-notification = "<span foreground='red'><sup></sup></span>";
dnd-none = "";
};
escape = true;
};
}
];