about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorLassulus <github@lassul.us>2020-10-13 19:01:56 +0200
committerGitHub <noreply@github.com>2020-10-13 19:01:56 +0200
commit53f810cb4b403fb915577f7bea87f78e8aa2e651 (patch)
treec767b8b98ca9f47712ffc2e524dfbec28af6211e /nixos/tests
parent748bc995207059b61676389c0b953243999f497c (diff)
parent7389407490e3691bcdbd97d680b4e843ceda5609 (diff)
Merge pull request #100141 from xaverdh/xmonad-correct-path
xmonad: put the correct xmonad binary in PATH
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/xmonad.nix18
1 files changed, 12 insertions, 6 deletions
diff --git a/nixos/tests/xmonad.nix b/nixos/tests/xmonad.nix
index 56baae8b9d3cd..308dbca154fd4 100644
--- a/nixos/tests/xmonad.nix
+++ b/nixos/tests/xmonad.nix
@@ -14,9 +14,16 @@ import ./make-test-python.nix ({ pkgs, ...} : {
       extraPackages = with pkgs.haskellPackages; haskellPackages: [ xmobar ];
       config = ''
         import XMonad
+        import XMonad.Operations (restart)
         import XMonad.Util.EZConfig
-        main = launch $ def `additionalKeysP` myKeys
-        myKeys = [ ("M-C-x", spawn "xterm") ]
+        import XMonad.Util.SessionStart
+
+        main = launch $ def { startupHook = startup } `additionalKeysP` myKeys
+
+        startup = isSessionStart >>= \sessInit ->
+          if sessInit then setSessionStarted else spawn "xterm"
+
+        myKeys = [ ("M-C-x", spawn "xterm"), ("M-q", restart "xmonad" True) ]
       '';
     };
   };
@@ -30,12 +37,11 @@ import ./make-test-python.nix ({ pkgs, ...} : {
     machine.send_key("alt-ctrl-x")
     machine.wait_for_window("${user.name}.*machine")
     machine.sleep(1)
-    machine.screenshot("terminal")
-    machine.wait_until_succeeds("xmonad --restart")
+    machine.screenshot("terminal1")
+    machine.send_key("alt-q")
     machine.sleep(3)
-    machine.send_key("alt-shift-ret")
     machine.wait_for_window("${user.name}.*machine")
     machine.sleep(1)
-    machine.screenshot("terminal")
+    machine.screenshot("terminal2")
   '';
 })