waybar: Add options to toggle sway and river modules

This commit is contained in:
Erwin Boskma 2024-07-11 16:42:19 +02:00
parent d996cc78ea
commit ac3adb81cb
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk
2 changed files with 21 additions and 14 deletions

View file

@ -9,7 +9,11 @@ let
cfg = config.eboskma.programs.waybar;
in
{
options.eboskma.programs.waybar.enable = mkEnableOption "Enable waybar";
options.eboskma.programs.waybar = {
enable = mkEnableOption "Enable waybar";
sway = mkEnableOption "sway";
river = mkEnableOption "river";
};
config = mkIf cfg.enable {
programs.waybar = {
@ -22,18 +26,18 @@ in
position = "top";
height = 32;
modules-left = [
"wlr/workspaces"
"river/tags"
"river/mode"
"sway/workspaces"
"sway/mode"
"custom/now_playing"
];
modules-center = [
"sway/window"
"river/window"
];
modules-left =
[ ]
++ lib.optionals cfg.river [
"river/tags"
"river/mode"
]
++ lib.optionals cfg.sway [
"sway/workspaces"
"sway/mode"
]
++ [ "custom/now_playing" ];
modules-center = (lib.optional cfg.sway "sway/window") ++ (lib.optional cfg.river "river/window");
modules-right = [
"network"
"memory"

View file

@ -166,7 +166,10 @@ in
};
};
tmux.enable = true;
waybar.enable = true;
waybar = {
enable = true;
sway = true;
};
zathura.enable = true;
zellij = {
enable = true;