kanshi: fix exec configuration

Also add a test case for the exec option.

PR #1446
This commit is contained in:
Nicolas Berbiche 2020-08-18 18:49:15 -04:00 committed by Robert Helgesson
parent a063b73d5c
commit 182454fe6b
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 3 additions and 1 deletions

View file

@ -120,7 +120,7 @@ let
'' ''
profile ${name} { profile ${name} {
${concatStringsSep "\n " (map outputStr outputs)} ${concatStringsSep "\n " (map outputStr outputs)}
'' + optionalString (exec != null) " ${exec}" + '' '' + optionalString (exec != null) " exec ${exec}\n" + ''
} }
''; '';
in { in {

View file

@ -2,6 +2,7 @@ profile desktop {
output "eDP-1" disable output "eDP-1" disable
output "Iiyama North America PLE2483H-DP" enable position 0,0 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 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 { profile nomad {

View file

@ -11,6 +11,7 @@
}]; }];
}; };
desktop = { desktop = {
exec = ''echo "1 two 3"'';
outputs = [ outputs = [
{ {
criteria = "eDP-1"; criteria = "eDP-1";