Skip to content

Commit

Permalink
feat: add support for custom environment files
Browse files Browse the repository at this point in the history
  • Loading branch information
SoumyaRanjanPatnaik committed Apr 20, 2024
1 parent 778a9e9 commit 2a3523b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions usr/lib/systemd/user/regolith-wayland.service
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
3 changes: 3 additions & 0 deletions usr/lib/systemd/user/regolith.service
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2a3523b

Please sign in to comment.