summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorVladimir-csp <4061903+Vladimir-csp@users.noreply.github.com>2024-08-16 10:19:08 +0300
committerGitHub <noreply@github.com>2024-08-16 08:19:08 +0100
commit682b30fba89c043e86d9c96bdb8df133c1683054 (patch)
treece621aa0d23c88c9e9254719d117c0536e5bfb58 /src/Compositor.cpp
parent12d9901472c6f9128fa8b16c25b3a879d1859e60 (diff)
env: Add HYPRLAND_NO_SD_VARS env condition (#7358)
* Add HYPRLAND_NO_SD_VARS env condition wip #7083 * Formatting shuffle * Formatting
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 4024fadf..9d247a56 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -429,7 +429,7 @@ void CCompositor::cleanEnvironment() {
if (m_bDesktopEnvSet)
unsetenv("XDG_CURRENT_DESKTOP");
- if (m_pAqBackend->hasSession()) {
+ if (m_pAqBackend->hasSession() && !envEnabled("HYPRLAND_NO_SD_VARS")) {
const auto CMD =
#ifdef USES_SYSTEMD
"systemctl --user unset-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS && hash "
@@ -659,7 +659,11 @@ void CCompositor::prepareFallbackOutput() {
void CCompositor::startCompositor() {
signal(SIGPIPE, SIG_IGN);
- if (m_pAqBackend->hasSession() /* Session-less Hyprland usually means a nest, don't update the env in that case */) {
+ if (
+ /* Session-less Hyprland usually means a nest, don't update the env in that case */
+ m_pAqBackend->hasSession() &&
+ /* Activation environment management is not disabled */
+ !envEnabled("HYPRLAND_NO_SD_VARS")) {
const auto CMD =
#ifdef USES_SYSTEMD
"systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS && hash "