plugins/alpha: Allow terminal to not set val (#1261)

Fixes #1140
This commit is contained in:
traxys 2024-03-13 17:31:46 +01:00 committed by GitHub
parent 6484938d4b
commit 9b9912077e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 7 deletions

View file

@ -22,9 +22,10 @@ with lib; let
description = "Type of section";
};
val = mkOption {
type = with helpers.nixvimTypes;
oneOf [
val =
helpers.mkNullOrOption
(with helpers.nixvimTypes;
nullOr (oneOf [
# "button", "text"
str
# "padding"
@ -36,10 +37,8 @@ with lib; let
# "group"
(attrsOf anything)
))
];
default = null;
description = "Value for section";
};
]))
"Value for section";
opts = mkOption {
type = with types; attrsOf anything;

View file

@ -13,6 +13,23 @@
};
};
terminal = {
plugins.alpha = {
enable = true;
layout = [
{
type = "terminal";
command = "thisisfine";
width = 46;
height = 25;
opts = {
redraw = true;
};
}
];
};
};
custom-layout = {
plugins.alpha = {
enable = true;