diff --git a/.config/sway/config b/.config/sway/config index 900d32b8..be724892 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -1,4 +1,21 @@ -include /etc/sway/config.d/* +# include /etc/sway/config.d/* + +# sway does not set DISPLAY/WAYLAND_DISPLAY in the systemd user environment +# See FS#63021 +# Adapted from xorg's 50-systemd-user.sh, which achieves a similar goal. + +# Upstream refuses to set XDG_CURRENT_DESKTOP so we have to. +exec systemctl --user set-environment XDG_CURRENT_DESKTOP=sway +exec systemctl --user import-environment DISPLAY \ + SWAYSOCK \ + WAYLAND_DISPLAY \ + XDG_CURRENT_DESKTOP + +exec hash dbus-update-activation-environment 2>/dev/null && \ + dbus-update-activation-environment --systemd DISPLAY \ + SWAYSOCK \ + XDG_CURRENT_DESKTOP=sway \ + WAYLAND_DISPLAY # Default config for sway # # Copy this to ~/.config/sway/config and edit it to your liking. diff --git a/.config/sway/start.sh b/.config/sway/start.sh new file mode 100755 index 00000000..9c6caaab --- /dev/null +++ b/.config/sway/start.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +export ELECTRON_OZONE_PLATFORM_HINT=auto +export OZONE_PLATFORM=wayland +export XDG_CURRENT_DESKTOP=sway +sway