home/zsh: run tmux in systemd user instead of session scope

This commit is contained in:
Asmir A 2024-01-15 15:53:44 +01:00
parent ccd346efdb
commit 7e41ce1049
Signed by: asmir
GPG Key ID: 020C42B7A9ABA3E2

View File

@ -101,7 +101,7 @@
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
TMUX_EXE="${pkgs.tmux}/bin/tmux"
$TMUX_EXE attach-session -t $USER || $TMUX_EXE new-session -s $USER
systemd-run --scope --user $TMUX_EXE attach-session -t $USER || systemd-run --scope --user $TMUX_EXE new-session -s $USER
fi
'';
};