mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
sway: add 'xwayland disable' to sway config if disabled (#2568)
Closes #2567
This commit is contained in:
parent
c61fc1c288
commit
42ba7b6304
13 changed files with 29 additions and 14 deletions
|
@ -311,10 +311,10 @@ let
|
|||
)}
|
||||
''
|
||||
else
|
||||
"") + "\n" + (if cfg.systemdIntegration then ''
|
||||
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||
'' else
|
||||
"") + cfg.extraConfig);
|
||||
"") + (concatStringsSep "\n" ((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;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
sway-followmouse = ./sway-followmouse.nix;
|
||||
sway-followmouse-legacy = ./sway-followmouse-legacy.nix;
|
||||
sway-modules = ./sway-modules.nix;
|
||||
sway-no-xwayland = ./sway-no-xwayland.nix;
|
||||
sway-null-config = ./sway-null-config.nix;
|
||||
sway-null-package = ./sway-null-package.nix;
|
||||
sway-post-2003 = ./sway-post-2003.nix;
|
||||
|
|
|
@ -110,5 +110,4 @@ bar {
|
|||
|
||||
}
|
||||
|
||||
|
||||
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||
|
|
|
@ -110,5 +110,4 @@ bar {
|
|||
|
||||
}
|
||||
|
||||
|
||||
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||
|
|
|
@ -110,5 +110,4 @@ bar {
|
|||
|
||||
}
|
||||
|
||||
|
||||
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||
|
|
|
@ -83,5 +83,4 @@ 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"
|
||||
|
|
|
@ -83,5 +83,4 @@ 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"
|
||||
|
|
|
@ -122,5 +122,4 @@ bar {
|
|||
|
||||
}
|
||||
|
||||
|
||||
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./sway-stubs.nix ];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { outPath = "@sway@"; };
|
||||
config = null;
|
||||
systemdIntegration = false;
|
||||
xwayland = false;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/sway/config
|
||||
assertFileContent home-files/.config/sway/config \
|
||||
${
|
||||
pkgs.writeText "expected" ''
|
||||
xwayland disable
|
||||
''
|
||||
}
|
||||
'';
|
||||
}
|
|
@ -13,6 +13,6 @@
|
|||
nmt.script = ''
|
||||
assertFileExists home-files/.config/sway/config
|
||||
assertFileContent home-files/.config/sway/config \
|
||||
${pkgs.writeText "expected" "\n"}
|
||||
${pkgs.writeText "expected" ""}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -110,5 +110,4 @@ bar {
|
|||
|
||||
}
|
||||
|
||||
|
||||
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||
|
|
|
@ -109,5 +109,4 @@ bar {
|
|||
|
||||
}
|
||||
|
||||
|
||||
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||
|
|
|
@ -114,5 +114,4 @@ workspace "1" output eDP
|
|||
workspace "ABC" output DP
|
||||
workspace "3: Test" output HDMI
|
||||
workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output DVI
|
||||
|
||||
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||
|
|
Loading…
Reference in a new issue