-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
93 lines (75 loc) · 2.85 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
# Mouse support - set to on if you want to use the mouse
# setw -g mode-mouse off
# set -g mouse-select-pane off
# set -g mouse-resize-pane off
# set -g mouse-select-window off
# Enable mouse mode (tmux 2.1 and above)
# set -g mouse on
# Set the default terminal mode to 256color mode
set -g default-terminal "xterm-256color"
set -g terminal-overrides ",xterm-256color:Tc"
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of
# any client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# enable activity alerts
setw -g monitor-activity on
set -g visual-activity on
# Center the window list
set -g status-justify centre
# remap prefix to Control + a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
set-window-option -g mode-keys vi
# Vi copypaste mode
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
# Source config using <prefix> + r
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded."
# Maximize and restore a pane
unbind Up
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Enable desktop notifications from your terminal
set -g @pomodoro_notifications 'on'
# Sound for desktop notifications (Run `ls /System/Library/Sounds` for a list of sounds to use on Mac)
set -g @pomodoro_sound 'on'
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
set -g @plugin 'christoomey/vim-tmux-navigator'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
#set -g @resurrect-processes 'irb pry ruby psql "~rails server" "~rails console"'
set -g @resurrect-processes ':all:'
# save bash history
set -g @resurrect-save-bash-history 'on'
# for vim
set -g @resurrect-strategy-vim 'session'
# ressurect on startup
set -g @continuum-restore 'off'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# Configure what's shown on the left and right of the status bar
set -g status off # Turn off the status bar
set -g status-style bg=black,fg=gray # Background and foreground colors
# set -g status-left-length 40
# set -g status-right-length 150
set -g status-interval 60 # Update every 60 seconds
# #S: Session name
# #I: Window index
# #W: Window name
# #P: Pane index
# #T: Pane title (if set)
# #F: Flags (e.g., * for active window)
# #H: Hostname
set -g status-left "[#S]"
set -g status-right "#(date +'%H:%M %d.%m.%y') #(cat /sys/class/power_supply/BAT0/capacity)%"