From e6f27aa0849f43e824a3fa1735745a5d441ef3e8 Mon Sep 17 00:00:00 2001 From: Sunderland93 Date: Thu, 24 Aug 2023 18:32:37 +0400 Subject: [PATCH] Import variables to D-Bus and systemd --- etc/skel/.config/river/init | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/etc/skel/.config/river/init b/etc/skel/.config/river/init index 276d17d..7318949 100755 --- a/etc/skel/.config/river/init +++ b/etc/skel/.config/river/init @@ -1,5 +1,14 @@ #!/usr/bin/env bash +# Import environment variables to D-Bus and systemd +VARIABLES="DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE" + +if hash dbus-update-activation-environment 2>/dev/null; then + exec dbus-update-activation-environment --systemd ${VARIABLES:- --all} +fi + +exec systemctl --user import-environment $VARIABLES + # Binding to reload the configuration (good for edits on bindings or adding new stuff riverctl map normal "Mod4" R spawn $HOME/.config/river/init