diff --git a/bin/login-shell b/bin/login-shell new file mode 100755 index 0000000..499d5f7 --- /dev/null +++ b/bin/login-shell @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +shell=$(basename "$SHELL") + +# check if reattach-to-user-namespace is available +if [ -n "$(command -v reattach-to-user-namespace)" ]; then + reattach-to-user-namespace -l "$shell" +else + exec "$shell -l" +fi diff --git a/tmux/tmux.conf.symlink b/tmux/tmux.conf.symlink index 834d928..4643a47 100644 --- a/tmux/tmux.conf.symlink +++ b/tmux/tmux.conf.symlink @@ -1,4 +1,4 @@ -set -g default-command "reattach-to-user-namespace -l zsh" +set -g default-command "login-shell" # tmux display things in 256 colors set -g default-terminal "tmux-256color-italic" set -g status-utf8 on