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.
This commit is contained in:
Donovan Glover 2024-09-04 13:00:24 -04:00
parent 6986f725ed
commit f978f00663
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 6 additions and 32 deletions

View File

@ -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"

6
home/mpdris2.nix Normal file
View File

@ -0,0 +1,6 @@
{
services.mpdris2 = {
enable = true;
notifications = true;
};
}

View File

@ -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";
};
}