sway: Make it possible to use exec in extraSessionCommands
This is useful for use-cases like this (logging to journald):
```
programs.sway.extraSessionCommands = ''
if [ -z "$_SWAY_DID_SYSTEMD_CAT" ]; then
export _SWAY_DID_SYSTEMD_CAT=1
exec ${config.systemd.package}/bin/systemd-cat -t sway "$0" "$@"
fi
# ... (potentially also another exec)
'';
```
Without this change the rest of the extraSessionCommands won't be
executed after the exec since the whole extraSessionCommands block would
be skipped during the re-execution (_SWAY_WRAPPER_ALREADY_EXECUTED is
already set).
This commit is contained in:
parent
63acac6435
commit
1a047c4a8e
@ -14,8 +14,8 @@ let
|
||||
baseWrapper = writeShellScriptBin "sway" ''
|
||||
set -o errexit
|
||||
if [ ! "$_SWAY_WRAPPER_ALREADY_EXECUTED" ]; then
|
||||
export _SWAY_WRAPPER_ALREADY_EXECUTED=1
|
||||
${extraSessionCommands}
|
||||
export _SWAY_WRAPPER_ALREADY_EXECUTED=1
|
||||
fi
|
||||
if [ "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||
export DBUS_SESSION_BUS_ADDRESS
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user