Move environment variables to systemd scope
This commit is contained in:
parent
78acfb298e
commit
d478f3a656
3 changed files with 33 additions and 22 deletions
17
etc/environment.d/90tileos-river.conf
Normal file
17
etc/environment.d/90tileos-river.conf
Normal file
|
@ -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
|
|
@ -1,3 +0,0 @@
|
||||||
# This file is a part of TileOS configuration for River and will be sourced
|
|
||||||
# from /usr/bin/start-river script for all users of the system.
|
|
||||||
# User-specific variables should be placed in $XDG_CONFIG_HOME/river/environment
|
|
|
@ -5,21 +5,6 @@ export XDG_CURRENT_DESKTOP=river
|
||||||
export XDG_SESSION_DESKTOP=river
|
export XDG_SESSION_DESKTOP=river
|
||||||
export XDG_SESSION_TYPE=wayland
|
export XDG_SESSION_TYPE=wayland
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Check if system is running in virtual machine
|
# Check if system is running in virtual machine
|
||||||
case "$(systemd-detect-virt)" in
|
case "$(systemd-detect-virt)" in
|
||||||
qemu)
|
qemu)
|
||||||
|
@ -42,11 +27,23 @@ if [ -d /sys/module/nvidia ]; then
|
||||||
export LIBVA_DRIVER_NAME=nvidia
|
export LIBVA_DRIVER_NAME=nvidia
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Load user environment customizations
|
## Load system environment customizations
|
||||||
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/river/environment" ]; then
|
if [ -d /etc/environment.d ]; then
|
||||||
set -o allexport
|
set -o allexport
|
||||||
|
for f in /etc/environment.d/*.conf; do
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
. "${XDG_CONFIG_HOME:-$HOME/.config}/river/environment"
|
. "$f"
|
||||||
|
done
|
||||||
|
set +o allexport
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Load user environment customizations
|
||||||
|
if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/environment.d" ]; then
|
||||||
|
set -o allexport
|
||||||
|
for i in "${XDG_CONFIG_HOME:-$HOME/.config}/environment.d"/*.conf; do
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. "$i"
|
||||||
|
done
|
||||||
set +o allexport
|
set +o allexport
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue