From ee53170351e129372ea9890d47c05834b7cbbf76 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Fri, 5 Nov 2021 23:41:19 +0100 Subject: [PATCH] waybar: Make output configurable --- hosts/miku.nix | 5 ++++- modules/programs/waybar/default.nix | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hosts/miku.nix b/hosts/miku.nix index 98c8aae..b260965 100644 --- a/hosts/miku.nix +++ b/hosts/miku.nix @@ -46,7 +46,10 @@ git.enable = true; #gnome-terminal.enable = true; tmux.enable = true; - waybar.enable = true; + waybar = { + enable = true; + output = "DP-2"; + }; xournalpp.enable = true; zsh.enable = true; }; diff --git a/modules/programs/waybar/default.nix b/modules/programs/waybar/default.nix index da520ac..24976a9 100644 --- a/modules/programs/waybar/default.nix +++ b/modules/programs/waybar/default.nix @@ -5,6 +5,11 @@ let in { options.ptw.programs.waybar = { 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 { @@ -15,7 +20,7 @@ in { style = builtins.readFile ./style.css; settings = [ { - output = [ "DP-2" ]; + output = [ "${cfg.output}" ]; layer = "bottom"; position = "left"; gtk-layer-shell = true;