aboutsummaryrefslogtreecommitdiff
path: root/tests/modules/services/window-managers
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2019-10-08 22:46:27 +0200
committerRobert Helgesson <robert@rycee.net>2019-10-26 13:07:04 +0200
commit797c77a00a50009239bc2b6576283e49fbd63b40 (patch)
tree65acc73e31053e429cc390ae4e356530857c80b4 /tests/modules/services/window-managers
parenta177d0282fbb6af0668b63fba3dfb74cb25f3178 (diff)
tests: reduce number of downloads
This replaces some derivation outputs by simple strings rather than full Nix store paths. This removes the need to download the whole derivation when all we need is a static string.
Diffstat (limited to 'tests/modules/services/window-managers')
-rw-r--r--tests/modules/services/window-managers/i3-keybindings-expected.conf100
-rw-r--r--tests/modules/services/window-managers/i3-keybindings.nix25
2 files changed, 117 insertions, 8 deletions
diff --git a/tests/modules/services/window-managers/i3-keybindings-expected.conf b/tests/modules/services/window-managers/i3-keybindings-expected.conf
new file mode 100644
index 00000000000..fbf9fe342e7
--- /dev/null
+++ b/tests/modules/services/window-managers/i3-keybindings-expected.conf
@@ -0,0 +1,100 @@
+font pango:monospace 8
+floating_modifier Mod1
+new_window normal 2
+new_float normal 2
+hide_edge_borders none
+force_focus_wrapping no
+focus_follows_mouse yes
+focus_on_window_activation smart
+mouse_warping output
+workspace_layout default
+
+client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
+client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
+client.unfocused #333333 #222222 #888888 #292d2e #222222
+client.urgent #2f343a #900000 #ffffff #900000 #900000
+client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
+client.background #ffffff
+
+bindsym Mod1+1 workspace 1
+bindsym Mod1+2 workspace 2
+bindsym Mod1+3 workspace 3
+bindsym Mod1+4 workspace 4
+bindsym Mod1+5 workspace 5
+bindsym Mod1+6 workspace 6
+bindsym Mod1+7 workspace 7
+bindsym Mod1+8 workspace 8
+bindsym Mod1+9 workspace 9
+bindsym Mod1+Down focus down
+bindsym Mod1+Invented invented-key-command
+bindsym Mod1+Left overridden-command
+bindsym Mod1+Return exec i3-sensible-terminal
+
+bindsym Mod1+Shift+1 move container to workspace 1
+bindsym Mod1+Shift+2 move container to workspace 2
+bindsym Mod1+Shift+3 move container to workspace 3
+bindsym Mod1+Shift+4 move container to workspace 4
+bindsym Mod1+Shift+5 move container to workspace 5
+bindsym Mod1+Shift+6 move container to workspace 6
+bindsym Mod1+Shift+7 move container to workspace 7
+bindsym Mod1+Shift+8 move container to workspace 8
+bindsym Mod1+Shift+9 move container to workspace 9
+bindsym Mod1+Shift+Down move down
+bindsym Mod1+Shift+Left move left
+bindsym Mod1+Shift+Right move right
+bindsym Mod1+Shift+Up move up
+bindsym Mod1+Shift+c reload
+bindsym Mod1+Shift+e exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'
+bindsym Mod1+Shift+q kill
+bindsym Mod1+Shift+r restart
+bindsym Mod1+Shift+space floating toggle
+bindsym Mod1+Up focus up
+bindsym Mod1+d exec @dmenu@/bin/dmenu_run
+bindsym Mod1+e layout toggle split
+bindsym Mod1+f fullscreen toggle
+bindsym Mod1+h split h
+bindsym Mod1+r mode resize
+bindsym Mod1+s layout stacking
+bindsym Mod1+space focus mode_toggle
+bindsym Mod1+v split v
+bindsym Mod1+w layout tabbed
+
+mode "resize" {
+bindsym Down resize grow height 10 px or 10 ppt
+bindsym Escape mode default
+bindsym Left resize shrink width 10 px or 10 ppt
+bindsym Return mode default
+bindsym Right resize grow width 10 px or 10 ppt
+bindsym Up resize shrink height 10 px or 10 ppt
+}
+
+
+bar {
+
+ font pango:monospace 8
+ mode dock
+ hidden_state hide
+ position bottom
+ status_command @i3status@/bin/i3status
+ i3bar_command @i3@/bin/i3bar
+ workspace_buttons yes
+ strip_workspace_numbers no
+ tray_output primary
+ colors {
+ background #000000
+ statusline #ffffff
+ separator #666666
+ focused_workspace #4c7899 #285577 #ffffff
+ active_workspace #333333 #5f676a #ffffff
+ inactive_workspace #333333 #222222 #888888
+ urgent_workspace #2f343a #900000 #ffffff
+ binding_mode #2f343a #900000 #ffffff
+ }
+
+}
+
+
+
+
+
+
diff --git a/tests/modules/services/window-managers/i3-keybindings.nix b/tests/modules/services/window-managers/i3-keybindings.nix
index b5ee4fd8765..89e545be9df 100644
--- a/tests/modules/services/window-managers/i3-keybindings.nix
+++ b/tests/modules/services/window-managers/i3-keybindings.nix
@@ -18,17 +18,26 @@ with lib;
};
};
- nmt.script = ''
- assertFileExists home-files/.config/i3/config
+ nixpkgs.overlays = [
+ (self: super: {
+ dmenu = super.dmenu // {
+ outPath = "@dmenu@";
+ };
- assertFileRegex home-files/.config/i3/config \
- 'bindsym Mod1+Left overridden-command'
+ i3 = super.i3 // {
+ outPath = "@i3@";
+ };
- assertFileNotRegex home-files/.config/i3/config \
- 'Mod1+Right'
+ i3status = super.i3status // {
+ outPath = "@i3status@";
+ };
+ })
+ ];
- assertFileRegex home-files/.config/i3/config \
- 'bindsym Mod1+Invented invented-key-command'
+ nmt.script = ''
+ assertFileExists home-files/.config/i3/config
+ assertFileContent home-files/.config/i3/config \
+ ${./i3-keybindings-expected.conf}
'';
};
}