Created
July 20, 2019 23:00
-
-
Save andoriyu/cb7d1f35cb782ff46a02c4ce7380e70b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -g prefix C-a | |
| unbind-key C-b | |
| bind C-a send-prefix | |
| set -g base-index 1 | |
| set -g history-limit 100000 | |
| bind m \ | |
| set -g mouse on \;\ | |
| display 'Mouse: ON' | |
| bind M \ | |
| set -g mouse off \;\ | |
| display 'Mouse: OFF' | |
| set -g default-terminal rxvt-unicode-256color | |
| ### Instructs tmux to expect UTF-8 sequences to appear in this window. | |
| #setw -g utf8 on | |
| ### Instruct tmux to treat top-bit-set characters in the status-left and status-right strings as UTF-8; | |
| #set -g status-utf8 on | |
| ### date format: hostname weekday month day, hour:minute | |
| set -g status-right '#H %a %b %d, %H:%M' | |
| ### Set status line background colour. | |
| set -g status-bg black | |
| ### Set status line foreground colour. | |
| set -g status-fg yellow | |
| ### Set status line background colour for the currently active window. | |
| # setw -g window-status-current-bg magenta | |
| ### Set status line foreground colour for the currently active window. | |
| # setw -g window-status-current-fg white | |
| ### Reload tmux.conf configuration file | |
| ### Note: alternative way to reload the configuration file: | |
| ### Method 1: Run from command line: tmux source-file ~/.tmux.conf | |
| ### Method 2: In any tmux sessions: [prefix Ctrl-b] : source-file /usr/local/etc/tmux.conf | |
| ### Method 3: bind the source-file command with a key like following line, then you type: ctrl-b-r | |
| bind r source-file ~/.tmux.conf \; display-message Reloaded! | |
| bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M; send-keys -M; send-keys -M; send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M; send-keys -M; send-keys -M; send-keys -M' 'copy-mode -e; send-keys -M; send-keys -M; send-keys -M; send-keys -M'" | |
| bind -n WheelDownPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M; send-keys -M; send-keys -M; send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M; send-keys -M; send-keys -M; send-keys -M' 'copy-mode -e; send-keys -M; send-keys -M; send-keys -M; send-keys -M'" | |
| # Clipboard manipulation. | |
| bind-key C-y run -b "killall xclip; (tmux show-buffer |xclip -i -selection clipboard) && tmux display-message \"Copied!\"" | |
| bind-key C-p run "xclip -o -selection clipboard | tmux load-buffer -; tmux paste-buffer " | |
| set-option -sg escape-time 10 | |
| set-option -g default-terminal "screen-256color" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment