2019-11-07 03:18:26 +01:00
|
|
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
2017-09-04 20:03:20 +02:00
|
|
|
name = "xmonad";
|
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
|
|
maintainers = [ nequissimus ];
|
|
|
|
};
|
|
|
|
|
|
|
|
machine = { lib, pkgs, ... }: {
|
|
|
|
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
|
|
|
services.xserver.displayManager.auto.user = "alice";
|
|
|
|
services.xserver.windowManager.default = lib.mkForce "xmonad";
|
|
|
|
services.xserver.windowManager.xmonad = {
|
|
|
|
enable = true;
|
|
|
|
enableContribAndExtras = true;
|
|
|
|
extraPackages = with pkgs.haskellPackages; haskellPackages: [ xmobar ];
|
2018-11-28 23:08:20 +01:00
|
|
|
config = ''
|
|
|
|
import XMonad
|
|
|
|
import XMonad.Util.EZConfig
|
|
|
|
main = launch $ def `additionalKeysP` myKeys
|
|
|
|
myKeys = [ ("M-C-x", spawn "xterm") ]
|
|
|
|
'';
|
2017-09-04 20:03:20 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-11-07 03:18:26 +01:00
|
|
|
testScript = { nodes, ... }: let
|
|
|
|
user = nodes.machine.config.users.users.alice;
|
|
|
|
in ''
|
|
|
|
machine.wait_for_x()
|
|
|
|
machine.wait_for_file("${user.home}/.Xauthority")
|
|
|
|
machine.succeed("xauth merge ${user.home}/.Xauthority")
|
|
|
|
machine.send_chars("alt-ctrl-x")
|
|
|
|
machine.wait_for_window("${user.name}.*machine")
|
|
|
|
machine.sleep(1)
|
|
|
|
machine.screenshot("terminal")
|
|
|
|
machine.wait_until_succeeds("xmonad --restart")
|
|
|
|
machine.sleep(3)
|
|
|
|
machine.send_chars("alt-shift-ret")
|
|
|
|
machine.wait_for_window("${user.name}.*machine")
|
|
|
|
machine.sleep(1)
|
|
|
|
machine.screenshot("terminal")
|
2017-09-04 20:03:20 +02:00
|
|
|
'';
|
|
|
|
})
|