From f978f006632797c98007f12e2f5a952f7b889292 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Wed, 4 Sep 2024 13:00:24 -0400 Subject: [PATCH] meta: Replace mpdris2-rs with mpdris2 mpdris2 seems to have much greater feature support than mpdris2-rs, notably the inclusion of lower notification urgency by default and the ability to start mpdris2 without it showing a stopped notification. The biggest feature, however, is the possibility to run multiple mpdris2 instances at the same time. This was impossible to achieve with mpdris2-rs since it would claim that the bus was already taken. Notably this enables much smoother usage when running mpdris2 in both Hyprland and dwm at the same time. Combined with dunst, this enables seamless notifications between the two environments. --- home/hyprland.nix | 1 - home/mpdris2.nix | 6 ++++++ packages/mpdris2-rs.nix | 31 ------------------------------- 3 files changed, 6 insertions(+), 32 deletions(-) create mode 100644 home/mpdris2.nix delete mode 100644 packages/mpdris2-rs.nix diff --git a/home/hyprland.nix b/home/hyprland.nix index 9aa952d5..7525bef4 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -61,7 +61,6 @@ in "wpctl set-volume @DEFAULT_AUDIO_SINK@ 20%" "ironbar" "fcitx5" - "mpdris2-rs" "hyprctl dispatch workspace 5000000" "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" "hyprdim --no-dim-when-only --persist --ignore-leaving-special --dialog-dim" diff --git a/home/mpdris2.nix b/home/mpdris2.nix new file mode 100644 index 00000000..f75bc2e6 --- /dev/null +++ b/home/mpdris2.nix @@ -0,0 +1,6 @@ +{ + services.mpdris2 = { + enable = true; + notifications = true; + }; +} diff --git a/packages/mpdris2-rs.nix b/packages/mpdris2-rs.nix deleted file mode 100644 index 4c1edc41..00000000 --- a/packages/mpdris2-rs.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - lib, - rustPlatform, - fetchFromGitHub, -}: - -rustPlatform.buildRustPackage rec { - pname = "mpdris2-rs"; - version = "0.2.3"; - - src = fetchFromGitHub { - owner = "szclsya"; - repo = "mpdris2-rs"; - rev = version; - hash = "sha256-0m1nRanzqzhu6dKDvHFX4srfBTLyh5ln6sVBWBGxxw0="; - }; - - cargoHash = "sha256-WYk9vXhgAepitO3Smv/zxYt+V+aiB786cCfOcaGruQQ="; - - postInstall = '' - install -Dm644 misc/mpdris2-rs.service -t $out/share/systemd/user - ''; - - meta = { - description = "Exposing MPRIS V2.2 D-Bus interface for mpd"; - homepage = "https://github.com/szclsya/mpdris2-rs"; - license = lib.licenses.gpl3Only; - maintainers = with lib.maintainers; [ donovanglover ]; - mainProgram = "mpdris2-rs"; - }; -}