From 0fcf2563ad614af604a26b3a5a316a95d6d0fc60 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Sun, 2 Oct 2022 14:08:10 +0530 Subject: [PATCH] environment: Set up environment variables via systemd We were setting these in fish shell setup during login. Move them here so that they can be correctly inherited by systemd services. Without this, the tmux session service does not get the environment variables which do not get set by the time tmux session service starts. https://www.freedesktop.org/software/systemd/man/environment.d.html --- environment/.config/environment.d/10-xdg.conf | 10 ++++++++++ environment/.config/environment.d/20-firefox.conf | 2 ++ environment/.config/environment.d/30-qt.conf | 2 ++ environment/.config/environment.d/40-misc.conf | 9 +++++++++ environment/.config/environment.d/envvars.conf | 5 ----- 5 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 environment/.config/environment.d/10-xdg.conf create mode 100644 environment/.config/environment.d/20-firefox.conf create mode 100644 environment/.config/environment.d/30-qt.conf create mode 100644 environment/.config/environment.d/40-misc.conf delete mode 100644 environment/.config/environment.d/envvars.conf diff --git a/environment/.config/environment.d/10-xdg.conf b/environment/.config/environment.d/10-xdg.conf new file mode 100644 index 0000000..20b3161 --- /dev/null +++ b/environment/.config/environment.d/10-xdg.conf @@ -0,0 +1,10 @@ +XDG_CONFIG_HOME=$HOME/.config +XDG_CACHE_HOME=$HOME/.cache +XDG_DATA_HOME=$HOME/.local/share +XDG_STATE_HOME=$HOME/.local/state + +XDG_SESSION_TYPE=tty +XDG_SESSION_DESKTOP=sway +XDG_CURRENT_DESKTOP=sway + +SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket diff --git a/environment/.config/environment.d/20-firefox.conf b/environment/.config/environment.d/20-firefox.conf new file mode 100644 index 0000000..1e83884 --- /dev/null +++ b/environment/.config/environment.d/20-firefox.conf @@ -0,0 +1,2 @@ +MOZ_ENABLE_WAYLAND=1 +MOZ_DBUS_REMOTE=1 diff --git a/environment/.config/environment.d/30-qt.conf b/environment/.config/environment.d/30-qt.conf new file mode 100644 index 0000000..ba42228 --- /dev/null +++ b/environment/.config/environment.d/30-qt.conf @@ -0,0 +1,2 @@ +QT_QPA_PLATFORM=wayland +QT_QPA_PLATFORMTHEME=qt5ct diff --git a/environment/.config/environment.d/40-misc.conf b/environment/.config/environment.d/40-misc.conf new file mode 100644 index 0000000..617e8b4 --- /dev/null +++ b/environment/.config/environment.d/40-misc.conf @@ -0,0 +1,9 @@ +MANPAGER=nvim +Man! +EDITOR=nvim +VISUAL=nvim + +GST_DEBUG_NO_COLOR=1 +GST_DEBUG_COLOR_MODE=off +GST_DEBUG_DUMP_DOT_DIR=/tmp/gst-dot + +GHCUP_USE_XDG_DIRS=1 diff --git a/environment/.config/environment.d/envvars.conf b/environment/.config/environment.d/envvars.conf deleted file mode 100644 index 8f4566b..0000000 --- a/environment/.config/environment.d/envvars.conf +++ /dev/null @@ -1,5 +0,0 @@ -XDG_CURRENT_DESKTOP="sway" -MOZ_ENABLE_WAYLAND=1 -GTK_USE_PORTAL=0 -QT_QPA_PLATFORM=wayland -QT_QPA_PLATFORMTHEME=qt5ct