-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
141 lines (109 loc) · 4.81 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#!/usr/bin/env bash
#
unbind-key C-b
set-option -g prefix C-a
bind-key C-a send-prefix
set -g base-index 1
# Scroll history 2000->20000
set -g history-limit 20000
# Recommended by Neovim :checkhealth
set-option -g focus-events on
# Use Vim style to switch panes
bind -r h select-pane -L
bind -r l select-pane -R
bind -r k select-pane -U
bind -r j select-pane -D
# Resize with Ctrl
bind -r C-h resize-pane -L 5
bind -r C-l resize-pane -R 5
bind -r C-k resize-pane -U 5
bind -r C-n resize-pane -D 5
# Maximize
bind -r m resize-pane -Z
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
bind H previous-window
bind L next-window
# Mouse mode
setw -g mouse on
# macOS only
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
# Rename and renumber windows automatically
set-option -g automatic-rename on
set-option -g renumber-windows on
# Allow longer session name
set-option -g status-left-length 64
# Justify status to center (~space between)
set-option -g status-justify centre
# Move status to top
set-option -g status-position top # top or bottom
# Right side status line
# set-option -g status-right '#(date "+%H:%M %Z - %A %B %-d, Week %-W ")'
set-option -g status-right '#(date "+Week #%-W ")'
# To copy, left click and drag to highlight text in yellow,
# once you release left click yellow text will disappear and will automatically be available in clibboard
unbind c
bind c copy-mode
# # Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
# Use macOS pbcopy to handle clipboard integration
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# Use (also) vi-mode to move to visual mode an yank to clipboard
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
# New window
bind-key C-t new-window
# Set easier window split keys
bind-key | split-window -h
bind-key - split-window -v
# Easy config reload
bind-key r source-file ~/.tmux.conf \; display-message "Reloaded .tmux.conf"
# Escape time
set-option -sg escape-time 10
set-option -g default-terminal "tmux-256color"
#set-option -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",xterm-256color:RGB"
#### COLOUR (Solarized 256)
# Curly Underlines ("undercurls") support
# undercurl support
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# underscore colours - needs tmux-3.0
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# default statusbar colors
set-option -g status-style fg=colour142,bg=default #yellow and base02
# default window title colors
set-window-option -g window-status-style fg=colour244,bg=default #base0 and default
#set-window-option -g window-status-style dim
# active window title colors
set-window-option -g window-status-current-style fg=colour142,bg=default #blue and default
#set-window-option -g window-status-current-style bright
# pane border
set-option -g pane-border-style fg=colour235 #base02
set-option -g pane-active-border-style fg=colour240 #base01
# message text
set-option -g message-style fg=colour166,bg=colour235 #orange and base02
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# bell
set-window-option -g window-status-bell-style fg=colour235,bg=colour160 #base02, red
# Remap 'Find window' to tmux-sessionizer
bind-key f run-shell "tmux neww bash $HOME/.config/tmux/tmux-sessionizer.sh "
# bind-key u run-shell "bash $HOME/.config/tmux/tmux-sessionizer.sh $HOME/Code/Work/Keva/ViPa-2.0/vipa-api"
# bind-key I run-shell "bash $HOME/.config/tmux/tmux-sessionizer.sh $HOME/Code/Work/Keva/OET-2.0/oet-ui"
# bind-key O run-shell "bash $HOME/.config/tmux/tmux-sessionizer.sh $HOME/Code/Work/Keva/OET-2.0/oet-api"
# bind-key P run-shell "bash $HOME/.config/tmux/tmux-sessionizer.sh $HOME/Code/Work/Keva/Tyokykypolkuja-oppimispeli/Tyokykypolkuja.WebUI"
# bind-key Å run-shell "bash $HOME/.config/tmux/tmux-sessionizer.sh $HOME/Code/Work/Keva/Tyokykypolkuja-oppimispeli/Tyokykypolkuja.WebAPI"
# bind-key Ä run-shell "bash $HOME/.config/tmux/tmux-sessionizer.sh $HOME/.config/lvim"
# bind-key Ö run-shell "bash $HOME/.config/tmux/tmux-sessionizer.sh $HOME/.config/tmux"