-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
107 lines (81 loc) · 3.45 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
# TMUX Config File
### Options ###
# Turn on mouse functionality
setw -g mouse on
# Automatically rename window to current program
set-option -g automatic-rename on
# Prefix change to Ctrl + a
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
# Enabling TrueColor
# See Notion for more info on the colors issue, but this fixes it for me in Alacritty
set -g default-terminal "tmux-256color"
set -sg terminal-overrides ",*:RGB"
# TODO: An attempt to have the same keybindings as in xterm terminals
# Things like Shift + Up don't work
# A lot of stuff doesn't work
set-option -g xterm-keys on
# This fixes the long wait time on Esc in NeoVim
# I have no idea why this isn't the default
set -sg escape-time 0
### Keybinds ###
# Use Alt + h/j/k/l to switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Use Alt + ArrowKeys to switch panes
bind -n M-Left select-pane -L
bind -n M-Down select-pane -D
bind -n M-Up select-pane -U
bind -n M-Right select-pane -R
# Use Ctrl + PgUp/PgDn to switch windows
bind -n C-S-PgUp previous-window
bind -n C-S-PgDn next-window
# No session preview, instead rename session
bind s command-prompt -I "#S" "rename-session '%%'"
# No soft kill pane, instead rename window
bind x command-prompt -I "#W" "rename-window '%%'"
# Window chooser in tree-form, w is for window chooser, Z is for zoom in
# There is no choose-tree -p, so you'll have to manually expand the panes in the tree
bind a choose-tree -wZ
# Display pane numbers, you can switch to a pane by following this with a number
bind f display-panes
# qwe # TODO: All this may be useless as I quit all of these by exiting the shells
bind q kill-session
bind w kill-window
bind e kill-pane
# Create window with Ctrl + a + t and Ctrl + t
bind t new-window
bind -n C-t new-window
# Swapping panes around in a window
bind -n C-M-Left swap-pane -dU
bind -n C-M-Right swap-pane -dD
# Clock
bind c clock-mode
# Set easier window split keys on Ctrl + a + h and Ctrl + a + v
bind v split-window -h
bind h split-window -v
# Easy config reload on Ctrl + a + r
bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
### Plugins & Styling ###
set -g @plugin 'tmux-plugins/tpm' # TMUX Plugin Manager
# jimeh's themepack
set -g @plugin 'jimeh/tmux-themepack'
set -g @themepack 'powerline/default/cyan'
set -goq @themepack-status-right-area-left-format "%H:%M" # Changing time format
set -goq @themepack-status-right-area-middle-format "%b %d" # Changing date format
set -goq @powerline-color-main-1 colour123 # Left area left bg
set -goq @powerline-color-main-2 colour123 # Color of the current window text
set -goq @powerline-color-main-3 colour7 # Just white, main-3 wasn't used anywhere
set -goq @powerline-color-grey-1 colour16 # Color of the status bar bg, just black
set -goq @powerline-color-grey-2 colour235 # Color of left area right bg and right area left bg
set -goq @powerline-color-grey-4 colour146 # Color of left area right fg and right area left fg
set -goq @powerline-color-grey-6 colour123 # Right area right bg
set -goqF @powerline-status-left-area-middle-bg "#{@powerline-color-grey-1}"
set -goqF @powerline-status-left-area-middle-fg "#{@powerline-color-main-3}"
set -goqF @powerline-status-right-area-middle-bg "#{@powerline-color-grey-1}"
set -goqF @powerline-status-right-area-middle-fg "#{@powerline-color-main-3}"
# Initialize TPM (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'