refactor(waybar): register owned modules

This commit was merged in pull request #168.
This commit is contained in:
alexion committed 2026-10-11 21:07:35 -04:00
1 parent 3c9d0ec886
commit ee29e53f7c
19 files changed
+315 -237

No files matched your search

@@ -2,6 +2,7 @@
config,
lib,
pkgs,
util,
...
}:
# PipeWire as the desktop audio server.
@@ -15,7 +16,7 @@
locked = true;
action = {
kind = "exec";
command = "${pkgs.playerctl}/bin/playerctl play-pause";
command = "${lib.getExe pkgs.playerctl} play-pause";
};
};
@@ -24,7 +25,7 @@
locked = true;
action = {
kind = "exec";
command = "${pkgs.playerctl}/bin/playerctl next";
command = "${lib.getExe pkgs.playerctl} next";
};
};
@@ -33,7 +34,35 @@
locked = true;
action = {
kind = "exec";
command = "${pkgs.playerctl}/bin/playerctl previous";
command = "${lib.getExe pkgs.playerctl} previous";
};
};
};
registry.waybar.${config.networking.hostName} = {
mpris = {
order = 30;
settings = {
format = "${util.glyph "f001"} {title}";
format-paused = "${util.glyph "f04c"} {title}";
max-length = 40;
on-click = "play-pause";
on-scroll-up = "next";
on-scroll-down = "previous";
};
};
wireplumber = {
order = 40;
settings = {
format = "{icon} {volume}%";
format-muted = "${util.glyph "f026"} muted";
format-icons = [
(util.glyph "f026")
(util.glyph "f027")
(util.glyph "f028")
];
on-click = "${lib.getExe' pkgs.wireplumber "wpctl"} set-mute @DEFAULT_AUDIO_SINK@ toggle";
};
};
};