waybar: Add MPRIS module
This commit is contained in:
parent
6636950cca
commit
1f0b100e86
2 changed files with 24 additions and 11 deletions
|
@ -49,7 +49,8 @@ in
|
|||
"sway/workspaces"
|
||||
"sway/mode"
|
||||
]
|
||||
++ lib.optional (cfg.profile == "home") "custom/now_playing";
|
||||
++ lib.optional (cfg.profile == "home") "custom/now_playing"
|
||||
++ lib.optional (cfg.profile == "work") "mpris";
|
||||
|
||||
modules-center = (lib.optional cfg.sway "sway/window") ++ (lib.optional cfg.river "river/window");
|
||||
|
||||
|
@ -78,7 +79,7 @@ in
|
|||
tooltip-format = "{:%e %B %Y}";
|
||||
};
|
||||
|
||||
"cpu" = {
|
||||
cpu = {
|
||||
interval = 5;
|
||||
format = " {usage}% ({load})"; # Icon: cpu_64_bit
|
||||
states = {
|
||||
|
@ -87,7 +88,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
"memory" = {
|
||||
memory = {
|
||||
interval = 5;
|
||||
format = " {}%"; # Icon: memory
|
||||
states = {
|
||||
|
@ -96,7 +97,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
"network" = {
|
||||
network = {
|
||||
interval = 5;
|
||||
format-wifi = " {essid} ({signalStrength}%)"; # Icon: wifi
|
||||
format-ethernet = " {ifname}: {ipaddr}/{cidr}"; # Icon: ethernet
|
||||
|
@ -116,6 +117,16 @@ in
|
|||
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";
|
||||
};
|
||||
|
||||
mpris = {
|
||||
format = "[{player}] {status_icon} {dynamic}";
|
||||
status-icons = {
|
||||
paused = " "; # Icon: pause
|
||||
playing = " "; # Icon: play
|
||||
stopped = " "; # Icon: stop
|
||||
};
|
||||
on-click-middle = "stop";
|
||||
};
|
||||
|
||||
"sway/mode" = {
|
||||
format = ''<span style="italic"> {}</span>''; # Icon: arrow_expand_all
|
||||
tooltip = false;
|
||||
|
@ -132,9 +143,9 @@ in
|
|||
format = "{icon} {name}";
|
||||
sort-by-number = true;
|
||||
format-icons = {
|
||||
"urgent" = "";
|
||||
"focused" = "";
|
||||
"default" = "";
|
||||
urgent = "";
|
||||
focused = "";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -161,7 +172,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
"wireplumber" = {
|
||||
wireplumber = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = ""; # Icon: volume_off
|
||||
format-icons = {
|
||||
|
@ -182,7 +193,7 @@ in
|
|||
on-click-right = "${pkgs.easyeffects}/bin/easyeffects";
|
||||
};
|
||||
|
||||
"temperature" = {
|
||||
temperature = {
|
||||
hwmon-path = cfg.cpuTempPath;
|
||||
critical-threshold = 80;
|
||||
interval = 5;
|
||||
|
@ -197,11 +208,12 @@ in
|
|||
tooltip = true;
|
||||
};
|
||||
|
||||
"tray" = {
|
||||
tray = {
|
||||
icon-size = 21;
|
||||
spacing = 10;
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
|
||||
idle_inhibitor = {
|
||||
format = ''<span size="large">{icon}</span>'';
|
||||
format-icons = {
|
||||
activated = "";
|
||||
|
|
|
@ -283,6 +283,7 @@ in
|
|||
"secrets"
|
||||
];
|
||||
};
|
||||
playerctld.enable = true;
|
||||
udiskie = {
|
||||
enable = true;
|
||||
tray = "auto";
|
||||
|
|
Loading…
Reference in a new issue