From 690d93c22a8812c303a52786022f3f0441dfd06a Mon Sep 17 00:00:00 2001 From: Alex Rice Date: Thu, 24 Sep 2020 10:16:54 +0100 Subject: [PATCH] sway: fix startup example (#1517) Fixes #1515. Example for `wayland.windowManager.config.startup` referenced options `notification` and `workspace` which are not valid for sway. --- .../window-managers/i3-sway/lib/options.nix | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/modules/services/window-managers/i3-sway/lib/options.nix b/modules/services/window-managers/i3-sway/lib/options.nix index edfdcd4f..a8250291 100644 --- a/modules/services/window-managers/i3-sway/lib/options.nix +++ b/modules/services/window-managers/i3-sway/lib/options.nix @@ -645,13 +645,22 @@ in { See . ''; - example = literalExample '' - [ - { command = "systemctl --user restart polybar"; always = true; notification = false; } - { command = "dropbox start"; notification = false; } - { command = "firefox"; workspace = "1: web"; } - ]; - ''; + example = if moduleName == "i3" then + literalExample '' + [ + { command = "systemctl --user restart polybar"; always = true; notification = false; } + { command = "dropbox start"; notification = false; } + { command = "firefox"; workspace = "1: web"; } + ]; + '' + else + literalExample '' + [ + { command = "systemctl --user restart waybar"; always = true; } + { command = "dropbox start"; } + { command = "firefox"; } + ] + ''; }; gaps = mkOption {