From df4d1d36d0c29d3cc655c4e35d0f6ebecd6d7303 Mon Sep 17 00:00:00 2001 From: SpringerJack <46654987+SpringerJack@users.noreply.github.com> Date: Tue, 20 Aug 2024 22:51:52 +0200 Subject: [PATCH] Fix onlyMinimized option for icon-tasks (#333) Co-authored-by: Heitor Augusto --- modules/widgets/icon-tasks.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/widgets/icon-tasks.nix b/modules/widgets/icon-tasks.nix index 27e0e6e8..d23ea66b 100644 --- a/modules/widgets/icon-tasks.nix +++ b/modules/widgets/icon-tasks.nix @@ -122,7 +122,19 @@ in onlyInCurrentScreen = mkBoolOption "Whether to show only window tasks that are on the same screen as the widget."; onlyInCurrentDesktop = mkBoolOption "Whether to only show tasks that are on the current virtual desktop."; onlyInCurrentActivity = mkBoolOption "Whether to show only tasks that are on the current activity."; - onlyMinimized = mkBoolOption "Whether to show only window tasks that are minimized."; + onlyMinimized = mkOption { + type = types.nullOr types.bool; + default = null; + example = true; + description = "Whether to show only window tasks that are minimized."; + apply = onlyMinimized: + if onlyMinimized == null + then null + else + if onlyMinimized == true + then 1 + else 0; + }; }; unhideOnAttentionNeeded = mkBoolOption "Whether to unhide if a window wants attention."; newTasksAppearOn = mkOption {