Switch to tmux as default terminal multiplexer.
This commit is contained in:
18
.bashrc
18
.bashrc
@ -169,10 +169,6 @@ function color_my_prompt {
|
|||||||
|
|
||||||
color_my_prompt
|
color_my_prompt
|
||||||
|
|
||||||
# Start from home folder
|
|
||||||
cd ~/
|
|
||||||
|
|
||||||
|
|
||||||
# Configure ssh-agent
|
# Configure ssh-agent
|
||||||
if [ -z "$(pgrep ssh-agent)" ]; then
|
if [ -z "$(pgrep ssh-agent)" ]; then
|
||||||
rm -rf /tmp/ssh-*
|
rm -rf /tmp/ssh-*
|
||||||
@ -198,16 +194,10 @@ elif [ -f ~/.bw_session ]; then export BW_SESSION=$(cat ~/.bw_session);
|
|||||||
# Otherwise unlock to start new session
|
# Otherwise unlock to start new session
|
||||||
else bwu; fi
|
else bwu; fi
|
||||||
|
|
||||||
# Helper function for tmate pane renaming
|
# Try connect to my default tmux socket
|
||||||
# This isn't working properly yet!
|
if ! tmux -S /tmp/default.tmux attach; then
|
||||||
function renamepane {
|
tmux -S /tmp/default.tmux new-session -s default -n default -d
|
||||||
printf '\033]2;%s\033\\' "${1}"
|
tmux -S /tmp/default.tmux attach
|
||||||
}
|
|
||||||
|
|
||||||
# Try connect to my default tmate socket
|
|
||||||
if ! tmate -S /tmp/default.tmate attach; then
|
|
||||||
tmate -S /tmp/default.tmate.tmate new-session -s default -n default -d
|
|
||||||
tmate -S /tmp/default.tmate.tmate attach
|
|
||||||
fi
|
fi
|
||||||
SBP_PATH=/home/james/Downloads/sbp
|
SBP_PATH=/home/james/Downloads/sbp
|
||||||
source /home/james/Downloads/sbp/sbp.bash
|
source /home/james/Downloads/sbp/sbp.bash
|
||||||
|
|||||||
19
.tmux.conf
Normal file
19
.tmux.conf
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Mouse support for tmux scrollback and copy
|
||||||
|
set-option -g set-clipboard on
|
||||||
|
set-option -g mouse on
|
||||||
|
|
||||||
|
# Keep current path when creating new windows or panes
|
||||||
|
bind c new-window -c "#{pane_current_path}"
|
||||||
|
bind % split-window -h -c "#{pane_current_path}"
|
||||||
|
bind '"' split-window -v -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
# Install tpm plugins
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
|
set -g @plugin 'dracula/tmux'
|
||||||
|
|
||||||
|
# Make dracula theme more minimal
|
||||||
|
set -g @dracula-plugins " "
|
||||||
|
|
||||||
|
# Initialise tpm
|
||||||
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
Reference in New Issue
Block a user