From 7f4053084c389f767e0fad18db5f16691a46de17 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Mon, 11 May 2020 19:41:44 +0200 Subject: [PATCH] sway: allow unsetting status command --- modules/services/window-managers/i3-sway/lib/functions.nix | 5 ++++- modules/services/window-managers/i3-sway/lib/options.nix | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/services/window-managers/i3-sway/lib/functions.nix b/modules/services/window-managers/i3-sway/lib/functions.nix index dd59e6916..31d314b04 100644 --- a/modules/services/window-managers/i3-sway/lib/functions.nix +++ b/modules/services/window-managers/i3-sway/lib/functions.nix @@ -48,7 +48,10 @@ rec { mode ${mode} hidden_state ${hiddenState} position ${position} - status_command ${statusCommand} + ${ + optionalString (statusCommand != null) + "status_command ${statusCommand}" + } ${moduleName}bar_command ${command} workspace_buttons ${if workspaceButtons then "yes" else "no"} strip_workspace_numbers ${if !workspaceNumbers then "yes" else "no"} diff --git a/modules/services/window-managers/i3-sway/lib/options.nix b/modules/services/window-managers/i3-sway/lib/options.nix index 690bbbcc2..38f2ec196 100644 --- a/modules/services/window-managers/i3-sway/lib/options.nix +++ b/modules/services/window-managers/i3-sway/lib/options.nix @@ -111,7 +111,7 @@ let }; statusCommand = mkOption { - type = types.str; + type = types.nullOr types.str; default = "${pkgs.i3status}/bin/i3status"; description = "Command that will be used to get status lines."; };