diff --git a/home-manager/modules/waybar/default.nix b/home-manager/modules/waybar/default.nix index 5f6495f..166e607 100644 --- a/home-manager/modules/waybar/default.nix +++ b/home-manager/modules/waybar/default.nix @@ -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 = ''󰁌 {}''; # 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 = ''{icon}''; format-icons = { activated = "󰛐"; diff --git a/users/erwin/work.nix b/users/erwin/work.nix index f2d6cdd..b3599fb 100644 --- a/users/erwin/work.nix +++ b/users/erwin/work.nix @@ -283,6 +283,7 @@ in "secrets" ]; }; + playerctld.enable = true; udiskie = { enable = true; tray = "auto";