Nix: NumWorkspaces, removed nulls, default HyrplandIPC (#54)

No option for NumWorkspaces and some options could be null while they
shouldn't. Also set UseHyprlandIPC to true by default as that is now
required by Hyprland 0.30.
This commit is contained in:
Edvin Källström 2023-10-11 10:37:10 +02:00 committed by GitHub
parent 96485f408e
commit f5e4638297
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,8 +63,9 @@ in {
default = "/"; default = "/";
description = "The partition to monitor with disk sensor"; description = "The partition to monitor with disk sensor";
}; };
# Note: If the type here is null everything blows up
WorkspaceSymbols = mkOption { WorkspaceSymbols = mkOption {
type = types.nullOr (types.listOf types.str); type = types.listOf types.str;
default = []; default = [];
description = "A list of strings where the position in the list is the icon to change, overrides the default symbol"; description = "A list of strings where the position in the list is the icon to change, overrides the default symbol";
}; };
@ -73,6 +74,11 @@ in {
default = ""; default = "";
description = "The default symbol for the workspaces"; description = "The default symbol for the workspaces";
}; };
NumWorkspaces = mkOption {
type = types.int;
default = 9;
description = "Number of workspaces to display. Displayed workspace IDs are 1-n (Default: 1-9)";
};
WorkspaceScrollOnMonitor = mkOption { WorkspaceScrollOnMonitor = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
@ -85,7 +91,7 @@ in {
}; };
UseHyprlandIPC = mkOption { UseHyprlandIPC = mkOption {
type = types.bool; type = types.bool;
default = false; default = true;
description = '' description = ''
Use Hyprland IPC instead of the ext_workspace protocol for workspace polling. Use Hyprland IPC instead of the ext_workspace protocol for workspace polling.
Hyprland IPC is *slightly* less performant (+0.1% one core), but way less bug prone, Hyprland IPC is *slightly* less performant (+0.1% one core), but way less bug prone,
@ -119,7 +125,7 @@ in {
''; '';
}; };
DateTimeStyle = mkOption { DateTimeStyle = mkOption {
type = types.nullOr types.str; type = types.str;
default = "%a %D - %H:%M:%S %Z"; default = "%a %D - %H:%M:%S %Z";
description = "Set datetime style"; description = "Set datetime style";
}; };
@ -139,7 +145,7 @@ in {
description = "Sets the audio slider to be on reveal (Just like the sensors) when true. Only affects the bar."; description = "Sets the audio slider to be on reveal (Just like the sensors) when true. Only affects the bar.";
}; };
AudioScrollSpeed = mkOption { AudioScrollSpeed = mkOption {
type = types.nullOr types.int; type = types.int;
default = 5; default = 5;
description = "Sets the rate of change of the slider on each scroll. In Percent"; description = "Sets the rate of change of the slider on each scroll. In Percent";
}; };
@ -149,17 +155,17 @@ in {
description = "Display numbers instead of a slider for the two audio widgets. Doesn't affect the audio flyin"; description = "Display numbers instead of a slider for the two audio widgets. Doesn't affect the audio flyin";
}; };
AudioMinVolume = mkOption { AudioMinVolume = mkOption {
type = types.nullOr types.int; type = types.int;
default = 0; default = 0;
description = "Limits the range of the audio slider. Only works for audio output. Slider 'empty' is AudioMinVolume, Slider 'full' is AudioMaxVolume"; description = "Limits the range of the audio slider. Only works for audio output. Slider 'empty' is AudioMinVolume, Slider 'full' is AudioMaxVolume";
}; };
AudioMaxVolume = mkOption { AudioMaxVolume = mkOption {
type = types.nullOr types.int; type = types.int;
default = 100; default = 100;
description = ""; description = "";
}; };
NetworkAdapter = mkOption { NetworkAdapter = mkOption {
type = types.nullOr types.str; type = types.str;
default = "eno1"; default = "eno1";
description = "The network adapter to use. You can query /sys/class/net for all possible values"; description = "The network adapter to use. You can query /sys/class/net for all possible values";
}; };
@ -196,22 +202,22 @@ in {
# - Between ]75%;100%]. 0% = Min...Bytes; 100% = Max...Bytes ("high") # - Between ]75%;100%]. 0% = Min...Bytes; 100% = Max...Bytes ("high")
# - Above Max...Bytes ("over") # - Above Max...Bytes ("over")
MinDownloadBytes = mkOption { MinDownloadBytes = mkOption {
type = types.nullOr types.int; type = types.int;
default = 0; default = 0;
description = ""; description = "";
}; };
MaxDownloadBytes = mkOption { MaxDownloadBytes = mkOption {
type = types.nullOr types.int; type = types.int;
default = 10485760; default = 10485760;
description = ""; description = "";
}; };
MinUploadBytes = mkOption { MinUploadBytes = mkOption {
type = types.nullOr types.int; type = types.int;
default = 0; default = 0;
description = ""; description = "";
}; };
MaxUploadBytes = mkOption { MaxUploadBytes = mkOption {
type = types.nullOr types.int; type = types.int;
default = 5242880; default = 5242880;
description = ""; description = "";
}; };