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