From 4b17935119197bca8cd7a3784c52f5b9d97daa52 Mon Sep 17 00:00:00 2001 From: Sunderland93 Date: Thu, 17 Aug 2023 17:05:53 +0400 Subject: [PATCH] Improve environment variables export --- debian/changelog | 6 ++++++ etc/environment.d/90tileos-sway.conf | 17 +++++++++++++++++ etc/sway/environment | 18 ------------------ usr/bin/start-sway | 16 ++++++++++------ 4 files changed, 33 insertions(+), 24 deletions(-) create mode 100644 etc/environment.d/90tileos-sway.conf delete mode 100644 etc/sway/environment diff --git a/debian/changelog b/debian/changelog index f07d671..3dada5f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +tileos-settings-sway (0.41~tileos) unstable; urgency=medium + + * Improve environment variables export + + -- Aleksey Samoilov Thu, 17 Aug 2023 17:04:56 +0400 + tileos-settings-sway (0.40~tileos) unstable; urgency=medium * Fix xdg-user-dirs autostart diff --git a/etc/environment.d/90tileos-sway.conf b/etc/environment.d/90tileos-sway.conf new file mode 100644 index 0000000..530ed1d --- /dev/null +++ b/etc/environment.d/90tileos-sway.conf @@ -0,0 +1,17 @@ +# Force Wayland for Mozilla Firefox +MOZ_ENABLE_WAYLAND=1 +MOZ_DBUS_REMOTE=1 + +# Force Wayland for Qt apps +QT_QPA_PLATFORM="wayland;xcb" +QT_QPA_PLATFORMTHEME=qt5ct + +# Set default cursor size +XCURSOR_SIZE=24 + +# Force Wayland for EFL (Enlightenment) apps +ECORE_EVAS_ENGINE="wayland-egl" +ELM_ACCEL="gl" + +# Java XWayland blank screens fix +_JAVA_AWT_WM_NONREPARENTING=1 diff --git a/etc/sway/environment b/etc/sway/environment deleted file mode 100644 index 5b05588..0000000 --- a/etc/sway/environment +++ /dev/null @@ -1,18 +0,0 @@ -# This file is a part of TileOS 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 - -# Force Wayland for Mozilla Firefox -export MOZ_ENABLE_WAYLAND=1 -export MOZ_DBUS_REMOTE=1 - -# Force Wayland for Qt apps -export QT_QPA_PLATFORM="wayland;xcb" -export QT_QPA_PLATFORMTHEME=qt5ct - -# Force Wayland for EFL (Enlightenment) apps -export ECORE_EVAS_ENGINE="wayland-egl" -export ELM_ACCEL="gl" - -# Java XWayland blank screens fix -export _JAVA_AWT_WM_NONREPARENTING=1 diff --git a/usr/bin/start-sway b/usr/bin/start-sway index d164e94..7a24f82 100755 --- a/usr/bin/start-sway +++ b/usr/bin/start-sway @@ -28,18 +28,22 @@ if [ -d /sys/module/nvidia ]; then fi ## Load system environment customizations -if [ -f /etc/sway/environment ]; then +if [ -d /etc/environment.d ]; then set -o allexport - # shellcheck source=/dev/null - . /etc/sway/environment + for f in /etc/environment.d/*.conf; do + # shellcheck source=/dev/null + . "$f" + done set +o allexport fi ## Load user environment customizations -if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/sway/environment" ]; then +if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/environment.d" ]; then set -o allexport - # shellcheck source=/dev/null - . "${XDG_CONFIG_HOME:-$HOME/.config}/sway/environment" + for i in "${XDG_CONFIG_HOME:-$HOME/.config}/environment.d"/*.conf; do + # shellcheck source=/dev/null + . "$i" + done set +o allexport fi