2 ms·
>~/.config/environment.d/envvars.conf Set it by exec'ing from your sway config instead. Otherwise every session under your user will think it's running in sway
by Arnavion 4y ago
>~/.config/environment.d/envvars.conf
Set it by exec'ing from your sway config instead. Otherwise every session under your user will think it's running in sway, even if it isn't.
How to do that is explained in the xdpw wiki.
>For whatever reason this isn't set by Sway.
It's because sway generally doesn't do any kind of integration with anything not related to Wayland, which in this case is systemd and dbus. It gives you the tools to do it yourself.
Distros that provide pre-configured packages of sway should ship such a config by default. Eg OpenSUSE has https://github.com/openSUSE/openSUSEway/blob/ee8fe750a843165b821ccf41aec0ff73973c72db/sway/sway-run.sh#L6 https://github.com/openSUSE/openSUSEway/blob/ee8fe750a843165... + https://github.com/openSUSE/openSUSEway/blob/ee8fe750a843165b821ccf41aec0ff73973c72db/.config/sway/config.d/50-openSUSE.conf#L54 https://github.com/openSUSE/openSUSEway/blob/ee8fe750a843165...
- bravetraveler 4y agoThat's fair (RE: setting/sessions). The method I proposed relies on consistency everywhere else (defining that to something), and assumes Sway if not :P It looks like this (on Fedora) is generally dealt with by the 'sway-systemd' package. That provides a drop-in config (/etc/sway/config.d/10-systemd-session.conf) that runs a script and prepares the environment for you (including this variable) $ dnf whatprovides /etc/sway/config.d/10-systemd-session.conf [...] sway-systemd-0.2.2-1.fc36.noarch : Systemd integration for Sway session Repo : @System Matched from: Filename : /etc/sway/config.d/10-systemd-session.conf It's rather similar to the openSUSE approach you shared, but seemingly a little more robust: https://github.com/alebastr/sway-systemd/blob/main/src/session.sh https://github.com/alebastr/sway-systemd/blob/main/src/sessi... As long as you do this in your Sway config, it should be fine: include /etc/sway/config.d/* I forgot about that adventure until now -- with something like this, you don't need either 'manual declaration' approach really I initially missed it moving to Sway because I literally copied my i3 config and only changed it slightly