waybar: Make output configurable

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

View File

@@ -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;