summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorAndré Silva <123550+andresilva@users.noreply.github.com>2023-12-26 17:16:59 +0000
committerGitHub <noreply@github.com>2023-12-26 18:16:59 +0100
commitbfb4d66c8144a36f2c52530f10ae4bac2ac03b09 (patch)
treec7d0d9fbec37a17428bd093bcc8a5ecec77db847 /src/Compositor.cpp
parent34b0ce66b3727d5061a3cec2ac96124470b748da (diff)
compositor: spawn environment setup with keybind manager (#3722)
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 38304f33..c5f54f04 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -516,14 +516,15 @@ void CCompositor::startCompositor() {
signal(SIGPIPE, SIG_IGN);
- if (m_sWLRSession /* Session-less Hyprland usually means a nest, don't update the env in that case */ && fork() == 0)
- execl("/bin/sh", "/bin/sh", "-c",
+ if (m_sWLRSession /* Session-less Hyprland usually means a nest, don't update the env in that case */) {
+ const auto CMD =
#ifdef USES_SYSTEMD
- "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME && hash "
- "dbus-update-activation-environment 2>/dev/null && "
+ "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME && hash "
+ "dbus-update-activation-environment 2>/dev/null && "
#endif
- "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE QT_QPA_PLATFORMTHEME",
- nullptr);
+ "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE QT_QPA_PLATFORMTHEME";
+ g_pKeybindManager->spawn(CMD);
+ }
Debug::log(LOG, "Running on WAYLAND_DISPLAY: {}", m_szWLDisplaySocket);