1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-05 02:39:45 +01:00

i3-sway: add option trayPadding (tray_padding) for bars (#3829)

This commit is contained in:
Basti 2023-04-16 23:34:29 +00:00 committed by GitHub
parent d1d0ee37c3
commit 68eaf4b577
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View file

@ -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 {"

View file

@ -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.
'';
};
};
};