diff --git a/modules/services/window-managers/i3-sway/lib/functions.nix b/modules/services/window-managers/i3-sway/lib/functions.nix index c6a6ada1..4395f38b 100644 --- a/modules/services/window-managers/i3-sway/lib/functions.nix +++ b/modules/services/window-managers/i3-sway/lib/functions.nix @@ -69,8 +69,8 @@ rec { }; barStr = { id, fonts, mode, hiddenState, position, workspaceButtons - , workspaceNumbers, command, statusCommand, colors, trayOutput, extraConfig - , ... }: + , workspaceNumbers, command, statusCommand, colors, trayOutput, trayPadding + , extraConfig, ... }: let colorsNotNull = lib.filterAttrs (n: v: v != null) colors != { }; in '' bar { @@ -93,6 +93,8 @@ rec { lib.hm.booleans.yesNo (!workspaceNumbers) }") (optionalString (trayOutput != null) "tray_output ${trayOutput}") + (optionalString (trayPadding != null) + "tray_padding ${toString trayPadding}") (optionals colorsNotNull (indent (lists.subtractLists [ "" null ] [ "colors {" diff --git a/modules/services/window-managers/i3-sway/lib/options.nix b/modules/services/window-managers/i3-sway/lib/options.nix index 3fe0b755..0cbea642 100644 --- a/modules/services/window-managers/i3-sway/lib/options.nix +++ b/modules/services/window-managers/i3-sway/lib/options.nix @@ -293,6 +293,15 @@ let default = "primary"; description = "Where to output tray."; }; + + trayPadding = mkNullableOption { + type = types.int; + default = null; + description = '' + Sets the pixel padding of the system tray. + This padding will surround the tray on all sides and between each item. + ''; + }; }; };