From 2a3523b09bad214ff516a3de40fe0b68e0c77912 Mon Sep 17 00:00:00 2001 From: Soumya Ranjan Patnaik Date: Sun, 21 Apr 2024 04:52:33 +0530 Subject: [PATCH] feat: add support for custom environment files --- usr/lib/systemd/user/regolith-wayland.service | 3 +++ usr/lib/systemd/user/regolith.service | 3 +++ 2 files changed, 6 insertions(+) diff --git a/usr/lib/systemd/user/regolith-wayland.service b/usr/lib/systemd/user/regolith-wayland.service index b13e431..b629998 100644 --- a/usr/lib/systemd/user/regolith-wayland.service +++ b/usr/lib/systemd/user/regolith-wayland.service @@ -23,6 +23,9 @@ Type=notify NotifyAccess=all ExecStart=regolith-session-wayland +# Setup custom environment for session +EnvironmentFile=%h/.config/regolith3/sway/env + # unset some environment variables that were set by the shell and won't work now that the shell is gone ExecStopPost=-/bin/sh -c 'test "$SERVICE_RESULT" != "exec-condition" && systemctl --user unset-environment WAYLAND_DISPLAY DISPLAY XAUTHORITY' diff --git a/usr/lib/systemd/user/regolith.service b/usr/lib/systemd/user/regolith.service index e9e49ba..9aeee8c 100644 --- a/usr/lib/systemd/user/regolith.service +++ b/usr/lib/systemd/user/regolith.service @@ -25,6 +25,9 @@ Type=notify NotifyAccess=all ExecStart=regolith-session-init +# Setup custom environment for session +EnvironmentFile=%h/.config/regolith3/sway/env + # On X11 we do not need to unset any variables # On X11 we want to restart on-success and on-failure.