1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00

i3 module: fonts option for bar section

This commit is contained in:
gnidorah 2018-09-05 19:13:32 +03:00 committed by Nikita Uvarov
parent 9fe6fa7f44
commit 97c6073d39
No known key found for this signature in database
GPG key ID: F7A5FB3A7C10EF96

View file

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