i3 module: fonts option for bar section
This commit is contained in:
parent
9fe6fa7f44
commit
97c6073d39
|
@ -8,6 +8,18 @@ let
|
||||||
|
|
||||||
dag = config.lib.dag;
|
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 {
|
startupModule = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
command = mkOption {
|
command = mkOption {
|
||||||
|
@ -92,6 +104,8 @@ let
|
||||||
|
|
||||||
barModule = types.submodule {
|
barModule = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
inherit (commonOptions) fonts;
|
||||||
|
|
||||||
id = mkOption {
|
id = mkOption {
|
||||||
type = types.nullOr types.string;
|
type = types.nullOr types.string;
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -241,15 +255,7 @@ let
|
||||||
|
|
||||||
configModule = types.submodule {
|
configModule = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
fonts = mkOption {
|
inherit (commonOptions) fonts;
|
||||||
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" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
window = mkOption {
|
window = mkOption {
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
|
@ -660,11 +666,12 @@ let
|
||||||
);
|
);
|
||||||
|
|
||||||
barStr = {
|
barStr = {
|
||||||
id, mode, hiddenState, position, workspaceButtons,
|
id, fonts, mode, hiddenState, position, workspaceButtons,
|
||||||
workspaceNumbers, command, statusCommand, colors, ...
|
workspaceNumbers, command, statusCommand, colors, ...
|
||||||
}: ''
|
}: ''
|
||||||
bar {
|
bar {
|
||||||
${optionalString (id != null) "id ${id}"}
|
${optionalString (id != null) "id ${id}"}
|
||||||
|
font pango:${concatStringsSep ", " fonts}
|
||||||
mode ${mode}
|
mode ${mode}
|
||||||
hidden_state ${hiddenState}
|
hidden_state ${hiddenState}
|
||||||
position ${position}
|
position ${position}
|
||||||
|
|
Loading…
Reference in a new issue