This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
/
.tmux.conf.linux
50 lines (40 loc) · 1.6 KB
/
.tmux.conf.linux
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
set-option -g default-shell /bin/zsh
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Enable mouse mode (tmux 2.1 and above)
# https://stackoverflow.com/a/40902312/905101
# Version-specific commands [grumble, grumble]
# See: https://github.com/tmux/tmux/blob/master/CHANGES
run-shell "tmux setenv -g TMUX_VERSION $(tmux -V | cut -c 6-)"
if-shell -b '[ "$(echo "$TMUX_VERSION < 2.1" | bc)" = 1 ]' \
"set -g mouse-select-pane on; set -g mode-mouse on; \
set -g mouse-resize-pane on; set -g mouse-select-window on"
# In version 2.1 "mouse" replaced the previous 4 mouse options
if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.1" | bc)" = 1 ]' \
"set -g mouse on"
# UTF8 is autodetected in 2.2 onwards, but errors if explicitly set
if-shell -b '[ "$(echo "$TMUX_VERSION < 2.2" | bc)" = 1 ]' \
"set -g utf8 on; set -g status-utf8 on; set -g mouse-utf8 on"
# 0 is too far from ` ;)
set -g base-index 1
setw -g pane-base-index 1
# Clock mode 12 hour style (prefix t)
set -g clock-mode-style 12
# Re-number panes after closing.
set-option -g renumber-windows on
# THEME
set -g status-position top
set -g status-bg black
set -g status-fg white
set -g window-status-current-bg green
set -g window-status-current-fg black
set -g window-status-current-attr bold
set -g status-interval 60
set -g status-left-length 30
set -g status-left "#[fg=yellow][#S] #[default]"
set -g status-right '#(~/.tmux-scripts/battery.sh) #[fg=white] %b %d %l:%M %p#[default]'