Skip to content

Commit

Permalink
Autostart tmux when opening shell
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-bue committed Dec 18, 2024
1 parent a6506d5 commit 5e77d73
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions home/dot_zshrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Enable colors and change prompt:
autoload -U colors && colors # Load colors

# Adapted from https://unix.stackexchange.com/a/113768/347104
if [ -n "$PS1" ] && [ -z "$TMUX" ]; then
# Adapted from https://unix.stackexchange.com/a/176885/347104
# Create session 'main' or attach to 'main' if already exists.
tmux new-session -A -s main
fi

# Enable history
HISTFILE="$HOME/.zsh_history"
HISTSIZE=5000 # Maximum events for internal history
Expand Down

0 comments on commit 5e77d73

Please sign in to comment.