i3/sway: improve i3.nix to handle options as list like in sway, adjusted functions for less new-lines (#2314)

* i3/sway: Improve code to generate config to avoid new-line issues on code/config changes

* Maintainer: Add SebTM as maintainer
This commit is contained in:
Basti 2022-03-21 23:52:57 +01:00 committed by GitHub
parent bbc5e0c1e1
commit 80b4360678
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 313 additions and 447 deletions

10
.github/CODEOWNERS vendored
View file

@ -407,13 +407,13 @@
/modules/services/window-managers/herbstluftwm @olmokramer
/tests/modules/services/window-managers/herbstluftwm @olmokramer
/modules/services/window-managers/i3-sway/i3.nix @sumnerevans
/tests/modules/services/window-managers/i3 @sumnerevans
/modules/services/window-managers/i3-sway/i3.nix @sumnerevans @sebtm
/tests/modules/services/window-managers/i3 @sumnerevans @sebtm
/modules/services/window-managers/i3-sway/lib @sumnerevans
/modules/services/window-managers/i3-sway/lib @sumnerevans @sebtm
/modules/services/window-managers/i3-sway/sway.nix @alexarice @sumnerevans
/tests/modules/services/window-managers/sway @sumnerevans
/modules/services/window-managers/i3-sway/sway.nix @alexarice @sumnerevans @sebtm
/tests/modules/services/window-managers/sway @sumnerevans @sebtm
/modules/services/window-managers/i3-sway/swaynag.nix @polykernel

View file

@ -241,4 +241,10 @@
github = "kmaasrud";
githubId = 54394333;
};
sebtm = {
name = "Sebastian Sellmeier";
email = "sebtm@users.noreply.github.com";
github = "sebtm";
githubId = 17243347;
};
}

View file

