Standardize Enums Options for widget-specific options (#246)

This commit is contained in:
Heitor Augusto 2024-07-05 05:27:55 -03:00 committed by GitHub
parent 8bf9cfdc18
commit 71c3fb6eb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,8 +26,8 @@ let
fontType = types.submodule {
options = {
bold = mkBoolOption "Enable bold text.";
fit = mkEnumOption [ "FixedSize" "HorizontalFit" "VerticalFit" "Fit" ] // {
example = "FixedSize";
fit = mkEnumOption [ "fixedSize" "horizontalFit" "verticalFit" "fit" ] // {
example = "fixedSize";
description = "The mode of the size of the font.";
};
size = mkOption {
@ -98,8 +98,8 @@ in
description = "The vertical alignment of the widget.";
apply = convertVerticalAlignment;
};
showDisabledElements = mkEnumOption [ "Deactivated" "HideKeepSpace" "Hide" ] // {
example = "Deactivated";
showDisabledElements = mkEnumOption [ "deactivated" "hideKeepSpace" "hide" ] // {
example = "deactivated";
description = "How to show the elements when the widget is disabled.";
};
fillFreeSpace = mkBoolOption "Whether the widget should fill the free space on the panel.";
@ -123,8 +123,8 @@ in
};
};
windowControlButtons = {
iconSource = mkEnumOption [ "Plasma" "Breeze" "Aurorae" "Oxygen" ] // {
example = "Plasma";
iconSource = mkEnumOption [ "plasma" "breeze" "aurorae" "oxygen" ] // {
example = "plasma";
description = ''
The icon source for the control buttons.
@ -192,15 +192,15 @@ in
default = null;
description = "The text to show when the window title is undefined.";
};
source = mkEnumOption [ "AppName" "Decoration" "GenericAppName" "AlwaysUndefined" ] // {
example = "AppName";
source = mkEnumOption [ "appName" "decoration" "genericAppName" "alwaysUndefined" ] // {
example = "appName";
description = ''
The source of the window title.
- AppName: The name of the application
- Decoration: The title of the window decoration
- GenericAppName: The generic name of the application
- AlwaysUndefined: Always show the undefined title
- appName: The name of the application
- decoration: The title of the window decoration
- genericAppName: The generic name of the application
- alwaysUndefined: Always show the undefined title
'';
};
margins = mkOption {
@ -241,27 +241,27 @@ in
The elements to show in the widget for maximized windows.
'';
};
source = mkEnumOption [ "AppName" "Decoration" "GenericAppName" "AlwaysUndefined" ] // {
example = "AppName";
source = mkEnumOption [ "appName" "decoration" "genericAppName" "alwaysUndefined" ] // {
example = "appName";
description = ''
The source of the window title for maximized windows.
- AppName: The name of the application
- Decoration: The title of the window decoration
- GenericAppName: The generic name of the application
- AlwaysUndefined: Always show the undefined title
- appName: The name of the application
- decoration: The title of the window decoration
- genericAppName: The generic name of the application
- alwaysUndefined: Always show the undefined title
'';
};
};
behavior = {
activeTaskSource = mkEnumOption [ "ActiveTask" "LastActiveTask" "LastActiveMaximized" ] // {
example = "ActiveTask";
activeTaskSource = mkEnumOption [ "activeTask" "lastActiveTask" "lastActiveMaximized" ] // {
example = "activeTask";
description = ''
The source of the active task.
- ActiveTask: The active task
- LastActiveTask: The last active task
- LastActiveMaximized: The last active maximized task
- activeTask: The active task
- lastActiveTask: The last active task
- lastActiveMaximized: The last active maximized task
'';
};
filterByActivity = mkBoolOption "Whether to filter the tasks by activity.";