diff --git a/Makefile b/Makefile index a3c3f2a..93056a3 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ install-sddm: install-sway: build install -D -m 0644 -pv -t $(DESTDIR)$(SYSCONFDIR)/sway sway/config + install -D -m 0644 -pv -t $(DESTDIR)$(SYSCONFDIR)/sway sway/environment install -D -m 0755 -pv -t $(DESTDIR)$(BINDIR) sway/start-sway install -D -m 0644 -pv -t $(DESTDIR)$(DATADIR)/wayland-sessions sway/sway.desktop install -D -m 0644 -pv -t $(DESTDIR)$(DATADIR)/sway/config.d sway/config.d/*.conf diff --git a/sway-config-fedora.spec.rpkg b/sway-config-fedora.spec.rpkg index 0dc9ac5..50e9ff3 100644 --- a/sway-config-fedora.spec.rpkg +++ b/sway-config-fedora.spec.rpkg @@ -83,6 +83,7 @@ to use Sway for the greeter display server. %files %license LICENSE %config(noreplace) %{_sysconfdir}/sway/config +%config(noreplace) %{_sysconfdir}/sway/environment %dir %{_sysconfdir}/swaylock %config(noreplace) %{_sysconfdir}/swaylock/config %{_bindir}/start-sway diff --git a/sway/environment b/sway/environment new file mode 100644 index 0000000..dc7855d --- /dev/null +++ b/sway/environment @@ -0,0 +1,20 @@ +# This file is a part of Fedora configuration for Sway and will be sourced +# from /usr/bin/start-sway script for all users of the system. +# User-specific variables should be placed in $XDG_CONFIG_HOME/sway/environment +# +# vim: set ft=sh: + +## Pass extra arguments to the /usr/bin/sway executable + +#SWAY_EXTRA_ARGS="$SWAY_EXTRA_ARGS --unsupported-gpu" +#SWAY_EXTRA_ARGS="$SWAY_EXTRA_ARGS --debug" + +## Set environment variables + +# Useful variables for wlroots: +# https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/docs/env_vars.md +# +#WLR_NO_HARDWARE_CURSORS=1 + +# Application compatibility +_JAVA_AWT_WM_NONREPARENTING=1 diff --git a/sway/start-sway b/sway/start-sway index eea077a..fa039e7 100755 --- a/sway/start-sway +++ b/sway/start-sway @@ -19,22 +19,19 @@ if systemd-detect-virt --quiet --vm; then export WLR_RENDERER=pixman fi -## Application compatibility -export _JAVA_AWT_WM_NONREPARENTING=1 - ## Load system environment customizations -if [ -f /etc/sway/env ]; then +if [ -f /etc/sway/environment ]; then set -o allexport # shellcheck source=/dev/null - . /etc/sway/env + . /etc/sway/environment set +o allexport fi ## Load user environment customizations -if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/sway/env" ]; then +if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/sway/environment" ]; then set -o allexport # shellcheck source=/dev/null - . "${XDG_CONFIG_HOME:-$HOME/.config}/sway/env" + . "${XDG_CONFIG_HOME:-$HOME/.config}/sway/environment" set +o allexport fi