diff options
author | Michael Weiss <dev.primeos@gmail.com> | 2019-12-31 16:28:52 +0100 |
---|---|---|
committer | Michael Weiss <dev.primeos@gmail.com> | 2020-04-22 17:09:20 +0200 |
commit | 1a047c4a8eb6e6a1903dfe8453d8df585e22ac9a (patch) | |
tree | 32f5219d1207bab6f7e90f7795b84752d87f0c3b /pkgs/applications/window-managers | |
parent | 63acac64354d35f094350321f85c33a408c8fc72 (diff) |
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).
Diffstat (limited to 'pkgs/applications/window-managers')
-rw-r--r-- | pkgs/applications/window-managers/sway/wrapper.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/applications/window-managers/sway/wrapper.nix b/pkgs/applications/window-managers/sway/wrapper.nix index 7c59b8b7cde4d..3e12e3fcc55f7 100644 --- a/pkgs/applications/window-managers/sway/wrapper.nix +++ b/pkgs/applications/window-managers/sway/wrapper.nix @@ -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 |