swaync: make the backlight/mpris items configurable

This commit is contained in:
2024-06-18 21:41:15 +00:00
parent a7df4cc125
commit 0bd92ef77e
2 changed files with 9 additions and 0 deletions

View File

@@ -62,6 +62,8 @@ in
name of entry in /sys/class/backlight which indicates the primary backlight. name of entry in /sys/class/backlight which indicates the primary backlight.
''; '';
}; };
enableBacklight = mkEnableOption "include a backlight slider in the swaync dropdown (requires an active session with systemd-logind)";
enableMpris = (mkEnableOption "show the currently playing media in the swaync dropdown, and navigation buttons") // { default = true; };
}; };
}; };
default = {}; default = {};
@@ -166,9 +168,13 @@ in
"dnd" "dnd"
"inhibitors" "inhibitors"
"buttons-grid" "buttons-grid"
] ++ lib.optionals cfg.config.enableBacklight [
"backlight" "backlight"
] ++ [
"volume" "volume"
] ++ lib.optionals cfg.config.enableMpris [
"mpris" "mpris"
] ++ [
"notifications" "notifications"
]; ];
widget-config = { widget-config = {

View File

@@ -45,6 +45,9 @@
actions.screenoff.delay = 300; actions.screenoff.delay = 300;
actions.screenoff.enable = true; actions.screenoff.enable = true;
}; };
sane.programs.swaynotificationcenter.config = {
enableMpris = false; #< consumes too much screen real-estate
};
sane.programs.waybar.config = { sane.programs.waybar.config = {
fontSize = 14; fontSize = 14;