@ -134,7 +134,7 @@ let
};
commonFunctions = import ./lib/functions.nix {
inherit cfg lib;
inherit config cfg lib;
moduleName = "i3";
};
@ -143,53 +143,49 @@ let
floatingCriteriaStr windowCommandsStr colorSetStr windowBorderString
fontConfigStr keybindingDefaultWorkspace keybindingsRest workspaceOutputStr;
startupEntryStr = { command, always, notification, workspace, ... }: ''
${if always then "exec_always" else "exec"} ${
if (notification && workspace == null) then "" else "--no-startup-id"
} ${
if (workspace == null) then
startupEntryStr = { command, always, notification, workspace, ... }:
concatStringsSep " " [
(if always then "exec_always" else "exec")
(if (notification && workspace == null) then "" else "--no-startup-id")
(if (workspace == null) then
command
else
"i3-msg 'workspace ${workspace}; exec ${command}'"
}
'';
"i3-msg 'workspace ${workspace}; exec ${command}'")
];
configFile = pkgs.writeText "i3.conf" ((if cfg.config != null then
with cfg.config; ''
${fontConfigStr fonts}
floating_modifier ${floating.modifier}
${windowBorderString window floating}
hide_edge_borders ${window.hideEdgeBorders}
force_focus_wrapping ${if focus.forceWrapping then "yes" else "no"}
focus_follows_mouse ${if focus.followMouse then "yes" else "no"}
focus_on_window_activation ${focus.newWindow}
mouse_warping ${if focus.mouseWarping then "output" else "none"}
workspace_layout ${workspaceLayout}
workspace_auto_back_and_forth ${
if workspaceAutoBackAndForth then "yes" else "no"
}
client.focused ${colorSetStr colors.focused}
client.focused_inactive ${colorSetStr colors.focusedInactive}
client.unfocused ${colorSetStr colors.unfocused}
client.urgent ${colorSetStr colors.urgent}
client.placeholder ${colorSetStr colors.placeholder}
client.background ${colors.background}
${keybindingsStr { keybindings = keybindingDefaultWorkspace; }}
${keybindingsStr { keybindings = keybindingsRest; }}
${keycodebindingsStr keycodebindings}
${concatStringsSep "\n" (mapAttrsToList (modeStr false) modes)}
${concatStringsSep "\n" (mapAttrsToList assignStr assigns)}
${concatStringsSep "\n" (map barStr bars)}
${optionalString (gaps != null) gapsStr}
${concatStringsSep "\n" (map floatingCriteriaStr floating.criteria)}
${concatStringsSep "\n" (map windowCommandsStr window.commands)}
${concatStringsSep "\n" (map startupEntryStr startup)}
${concatStringsSep "\n" (map workspaceOutputStr workspaceOutputAssign)}
''
else
"") + "\n" + cfg.extraConfig);
configFile = pkgs.writeText "i3.conf" (concatStringsSep "\n"
((if cfg.config != null then
with cfg.config;
([
(fontConfigStr fonts)
"floating_modifier ${floating.modifier}"
(windowBorderString window floating)
"hide_edge_borders ${window.hideEdgeBorders}"
"force_focus_wrapping ${if focus.forceWrapping then "yes" else "no"}"
"focus_follows_mouse ${if focus.followMouse then "yes" else "no"}"
"focus_on_window_activation ${focus.newWindow}"
"mouse_warping ${if focus.mouseWarping then "output" else "none"}"
"workspace_layout ${workspaceLayout}"
"workspace_auto_back_and_forth ${
if workspaceAutoBackAndForth then "yes" else "no"
}"
"client.focused ${colorSetStr colors.focused}"
"client.focused_inactive ${colorSetStr colors.focusedInactive}"
"client.unfocused ${colorSetStr colors.unfocused}"
"client.urgent ${colorSetStr colors.urgent}"
"client.placeholder ${colorSetStr colors.placeholder}"
"client.background ${colors.background}"
(keybindingsStr { keybindings = keybindingDefaultWorkspace; })
(keybindingsStr { keybindings = keybindingsRest; })
(keycodebindingsStr keycodebindings)
] ++ mapAttrsToList (modeStr false) modes
++ mapAttrsToList assignStr assigns ++ map barStr bars
++ optional (gaps != null) gapsStr
++ map floatingCriteriaStr floating.criteria
++ map windowCommandsStr window.commands ++ map startupEntryStr startup
++ map workspaceOutputStr workspaceOutputAssign)
else
[ ]) ++ [ cfg.extraConfig ]));
# Validates the i3 configuration
checkI3Config =
@ -207,7 +203,7 @@ let
'';
in {
meta.maintainers = with maintainers; [ sumnerevans ];
meta.maintainers = with maintainers; [ sumnerevans sebtm ];
options = {
xsession.windowManager.i3 = {

View file

@ -1,4 +1,4 @@
{ cfg, lib, moduleName }:
{ cfg, config, lib, moduleName }:
with lib;
@ -20,9 +20,9 @@ rec {
cfg.config.defaultWorkspace == null || v != cfg.config.defaultWorkspace)
cfg.config.keybindings;
keybindingsStr = { keybindings, bindsymArgs ? "" }:
keybindingsStr = { keybindings, bindsymArgs ? "", indent ? "" }:
concatStringsSep "\n" (mapAttrsToList (keycomb: action:
optionalString (action != null) "bindsym ${
optionalString (action != null) "${indent}bindsym ${
lib.optionalString (bindsymArgs != "") "${bindsymArgs} "
}${keycomb} ${action}") keybindings);
@ -46,6 +46,7 @@ rec {
${keybindingsStr {
inherit keybindings;
bindsymArgs = lib.optionalString bindkeysToCode "--to-code";
indent = " ";
}}
}
'';
@ -73,89 +74,76 @@ rec {
let colorsNotNull = lib.filterAttrs (n: v: v != null) colors != { };
in ''
bar {
${optionalString (id != null) "id ${id}"}
${fontConfigStr fonts}
${optionalString (mode != null) "mode ${mode}"}
${optionalString (hiddenState != null) "hidden_state ${hiddenState}"}
${optionalString (position != null) "position ${position}"}
${
optionalString (statusCommand != null)
"status_command ${statusCommand}"
concatStringsSep "\n" (indent (lists.subtractLists [ "" null ]
(flatten [
(optionalString (id != null) "id ${id}")
(fontConfigStr fonts)
(optionalString (mode != null) "mode ${mode}")
(optionalString (hiddenState != null)
"hidden_state ${hiddenState}")
(optionalString (position != null) "position ${position}")
(optionalString (statusCommand != null)
"status_command ${statusCommand}")
"${moduleName}bar_command ${command}"
(optionalString (workspaceButtons != null)
"workspace_buttons ${if workspaceButtons then "yes" else "no"}")
(optionalString (workspaceNumbers != null)
"strip_workspace_numbers ${
if !workspaceNumbers then "yes" else "no"
}")
(optionalString (trayOutput != null) "tray_output ${trayOutput}")
(optionals colorsNotNull (indent
(lists.subtractLists [ "" null ] [
"colors {"
(optionalString (colors.background != null)
"background ${colors.background}")
(optionalString (colors.statusline != null)
"statusline ${colors.statusline}")
(optionalString (colors.separator != null)
"separator ${colors.separator}")
(optionalString (colors.focusedBackground != null)
"focused_background ${colors.focusedBackground}")
(optionalString (colors.focusedStatusline != null)
"focused_statusline ${colors.focusedStatusline}")
(optionalString (colors.focusedSeparator != null)
"focused_separator ${colors.focusedSeparator}")
(optionalString (colors.focusedWorkspace != null)
"focused_workspace ${
barColorSetStr colors.focusedWorkspace
}")
(optionalString (colors.activeWorkspace != null)
"active_workspace ${barColorSetStr colors.activeWorkspace}")
(optionalString (colors.inactiveWorkspace != null)
"inactive_workspace ${
barColorSetStr colors.inactiveWorkspace
}")
(optionalString (colors.urgentWorkspace != null)
"urgent_workspace ${barColorSetStr colors.urgentWorkspace}")
(optionalString (colors.bindingMode != null)
"binding_mode ${barColorSetStr colors.bindingMode}")
"}"
])) { })
extraConfig
])) { })
}
${moduleName}bar_command ${command}
${
optionalString (workspaceButtons != null)
"workspace_buttons ${if workspaceButtons then "yes" else "no"}"
}
${
optionalString (workspaceNumbers != null)
"strip_workspace_numbers ${if !workspaceNumbers then "yes" else "no"}"
}
${optionalString (trayOutput != null) "tray_output ${trayOutput}"}
${optionalString colorsNotNull "colors {"}
${
optionalString (colors.background != null)
"background ${colors.background}"
}
${
optionalString (colors.statusline != null)
"statusline ${colors.statusline}"
}
${
optionalString (colors.separator != null)
"separator ${colors.separator}"
}
${
optionalString (colors.focusedBackground != null)
"focused_background ${colors.focusedBackground}"
}
${
optionalString (colors.focusedStatusline != null)
"focused_statusline ${colors.focusedStatusline}"
}
${
optionalString (colors.focusedSeparator != null)
"focused_separator ${colors.focusedSeparator}"
}
${
optionalString (colors.focusedWorkspace != null)
"focused_workspace ${barColorSetStr colors.focusedWorkspace}"
}
${
optionalString (colors.activeWorkspace != null)
"active_workspace ${barColorSetStr colors.activeWorkspace}"
}
${
optionalString (colors.inactiveWorkspace != null)
"inactive_workspace ${barColorSetStr colors.inactiveWorkspace}"
}
${
optionalString (colors.urgentWorkspace != null)
"urgent_workspace ${barColorSetStr colors.urgentWorkspace}"
}
${
optionalString (colors.bindingMode != null)
"binding_mode ${barColorSetStr colors.bindingMode}"
}
${optionalString colorsNotNull "}"}
${extraConfig}
}
'';
gapsStr = with cfg.config.gaps; ''
${optionalString (inner != null) "gaps inner ${toString inner}"}
${optionalString (outer != null) "gaps outer ${toString outer}"}
${optionalString (horizontal != null)
"gaps horizontal ${toString horizontal}"}
${optionalString (vertical != null) "gaps vertical ${toString vertical}"}
${optionalString (top != null) "gaps top ${toString top}"}
${optionalString (bottom != null) "gaps bottom ${toString bottom}"}
${optionalString (left != null) "gaps left ${toString left}"}
${optionalString (right != null) "gaps right ${toString right}"}
${optionalString smartGaps "smart_gaps on"}
${optionalString (smartBorders != "off") "smart_borders ${smartBorders}"}
'';
gapsStr = with cfg.config.gaps;
concatStringsSep "\n" (lists.subtractLists [ "" null ] [
(optionalString (inner != null) "gaps inner ${toString inner}")
(optionalString (outer != null) "gaps outer ${toString outer}")
(optionalString (horizontal != null)
"gaps horizontal ${toString horizontal}")
(optionalString (vertical != null) "gaps vertical ${toString vertical}")
(optionalString (top != null) "gaps top ${toString top}")
(optionalString (bottom != null) "gaps bottom ${toString bottom}")
(optionalString (left != null) "gaps left ${toString left}")
(optionalString (right != null) "gaps right ${toString right}")
(optionalString smartGaps "smart_gaps on")
(optionalString (smartBorders != "off") "smart_borders ${smartBorders}")
]);
windowBorderString = window: floating:
let
@ -172,4 +160,14 @@ rec {
"for_window ${criteriaStr criteria} ${command}";
workspaceOutputStr = item:
''workspace "${item.workspace}" output ${item.output}'';
indent = list:
{ includesWrapper ? true, level ? 1 }:
let prefix = concatStringsSep "" (lib.genList (x: " ") (level * 2));
in (lib.imap1 (i: v:
"${if includesWrapper && (i == 1 || i == (lib.length list)) then
v
else
"${prefix}${v}"}") list);
}

View file

@ -239,7 +239,7 @@ let
};
commonFunctions = import ./lib/functions.nix {
inherit cfg lib;
inherit config cfg lib;
moduleName = "sway";
};
@ -262,42 +262,40 @@ let
outputStr = moduleStr "output";
seatStr = moduleStr "seat";
configFile = pkgs.writeText "sway.conf" ((if cfg.config != null then
with cfg.config; ''
${fontConfigStr fonts}
floating_modifier ${floating.modifier}
${windowBorderString window floating}
hide_edge_borders ${window.hideEdgeBorders}
focus_wrapping ${if focus.forceWrapping then "yes" else "no"}
focus_follows_mouse ${focus.followMouse}
focus_on_window_activation ${focus.newWindow}
mouse_warping ${if focus.mouseWarping then "output" else "none"}
workspace_layout ${workspaceLayout}
workspace_auto_back_and_forth ${
if workspaceAutoBackAndForth then "yes" else "no"
}
client.focused ${colorSetStr colors.focused}
client.focused_inactive ${colorSetStr colors.focusedInactive}
client.unfocused ${colorSetStr colors.unfocused}
client.urgent ${colorSetStr colors.urgent}
client.placeholder ${colorSetStr colors.placeholder}
client.background ${colors.background}
${keybindingsStr {
keybindings = keybindingDefaultWorkspace;
bindsymArgs =
lib.optionalString (cfg.config.bindkeysToCode) "--to-code";
}}
${keybindingsStr {
keybindings = keybindingsRest;
bindsymArgs =
lib.optionalString (cfg.config.bindkeysToCode) "--to-code";
}}
${keycodebindingsStr keycodebindings}
${concatStringsSep "\n" (
# Append all of the lists together to avoid unnecessary whitespace.
mapAttrsToList inputStr input # inputs
configFile = pkgs.writeText "sway.conf" (concatStringsSep "\n"
((if cfg.config != null then
with cfg.config;
([
(fontConfigStr fonts)
"floating_modifier ${floating.modifier}"
(windowBorderString window floating)
"hide_edge_borders ${window.hideEdgeBorders}"
"focus_wrapping ${if focus.forceWrapping then "yes" else "no"}"
"focus_follows_mouse ${focus.followMouse}"
"focus_on_window_activation ${focus.newWindow}"
"mouse_warping ${if focus.mouseWarping then "output" else "none"}"
"workspace_layout ${workspaceLayout}"
"workspace_auto_back_and_forth ${
if workspaceAutoBackAndForth then "yes" else "no"
}"
"client.focused ${colorSetStr colors.focused}"
"client.focused_inactive ${colorSetStr colors.focusedInactive}"
"client.unfocused ${colorSetStr colors.unfocused}"
"client.urgent ${colorSetStr colors.urgent}"
"client.placeholder ${colorSetStr colors.placeholder}"
"client.background ${colors.background}"
(keybindingsStr {
keybindings = keybindingDefaultWorkspace;
bindsymArgs =
lib.optionalString (cfg.config.bindkeysToCode) "--to-code";
})
(keybindingsStr {
keybindings = keybindingsRest;
bindsymArgs =
lib.optionalString (cfg.config.bindkeysToCode) "--to-code";
})
(keycodebindingsStr keycodebindings)
] ++ mapAttrsToList inputStr input
++ mapAttrsToList outputStr output # outputs
++ mapAttrsToList seatStr seat # seats
++ mapAttrsToList (modeStr cfg.config.bindkeysToCode) modes # modes
@ -308,13 +306,11 @@ let
++ map windowCommandsStr window.commands # window commands
++ map startupEntryStr startup # startup
++ map workspaceOutputStr workspaceOutputAssign # custom mapping
)}
''
else
"") + (concatStringsSep "\n" ((optional cfg.systemdIntegration ''
exec "systemctl --user import-environment; systemctl --user start sway-session.target"'')
++ (optional (!cfg.xwayland) "xwayland disable")
++ [ cfg.extraConfig ])));
)
else
[ ]) ++ (optional cfg.systemdIntegration ''
exec "systemctl --user import-environment; systemctl --user start sway-session.target"'')
++ (optional (!cfg.xwayland) "xwayland disable") ++ [ cfg.extraConfig ]));
defaultSwayPackage = pkgs.sway.override {
extraSessionCommands = cfg.extraSessionCommands;
@ -324,7 +320,7 @@ let
};
in {
meta.maintainers = with maintainers; [ alexarice sumnerevans ];
meta.maintainers = with maintainers; [ alexarice sumnerevans sebtm ];
options.wayland.windowManager.sway = {
enable = mkEnableOption "sway wayland compositor";

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+0 workspace number 10
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
@ -66,17 +64,15 @@ 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
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.000000
mode dock
hidden_state hide
@ -98,13 +94,6 @@ bar {
inactive_workspace #333333 #222222 #888888
urgent_workspace #2f343a #900000 #ffffff
binding_mode #2f343a #900000 #ffffff
}
}
}

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+0 workspace number 10
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
@ -66,17 +64,15 @@ 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
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.000000
mode dock
hidden_state hide
@ -90,21 +86,11 @@ bar {
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
}
}
}

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+0 workspace number 10
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
@ -66,17 +64,15 @@ 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
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:FontAwesome, Iosevka 11.500000
mode dock
hidden_state hide
@ -90,21 +86,11 @@ bar {
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
}
}
}

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+0 workspace number 10
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
@ -67,17 +65,15 @@ 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
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.000000
mode dock
hidden_state hide
@ -91,21 +87,11 @@ bar {
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
}
}
}

