diff --git a/.tmux.conf b/.tmux.conf index 43d1aa8..7e39ad2 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -106,6 +106,12 @@ set -g status-right '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics] setw -g window-status-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] #I  #W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]' setw -g window-status-current-format '#[fg=colour235,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #I  #W  #F #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]' + +set -g status-interval 1 + +set-option -g automatic-rename on +set-option -g automatic-rename-format '#{b:pane_current_path}' + # Plugin Customizations set -g @prefix_highlight_fg 'colour232' # default is 'colour231' @@ -119,6 +125,9 @@ set -g @prefix_highlight_sync_prompt 'SYNC' set -g @resurrect-strategy-vim 'session' set -g @batt_icon_status_charging '⚡' +# set -g @continuum-boot 'on' +# set -g @continuum-restore 'on' + set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-resurrect' diff --git a/.zshrc b/.zshrc index ae83102..6581fdc 100644 --- a/.zshrc +++ b/.zshrc @@ -1,3 +1,14 @@ +# Always start a tmux session when opening up terminal +if type tmux &> /dev/null; then + session_name=${YAKUAKE:-Konsole} + #if not inside a tmux session, start a new session + if [[ $HOST == "ubuntu" && -z "$TMUX" ]]; then + (tmux -2 new-session -A -s $session_name || false) + # || false makes Konsole happy while quitting. It doesn't ask for + # confirmation. Since we are in tmux, it doesn't matter if we really + # wanted to quit or not + fi +fi # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block, everything else may go below.