~johanvandegriff/zfs-server-cluster-setup

ref: 2de61eb7d06e50cabe9cacc7fd31d125dd74c3b1 zfs-server-cluster-setup/desktop-settings/.tmux.conf -rwxr-xr-x 1.7 KiB
2de61eb7Johan Vandegriff Updated readme for script changes 3 years ago
                                                                                
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
# https://robots.thoughtbot.com/a-tmux-crash-course
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix

# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf

# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+

# remap pane splitting to \ and /
bind \ split-window -h
bind / split-window

#allow Ctrl-Left and Ctrl-Right
set-window-option -g xterm-keys on

#enable mouse scrolling
#https://github.com/NHDaly/tmux-better-mouse-mode
set -g mouse on
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
#set -g @scroll-speed-num-lines-per-scroll "3"
set -g @emulate-scroll-for-no-mouse-alternate-buffer "on"

#set -g terminal-overrides 'xterm*:smcup@:rmcup@'

#set -g mouse on
# sane scrolling:
#bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"

# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right
#set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"

#https://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode/
# Toggle mouse on with ^B m
#bind m \
#  set -g mouse on \;\
#  display 'Mouse: ON'

# Toggle mouse off with ^B M
#bind M \
#  set -g mouse off \;\
#  display 'Mouse: OFF'

unbind +
bind + \
  set -g mouse off \;\
  new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
  swap-pane -s tmux-zoom.0 \;\
  select-window -t tmux-zoom \;\
  display 'Mouse: OFF'
    
unbind -
bind - \
  set -g mouse on \;\
  last-window \;\
  swap-pane -s tmux-zoom.0 \;\
  kill-window -t tmux-zoom \;\
  display 'Mouse: ON'