diff options
author | gnidorah <gnidorah@users.noreply.github.com> | 2018-09-05 19:13:32 +0300 |
---|---|---|
committer | Nikita Uvarov <uv.nikita@gmail.com> | 2018-09-06 17:09:47 +0200 |
commit | 97c6073d39a49a361ac0b217a47e6d8002a86c38 (patch) | |
tree | dddd93e49b5da2a93b166142d79ad9bf78f742ec /modules/services/window-managers | |
parent | 9fe6fa7f44d8672f1824620192fe585edee14fcc (diff) |
i3 module: fonts option for bar section
Diffstat (limited to 'modules/services/window-managers')
-rw-r--r-- | modules/services/window-managers/i3.nix | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/modules/services/window-managers/i3.nix b/modules/services/window-managers/i3.nix index 84b5d25e65b..3e4452351d6 100644 --- a/modules/services/window-managers/i3.nix +++ b/modules/services/window-managers/i3.nix @@ -8,6 +8,18 @@ let dag = config.lib.dag; + commonOptions = { + fonts = mkOption { + type = types.listOf types.string; + default = ["monospace 8"]; + description = '' + Font list used for window titles. Only FreeType fonts are supported. + The order here is improtant (e.g. icons font should go before the one used for text). + ''; + example = [ "FontAwesome 10" "Terminus 10" ]; + }; + }; + startupModule = types.submodule { options = { command = mkOption { @@ -92,6 +104,8 @@ let barModule = types.submodule { options = { + inherit (commonOptions) fonts; + id = mkOption { type = types.nullOr types.string; default = null; @@ -241,15 +255,7 @@ let configModule = types.submodule { options = { - fonts = mkOption { - type = types.listOf types.string; - default = ["monospace 8"]; - description = '' - Font list used for window titles. Only FreeType fonts are supported. - The order here is improtant (e.g. icons font should go before the one used for text). - ''; - example = [ "FontAwesome 10" "Terminus 10" ]; - }; + inherit (commonOptions) fonts; window = mkOption { type = types.submodule { @@ -660,11 +666,12 @@ let ); barStr = { - id, mode, hiddenState, position, workspaceButtons, + id, fonts, mode, hiddenState, position, workspaceButtons, workspaceNumbers, command, statusCommand, colors, ... }: '' bar { ${optionalString (id != null) "id ${id}"} + font pango:${concatStringsSep ", " fonts} mode ${mode} hidden_state ${hiddenState} position ${position} |