diff --git a/home/.config/zsh/01-tmux.zsh b/home/.config/zsh/01-tmux.zsh new file mode 100644 index 0000000..3e329c8 --- /dev/null +++ b/home/.config/zsh/01-tmux.zsh @@ -0,0 +1,8 @@ +# Launch tmux if logging in over ssh +if [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then + if tmux has-session -t ssh_tmux &2>/dev/null; then + exec tmux -2 attach-session -t ssh_tmux + else + exec tmux -2 new-session -s ssh_tmux + fi +fi diff --git a/home/.config/zsh/01-env.zsh b/home/.config/zsh/02-env.zsh similarity index 100% rename from home/.config/zsh/01-env.zsh rename to home/.config/zsh/02-env.zsh diff --git a/home/.config/zsh/02-plugins.zsh b/home/.config/zsh/03-plugins.zsh similarity index 100% rename from home/.config/zsh/02-plugins.zsh rename to home/.config/zsh/03-plugins.zsh diff --git a/home/.config/zsh/03-aliases.zsh b/home/.config/zsh/04-aliases.zsh similarity index 100% rename from home/.config/zsh/03-aliases.zsh rename to home/.config/zsh/04-aliases.zsh diff --git a/home/.config/zsh/05-misc.zsh b/home/.config/zsh/05-misc.zsh deleted file mode 100644 index 68b0658..0000000 --- a/home/.config/zsh/05-misc.zsh +++ /dev/null @@ -1,14 +0,0 @@ -# Launch tmux if logging in over ssh -if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then - if tmux has-session &2>/dev/null; then - exec tmux attach-session -t ssh_tmux - else - exec tmux new-session -s ssh_tmux - fi -fi - -# share history between running zsh instances -setopt share_history - -# ignore commands with leading space from history -setopt histignorespace diff --git a/home/.config/zsh/04-keybinds.zsh b/home/.config/zsh/06-keybinds.zsh similarity index 100% rename from home/.config/zsh/04-keybinds.zsh rename to home/.config/zsh/06-keybinds.zsh diff --git a/home/.config/zsh/07-misc.zsh b/home/.config/zsh/07-misc.zsh new file mode 100644 index 0000000..7f84ba4 --- /dev/null +++ b/home/.config/zsh/07-misc.zsh @@ -0,0 +1,5 @@ +# share history between running zsh instances +setopt share_history + +# ignore commands with leading space from history +setopt histignorespace diff --git a/home/.config/zsh/06-pacman.zsh b/home/.config/zsh/08-pacman.zsh similarity index 100% rename from home/.config/zsh/06-pacman.zsh rename to home/.config/zsh/08-pacman.zsh