feat(home/waybar): MPD module

This commit is contained in:
punkfairie 2025-03-08 18:45:00 -08:00
parent 4fb610224f
commit 04ece7d9b0
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
2 changed files with 52 additions and 33 deletions

View file

@ -54,6 +54,7 @@ in {
]); ]);
modules-right = modules-right =
[ [
"mpd"
"custom/notifications" "custom/notifications"
"tray" "tray"
] ]
@ -129,6 +130,16 @@ in {
on-scroll-down = niriMsg "focus-workspace-down"; on-scroll-down = niriMsg "focus-workspace-down";
}); });
"mpd" = {
format = "{stateIcon} {title} - {artist} ({elapsedTime:%M:%S}/{totalTime:%M:%S})";
format-disconnected = "󰝛";
format-stopped = "";
state-icons = {
paused = "";
playing = "";
};
};
"custom/notifications" = let "custom/notifications" = let
swaync-client = swaync-client =
lib.getExe' config.services.swaync.package "swaync-client"; lib.getExe' config.services.swaync.package "swaync-client";
@ -224,6 +235,38 @@ in {
background: transparent; background: transparent;
} }
tooltip {
background: @base00;
border: 1px solid @base08;
border-radius: 12px;
}
tooltip label {
color: @base08;
}
#custom-startmenu {
color: @base0B;
background: @base02;
font-size: 28px;
margin: 0;
padding: 0 30px 0 15px;
border-radius: 0 0 40px 0;
}
#window,
#pulseaudio,
#cpu,
#memory {
font-weight: bold;
margin: 4px 0;
margin-left: 7px;
padding: 0 18px;
background: @base04;
color: @base00;
border-radius: 24px 10px 24px 10px;
}
#workspaces { #workspaces {
color: @base00; color: @base00;
background: @base01; background: @base01;
@ -264,39 +307,14 @@ in {
transition: ${transition}; transition: ${transition};
} }
tooltip { #mpd,
background: @base00; #network,
border: 1px solid @base08; #battery,
border-radius: 12px; #custom-notifications,
} #tray,
#custom-exit {
tooltip label {
color: @base08;
}
#window, #pulseaudio, #cpu, #memory {
font-weight: bold; font-weight: bold;
margin: 4px 0; background: @base0D;
margin-left: 7px;
padding: 0 18px;
background: @base04;
color: @base00;
border-radius: 24px 10px 24px 10px;
}
#custom-startmenu {
color: @base0B;
background: @base02;
font-size: 28px;
margin: 0;
padding: 0 30px 0 15px;
border-radius: 0 0 40px 0;
}
#network, #battery, #custom-notifications,
#tray, #custom-exit {
font-weight: bold;
background: @base07;
color: @base00; color: @base00;
margin: 4px 0; margin: 4px 0;
margin-right: 7px; margin-right: 7px;

View file

@ -14,7 +14,8 @@ in {
extensionPackages = with pkgs; [ extensionPackages = with pkgs; [
mopidy-mpd mopidy-mpd
mopidy-jellyfin # TODO: Enable once we have secrets (requires password in config)
# mopidy-jellyfin
]; ];
configuration = configuration =