mirror of
https://github.com/nix-community/home-manager
synced 2025-01-11 11:39:49 +01:00
sway: import XDG_SESSION_TYPE in systemd user environment (#3328)
- The `XDG_SESSION_TYPE` environment variable is used by some applications and frameworks to
detect wayland sessions (i.e qt5/6, electron/chromium). It is set by wlroots since version 0.13.0 [1].
- Propagating `XDG_SESSION_TYPE` to the systemd user environment is necessary when processes launched by
services (e.g emacs) need to inherit the environment variable.
[1] - 90c8452959
This commit is contained in:
parent
fad4e7c79c
commit
2464c21ab2
10 changed files with 10 additions and 10 deletions
|
@ -317,7 +317,7 @@ let
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
[ ]) ++ (optional cfg.systemdIntegration ''
|
[ ]) ++ (optional cfg.systemdIntegration ''
|
||||||
exec "${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target"'')
|
exec "${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target"'')
|
||||||
++ (optional (!cfg.xwayland) "xwayland disable") ++ [ cfg.extraConfig ]));
|
++ (optional (!cfg.xwayland) "xwayland disable") ++ [ cfg.extraConfig ]));
|
||||||
|
|
||||||
defaultSwayPackage = pkgs.sway.override {
|
defaultSwayPackage = pkgs.sway.override {
|
||||||
|
|
|
@ -106,4 +106,4 @@ bar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target"
|
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target"
|
||||||
|
|
|
@ -105,5 +105,5 @@ bar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target"
|
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target"
|
||||||
exec_always pkill flashfocus; flasfocus &
|
exec_always pkill flashfocus; flasfocus &
|
||||||
|
|
|
@ -103,4 +103,4 @@ bar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target"
|
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target"
|
||||||
|
|
|
@ -81,4 +81,4 @@ mode "resize" {
|
||||||
bindsym l resize grow width 10 px
|
bindsym l resize grow width 10 px
|
||||||
}
|
}
|
||||||
|
|
||||||
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target"
|
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target"
|
||||||
|
|
|
@ -81,4 +81,4 @@ mode "resize" {
|
||||||
bindsym l resize grow width 10 px
|
bindsym l resize grow width 10 px
|
||||||
}
|
}
|
||||||
|
|
||||||
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target"
|
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target"
|
||||||
|
|
|
@ -115,4 +115,4 @@ bar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target"
|
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target"
|
||||||
|
|
|
@ -103,4 +103,4 @@ bar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target"
|
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target"
|
||||||
|
|
|
@ -102,4 +102,4 @@ bar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target"
|
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target"
|
||||||
|
|
|
@ -107,4 +107,4 @@ workspace "1" output eDP
|
||||||
workspace "ABC" output DP
|
workspace "ABC" output DP
|
||||||
workspace "3: Test" output HDMI
|
workspace "3: Test" output HDMI
|
||||||
workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output DVI
|
workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output DVI
|
||||||
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target"
|
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target"
|
||||||
|
|
Loading…
Reference in a new issue