From 182454fe6b2342011ac3ae7c93cf5fb0ccd17bd7 Mon Sep 17 00:00:00 2001 From: Nicolas Berbiche Date: Tue, 18 Aug 2020 18:49:15 -0400 Subject: [PATCH] kanshi: fix exec configuration Also add a test case for the exec option. PR #1446 --- modules/services/kanshi.nix | 2 +- tests/modules/services/kanshi/basic-configuration.conf | 1 + tests/modules/services/kanshi/basic-configuration.nix | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/services/kanshi.nix b/modules/services/kanshi.nix index e54b83aa4..4e5e5f104 100644 --- a/modules/services/kanshi.nix +++ b/modules/services/kanshi.nix @@ -120,7 +120,7 @@ let '' profile ${name} { ${concatStringsSep "\n " (map outputStr outputs)} - '' + optionalString (exec != null) " ${exec}" + '' + '' + optionalString (exec != null) " exec ${exec}\n" + '' } ''; in { diff --git a/tests/modules/services/kanshi/basic-configuration.conf b/tests/modules/services/kanshi/basic-configuration.conf index 905a539d0..9d6442b98 100644 --- a/tests/modules/services/kanshi/basic-configuration.conf +++ b/tests/modules/services/kanshi/basic-configuration.conf @@ -2,6 +2,7 @@ profile desktop { output "eDP-1" disable output "Iiyama North America PLE2483H-DP" enable position 0,0 output "Iiyama North America PLE2483H-DP 1158765348486" enable mode 1920x1080 position 1920,0 scale 2.100000 transform flipped-270 + exec echo "1 two 3" } profile nomad { diff --git a/tests/modules/services/kanshi/basic-configuration.nix b/tests/modules/services/kanshi/basic-configuration.nix index 08a2c167e..15fbbb9ce 100644 --- a/tests/modules/services/kanshi/basic-configuration.nix +++ b/tests/modules/services/kanshi/basic-configuration.nix @@ -11,6 +11,7 @@ }]; }; desktop = { + exec = ''echo "1 two 3"''; outputs = [ { criteria = "eDP-1";