38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
## pcht tmux configurarion
|
|
# (c) 2018
|
|
|
|
# change prefix to ctrl+a and
|
|
# use "C-a a"to send C-a to shell
|
|
unbind C-b
|
|
set -g prefix C-a
|
|
bind a send-prefix
|
|
|
|
# disable login-shell on tmux
|
|
# https://wiki.archlinux.org/index.php/Tmux#Start_a_non-login_shell
|
|
set -g default-command "${SHELL}"
|
|
|
|
# set default term to 256 colors
|
|
#set -g default-terminal "tmux-255color"
|
|
set -g default-terminal "screen"
|
|
|
|
# open pane/window in same directory
|
|
# https://unix.stackexchange.com/questions/12032/create-new-window-with-current-directory-in-tmux
|
|
bind '"' split-window -c "#{pane_current_path}"
|
|
bind s split-window -c "#{pane_current_path}"
|
|
bind % split-window -h -c "#{pane_current_path}"
|
|
bind '|' split-window -h -c "#{pane_current_path}"
|
|
bind c new-window -c "#{pane_current_path}"
|
|
|
|
# last window like in screen
|
|
bind C-a last-window
|
|
|
|
# reload this file
|
|
bind r source-file /home/patrick/.tmux.conf \; display-message ".tmux.conf reloaded"
|
|
|
|
# automatic update env for ssh-agent
|
|
# https://stackoverflow.com/questions/21378569/how-to-auto-update-ssh-agent-environment-variables-when-attaching-to-existing-tm
|
|
set-option -g update-environment SSH_AUTH_SOCK
|
|
|
|
# urlview in term
|
|
run-shell ~/src/tmux-urlview/urlview.tmux
|