View file

@ -11,6 +11,6 @@
nmt.script = ''
assertFileExists home-files/.config/i3/config
assertFileContent home-files/.config/i3/config \
${pkgs.writeText "expected" "\n"}
${pkgs.writeText "expected" ""}
'';
}

View file

@ -9,14 +9,12 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
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 number 1
bindsym Mod1+0 workspace number 10
bindsym Mod1+2 workspace number 2
@ -65,17 +63,15 @@ 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
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.000000
mode dock
hidden_state hide
@ -89,21 +85,11 @@ bar {
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
}
}
}

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+0 workspace number 10
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
@ -66,17 +64,15 @@ 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
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.000000
mode dock
hidden_state hide
@ -90,24 +86,15 @@ bar {
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
}
}
}
workspace "1" output eDP
workspace "ABC" output DP
workspace "3: Test" output HDMI
workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output DVI

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
bindsym Mod1+3 workspace number 3
@ -71,20 +69,19 @@ bindsym Mod1+v splitv
bindsym Mod1+w layout tabbed
mode "resize" {
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
}
bar {
font pango:monospace 8.000000
mode dock
hidden_state hide
@ -106,8 +103,7 @@ bar {
inactive_workspace #333333 #222222 #888888
urgent_workspace #2f343a #900000 #ffffff
binding_mode #2f343a #900000 #ffffff
}
}
}
exec "systemctl --user import-environment; systemctl --user start sway-session.target"

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym --to-code Mod1+1 workspace number 1
bindsym --to-code Mod1+2 workspace number 2
bindsym --to-code Mod1+3 workspace number 3
@ -71,20 +69,19 @@ bindsym --to-code Mod1+v splitv
bindsym --to-code Mod1+w layout tabbed
mode "resize" {
bindsym --to-code Down resize grow height 10 px
bindsym --to-code Escape mode default
bindsym --to-code Left resize shrink width 10 px
bindsym --to-code Return mode default
bindsym --to-code Right resize grow width 10 px
bindsym --to-code Up resize shrink height 10 px
bindsym --to-code h resize shrink width 10 px
bindsym --to-code j resize grow height 10 px
bindsym --to-code k resize shrink height 10 px
bindsym --to-code l resize grow width 10 px
bindsym --to-code Down resize grow height 10 px
bindsym --to-code Escape mode default
bindsym --to-code Left resize shrink width 10 px
bindsym --to-code Return mode default
bindsym --to-code Right resize grow width 10 px
bindsym --to-code Up resize shrink height 10 px
bindsym --to-code h resize shrink width 10 px
bindsym --to-code j resize grow height 10 px
bindsym --to-code k resize shrink height 10 px
bindsym --to-code l resize grow width 10 px
}
bar {
font pango:monospace 8.000000
mode dock
hidden_state hide
@ -98,16 +95,12 @@ bar {
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
}
}
}
exec "systemctl --user import-environment; systemctl --user start sway-session.target"

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
bindsym Mod1+3 workspace number 3
@ -71,20 +69,19 @@ bindsym Mod1+v splitv
bindsym Mod1+w layout tabbed
mode "resize" {
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
}
bar {
font pango:monospace 8.000000
mode dock
hidden_state hide
@ -98,16 +95,12 @@ bar {
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
}
}
}
exec "systemctl --user import-environment; systemctl --user start sway-session.target"

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
bindsym Mod1+3 workspace number 3
@ -71,16 +69,16 @@ bindsym Mod1+v splitv
bindsym Mod1+w layout tabbed
mode "resize" {
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
}
exec "systemctl --user import-environment; systemctl --user start sway-session.target"

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
bindsym Mod1+3 workspace number 3
@ -71,16 +69,16 @@ bindsym Mod1+v splitv
bindsym Mod1+w layout tabbed
mode "resize" {
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
}
exec "systemctl --user import-environment; systemctl --user start sway-session.target"

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
bindsym Mod1+3 workspace number 3
@ -83,20 +81,19 @@ hide_cursor when-typing enable
}
mode "resize" {
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
}
bar {
font pango:monospace 8.000000
mode dock
hidden_state hide
@ -110,16 +107,12 @@ bar {
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
}
}
}
exec "systemctl --user import-environment; systemctl --user start sway-session.target"

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
bindsym Mod1+3 workspace number 3
@ -71,20 +69,19 @@ bindsym Mod1+v splitv
bindsym Mod1+w layout tabbed
mode "resize" {
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
}
bar {
font pango:monospace 8.000000
mode dock
hidden_state hide
@ -98,16 +95,12 @@ bar {
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
}
}
}
exec "systemctl --user import-environment; systemctl --user start sway-session.target"

View file

@ -9,14 +9,12 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
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+9 workspace number 9
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
@ -70,20 +68,19 @@ bindsym Mod1+v splitv
bindsym Mod1+w layout tabbed
mode "resize" {
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
}
bar {
font pango:monospace 8.000000
mode dock
hidden_state hide
@ -97,16 +94,12 @@ bar {
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
}
}
}
exec "systemctl --user import-environment; systemctl --user start sway-session.target"

View file

@ -9,7 +9,6 @@ focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
@ -17,7 +16,6 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
bindsym Mod1+3 workspace number 3
@ -71,20 +69,19 @@ bindsym Mod1+v splitv
bindsym Mod1+w layout tabbed
mode "resize" {
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
}
bar {
font pango:monospace 8.000000
mode dock
hidden_state hide
@ -98,16 +95,12 @@ bar {
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
}
}
}
workspace "1" output eDP