diff --git a/dot-files/.bashrc b/dot-files/.bashrc index 435c48e..978ff6a 100644 --- a/dot-files/.bashrc +++ b/dot-files/.bashrc @@ -12,10 +12,11 @@ cd /etc/nixos/ git status echo "==============" -alias tmuxxx='tmux -f /etc/nixos/dot-files/.tmux.conf new -d -s mainsession' -alias tmuxx='tmux -f /etc/nixos/dot-files/.tmux.conf attach -t mainsession' ### !! if not running inside tmux, ask user to start tmux or create session !! if [ -z "$TMUX" ]; then + alias tmuxxx='tmux -f /etc/nixos/dot-files/.tmux.conf new -d -s mainsession' + alias tmuxx='tmux -f /etc/nixos/dot-files/.tmux.conf attach -t mainsession' + if ! tmux ls &> /dev/null; then tmuxxx fi diff --git a/dot-files/.tmux.conf b/dot-files/.tmux.conf index d13e640..f31a846 100644 --- a/dot-files/.tmux.conf +++ b/dot-files/.tmux.conf @@ -1,5 +1,5 @@ set -g default-shell /run/current-system/sw/bin/bash -set -g default-command "bash --norc" +set -g default-command bash set-option -g default-shell /run/current-system/sw/bin/bash set-window-option -g automatic-rename on