172 lines
3.3 KiB
Plaintext
172 lines
3.3 KiB
Plaintext
# #################
|
|
# screen-like setup
|
|
# #################
|
|
|
|
# COLOR
|
|
# oobah
|
|
#set -g status-bg green
|
|
# zircon
|
|
#set -g status-bg black
|
|
#set -g status-fg white
|
|
# pi
|
|
#set -g status-bg yellow
|
|
# bio6
|
|
#set -g status-bg red
|
|
#set -g status-fg white
|
|
#set -g status-bg blue
|
|
|
|
# C-a is escape sequence
|
|
unbind C-b
|
|
set -g prefix ^O
|
|
bind a send-prefix
|
|
|
|
# vim ftw
|
|
# unnecessary because $EDITOR=vim
|
|
# setw -g mode-keys vi
|
|
|
|
# copy pasta #
|
|
unbind [
|
|
# C to enter copy mode
|
|
bind C copy-mode
|
|
# v or space to select
|
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
|
# y to yank, and it goes in primary and clipboard buffers
|
|
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
|
|
# P to paste, or shift-inser as it's in bothe buffers
|
|
unbind P
|
|
bind P paste-buffer
|
|
|
|
# switch panes with Tab
|
|
unbind Tab
|
|
bind Tab select-pane -t :.+
|
|
|
|
#open man page with /
|
|
bind / command-prompt "split-window -h 'exec man %%'"
|
|
|
|
# resize pane with arrow keys
|
|
# -r: can be repeated without pressing prefix
|
|
# again (500ms after last '-r' action or prefix)
|
|
unbind Left
|
|
unbind Right
|
|
unbind Down
|
|
unbind Up
|
|
bind -r Left resize-pane -L 2
|
|
bind -r Right resize-pane -R 2
|
|
bind -r Down resize-pane -D 2
|
|
bind -r Up resize-pane -U 2
|
|
|
|
# new window ^C c
|
|
unbind ^C
|
|
bind ^C new-window
|
|
bind c new-window
|
|
|
|
# reload config without killing server
|
|
bind R source-file ~/tmux.conf \; display-message " Config reloaded..."
|
|
|
|
# detach ^D d
|
|
unbind ^D
|
|
bind ^D detach
|
|
|
|
# displays *
|
|
unbind *
|
|
bind * list-clients
|
|
|
|
# lockscreen ^X x
|
|
unbind ^X
|
|
bind ^X lock-server
|
|
unbind x
|
|
bind x lock-server
|
|
|
|
# prev ^H ^P p ^?
|
|
unbind ^H
|
|
bind ^H previous-window
|
|
unbind ^P
|
|
bind ^P previous-window
|
|
unbind p
|
|
bind p previous-window
|
|
unbind BSpace
|
|
bind BSpace previous-window
|
|
|
|
# next ^@ ^N space n
|
|
unbind ^@
|
|
bind ^@ next-window
|
|
unbind ^N
|
|
bind ^N next-window
|
|
unbind " "
|
|
bind " " next-window
|
|
unbind n
|
|
bind n next-window
|
|
|
|
# title A
|
|
unbind A
|
|
bind A command-prompt "rename-window %%"
|
|
|
|
# ^A to get to last window
|
|
unbind ^O
|
|
bind ^O last-window
|
|
|
|
# windows ^W w
|
|
unbind ^W
|
|
bind ^W list-windows
|
|
unbind w
|
|
bind w list-windows
|
|
|
|
# " windowlist -b
|
|
unbind '"'
|
|
bind '"' choose-window
|
|
|
|
# quit \
|
|
#unbind \
|
|
#bind \ confirm-before "kill-server"
|
|
|
|
# kill K k
|
|
unbind K
|
|
bind K confirm-before "kill-window"
|
|
unbind k
|
|
bind k confirm-before "kill-window"
|
|
|
|
# redisplay ^L l
|
|
unbind ^L
|
|
bind ^L refresh-client
|
|
unbind l
|
|
bind l refresh-client
|
|
|
|
# split -v |
|
|
unbind |
|
|
bind | split-window
|
|
unbind S
|
|
bind S split-window -v
|
|
|
|
|
|
#CPU MEM
|
|
#https://github.com/thewtex/tmux-mem-cpu-load
|
|
#set -g status-interval 2
|
|
#set -g status-right "#(tmux-mem-cpu-load 2) #H"
|
|
run-shell "powerline-daemon -q"
|
|
source '/usr/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf'
|
|
|
|
# disable mouse control by default - change 'off' to 'on' to enable by default.
|
|
setw -g mouse off
|
|
# toggle mouse mode to allow mouse copy/paste
|
|
# set mouse on with prefix m
|
|
bind m \
|
|
set -g mouse on \;\
|
|
display 'Mouse: ON'
|
|
# set mouse off with prefix M
|
|
bind M \
|
|
set -g mouse off \;\
|
|
display 'Mouse: OFF'
|
|
# zoom this pane to full screen
|
|
bind + \
|
|
new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
|
|
swap-pane -s tmux-zoom.0 \;\
|
|
select-window -t tmux-zoom
|
|
# restore this pane
|
|
bind - \
|
|
last-window \;\
|
|
swap-pane -s tmux-zoom.0 \;\
|
|
kill-window -t tmux-zoom
|
|
|
|
# make tmux display things in 256 colors
|
|
set -g default-terminal "screen-256color"
|