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; cfg = config.eboskma.programs.waybar;
in 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 { config = mkIf cfg.enable {
programs.waybar = { programs.waybar = {
@ -22,18 +26,18 @@ in
position = "top"; position = "top";
height = 32; height = 32;
modules-left = [ modules-left =
"wlr/workspaces" [ ]
"river/tags" ++ lib.optionals cfg.river [
"river/mode" "river/tags"
"sway/workspaces" "river/mode"
"sway/mode" ]
"custom/now_playing" ++ lib.optionals cfg.sway [
]; "sway/workspaces"
modules-center = [ "sway/mode"
"sway/window" ]
"river/window" ++ [ "custom/now_playing" ];
]; modules-center = (lib.optional cfg.sway "sway/window") ++ (lib.optional cfg.river "river/window");
modules-right = [ modules-right = [
"network" "network"
"memory" "memory"

View file

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