waybar: Make output configurable

This commit is contained in:
PapaTutuWawa 2021-11-05 23:41:19 +01:00
parent df9596b2f3
commit ee53170351
2 changed files with 10 additions and 2 deletions

View File

@ -46,7 +46,10 @@
git.enable = true; git.enable = true;
#gnome-terminal.enable = true; #gnome-terminal.enable = true;
tmux.enable = true; tmux.enable = true;
waybar.enable = true; waybar = {
enable = true;
output = "DP-2";
};
xournalpp.enable = true; xournalpp.enable = true;
zsh.enable = true; zsh.enable = true;
}; };

View File

@ -5,6 +5,11 @@ let
in { in {
options.ptw.programs.waybar = { options.ptw.programs.waybar = {
enable = lib.mkEnableOption "Enable and configure waybar using HomeManager"; enable = lib.mkEnableOption "Enable and configure waybar using HomeManager";
output = lib.mkOption {
type = lib.types.str;
example = "DP-2";
description = "The output waybar should appear on";
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -15,7 +20,7 @@ in {
style = builtins.readFile ./style.css; style = builtins.readFile ./style.css;
settings = [ settings = [
{ {
output = [ "DP-2" ]; output = [ "${cfg.output}" ];
layer = "bottom"; layer = "bottom";
position = "left"; position = "left";
gtk-layer-shell = true; gtk-layer-shell = true;