From f9161cf7238b556eeefa54510afeeecb3d82d329 Mon Sep 17 00:00:00 2001 From: How Chen Date: Thu, 23 Nov 2017 11:25:52 +0800 Subject: [PATCH 01/33] update read me sync with other to download into same folder --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c4af994..7864c67 100644 --- a/README.md +++ b/README.md @@ -14,19 +14,19 @@ Installation Download: ```bash -git clone https://github.com/tony/tmux-config.git ~/.tmux +git clone https://github.com/howhow/tmux-config ~/.my_config/tmux ``` Copy tmux config to home: ```bash -ln -s ~/.tmux/.tmux.conf ~/.tmux.conf +ln -s ~/.my_config/tmux/.tmux.conf ~/.tmux.conf ``` Go to config dir: ```bash -cd ~/.tmux +cd ~/.my_config/tmux ``` Stats From f6c429ec80d51f12ccdd0c0fe497c8e92f940aa0 Mon Sep 17 00:00:00 2001 From: How Chen Date: Wed, 13 Jun 2018 17:15:03 +0800 Subject: [PATCH 02/33] update config --- .tmux.conf | 57 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index da15918..44e8fbf 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,8 +1,16 @@ +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'thewtex/tmux-mem-cpu-load' + # https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf set-option -g status-bg colour235 #base02 set-option -g status-fg colour136 #yellow set-option -g status-attr default +set -g @continuum-restore 'on' + # set window split bind-key v split-window -h bind-key b split-window @@ -10,7 +18,7 @@ bind-key b split-window # default window title colors set-window-option -g window-status-fg colour244 #base0 set-window-option -g window-status-bg default -#set-window-option -g window-status-attr dim +set-window-option -g window-status-attr dim # active window title colors set-window-option -g window-status-current-fg colour166 #orange @@ -19,7 +27,8 @@ set-window-option -g window-status-current-bg default # pane border set-option -g pane-border-fg colour235 #base02 -set-option -g pane-active-border-fg colour240 #base01 +#set-option -g pane-active-border-fg colour240 #base01 +set-option -g pane-active-border-fg colour208 #orange # message text set-option -g message-bg colour235 #base02 @@ -29,7 +38,8 @@ set-option -g message-fg colour166 #orange set-option -g display-panes-active-colour colour33 #blue set-option -g display-panes-colour colour166 #orange # clock -set-window-option -g clock-mode-colour green #green +#set-window-option -g clock-mode-colour green #green +set-window-option -g clock-mode-colour colour208 #orange set -g status-interval 1 @@ -38,6 +48,7 @@ set -g status-left-length 20 set -g status-right-length 140 set -g status-left '#[fg=green]#H #[fg=black]• #[fg=green,bright]#(uname -r | cut -c 1-6)#[default]' set -g status-right '#[fg=green,bg=default,bright]#(tmux-mem-cpu-load) #[fg=red,dim,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white,bg=default]%a%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d' +#set -g status-right "#[fg=green]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors --powerline-right --interval 2)#[default]" # C-b is not acceptable -- Vim uses it set-option -g prefix C-a @@ -64,14 +75,25 @@ set -g visual-activity on # Vi copypaste mode set-window-option -g mode-keys vi -bind-key -t vi-copy 'v' begin-selection -bind-key -t vi-copy 'y' copy-selection +bind P paste-buffer +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi y send-keys -X copy-selection +bind-key -T copy-mode-vi r send-keys -X rectangle-toggle +#bind-key -t vi-copy 'v' begin-selection +#bind-key -t vi-copy 'y' copy-selection # hjkl pane traversal -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R +#bind h select-pane -L +#bind j select-pane -D +#bind k select-pane -U +#bind l select-pane -R + + +# switch panes using Alt-arrow without prefix +bind -n M-Left select-pane -L +bind -n M-Right select-pane -R +bind -n M-Up select-pane -U +bind -n M-Down select-pane -D # set to main-horizontal, 60% height for main pane bind m set-window-option main-pane-height 60\; select-layout main-horizontal @@ -87,22 +109,31 @@ set-window-option -g automatic-rename # color set -g default-terminal "screen-256color" +# utf8 +set -g utf8 +set-window-option -g utf8 on + +# mouse +set -g mouse on + # https://github.com/edkolev/dots/blob/master/tmux.conf # Updates for tmux 1.9's current pane splitting paths. # from powerline -run-shell "tmux set-environment -g TMUX_VERSION_MAJOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f1 | sed 's/[^0-9]*//g')" -run-shell "tmux set-environment -g TMUX_VERSION_MINOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f2 | sed 's/[^0-9]*//g')" +#run-shell "tmux set-environment -g TMUX_VERSION_MAJOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f1 | sed 's/[^0-9]*//g')" +#run-shell "tmux set-environment -g TMUX_VERSION_MINOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f2 | sed 's/[^0-9]*//g')" # status bar if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 2\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set-option -g status-utf8 on' # rm mouse mode fail -if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 1\)' 'set -g mouse off' -if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 1\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set -g mode-mouse off' +#if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 1\)' 'set -g mouse off' +#if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 1\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set -g mode-mouse off' # fix pane_current_path on new window and splits if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind c; bind c new-window -c "#{pane_current_path}"' if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" "unbind '\"'; bind '\"' split-window -v -c '#{pane_current_path}'" if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind v; bind v split-window -h -c "#{pane_current_path}"' if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind %; bind % split-window -h -c "#{pane_current_path}"' + +run '~/.tmux/plugins/tpm/tpm' From 62a0814aa240cac1b1504e1284dc07893c5990b3 Mon Sep 17 00:00:00 2001 From: How Chen Date: Wed, 13 Jun 2018 17:36:53 +0800 Subject: [PATCH 03/33] change config file name --- .tmux.conf => tmux.conf_howchen | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .tmux.conf => tmux.conf_howchen (100%) diff --git a/.tmux.conf b/tmux.conf_howchen similarity index 100% rename from .tmux.conf rename to tmux.conf_howchen From 4a1a66f4db343c557105a3d97f0f99ccf9a05da5 Mon Sep 17 00:00:00 2001 From: How Chen Date: Wed, 13 Jun 2018 17:59:18 +0800 Subject: [PATCH 04/33] remove submodule --- .gitmodules | 3 -- vendor/basic-cpu-and-memory.tmux | 55 -------------------------------- vendor/tmux-mem-cpu-load | 1 - 3 files changed, 59 deletions(-) delete mode 100755 vendor/basic-cpu-and-memory.tmux delete mode 160000 vendor/tmux-mem-cpu-load diff --git a/.gitmodules b/.gitmodules index bd5347d..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "vendor/tmux-mem-cpu-load"] - path = vendor/tmux-mem-cpu-load - url = git://github.com/thewtex/tmux-mem-cpu-load.git diff --git a/vendor/basic-cpu-and-memory.tmux b/vendor/basic-cpu-and-memory.tmux deleted file mode 100755 index 6241e0f..0000000 --- a/vendor/basic-cpu-and-memory.tmux +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python - -""" -Basic CPU & Memory Usage for Tmux - -Author: Zaiste! - -Dash-meter inspired by tmux-mem-cpu -and code from psutil top.py. - -From https://github.com/zaiste/tmuxified - -Changes by Tony Narlock at -https://github.com/tony/tmux-config. -""" - -import os -import sys -if os.name != 'posix': - sys.exit('platform not supported') -import psutil - - -def get_dashes(perc): - dashes = "|" * int((float(perc) / 10)) - empty_dashes = " " * (10 - len(dashes)) - return dashes, empty_dashes - - -def info(): - mem = psutil.virtual_memory() - if hasattr(mem, 'cached'): - memused = mem.used - mem.cached - else: - memused = mem.used - - cpu_dashes, cpu_empty_dashes = get_dashes(psutil.cpu_percent(interval=0.1)) - line = "%s/%sMB [%s%s] %5s%%" % ( - str(int(memused / 1024 / 1024)), - str(int(mem.total / 1024 / 1024)), - cpu_dashes, cpu_empty_dashes, - psutil.cpu_percent(interval=0.1), - ) - - return line - - -def main(): - try: - print info() - except (KeyboardInterrupt, SystemExit): - pass - -if __name__ == '__main__': - main() diff --git a/vendor/tmux-mem-cpu-load b/vendor/tmux-mem-cpu-load deleted file mode 160000 index 54fdf3c..0000000 --- a/vendor/tmux-mem-cpu-load +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 54fdf3c68c13f7a5fd1a1e998d801d0a24dd910a From a353201e45ee1fc05515b6c8ad416ce076f2cf84 Mon Sep 17 00:00:00 2001 From: How Chen Date: Wed, 13 Jun 2018 18:00:35 +0800 Subject: [PATCH 05/33] remove submodule --- .gitmodules | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000 From 9464fb1f03502d71c72a7a9b5a21fb9260804f03 Mon Sep 17 00:00:00 2001 From: How Chen Date: Wed, 13 Jun 2018 18:14:57 +0800 Subject: [PATCH 06/33] remove useless config --- .tmux-osx.conf | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .tmux-osx.conf diff --git a/.tmux-osx.conf b/.tmux-osx.conf deleted file mode 100644 index 9ae8612..0000000 --- a/.tmux-osx.conf +++ /dev/null @@ -1,7 +0,0 @@ -# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard - -set-option -g default-command 'exec reattach-to-user-namespace -l zsh' -bind-key C-c run-shell 'tmux save-buffer - | reattach-to-user-namespace pbcopy' -bind-key C-v run-shell 'reattach-to-user-namespace pbpaste | tmux load-buffer - \; paste-buffer -d' -bind-key -t vi-copy y 'reattach-to-user-namespace pbcopy' -bind-key -t emacs-copy M-w 'reattach-to-user-namespace pbcopy' From ea93cc7982446bf0887c7cd74cc19afb3665837c Mon Sep 17 00:00:00 2001 From: How Chen Date: Thu, 14 Jun 2018 09:20:04 +0800 Subject: [PATCH 07/33] Update README.md --- README.md | 150 ++++-------------------------------------------------- 1 file changed, 10 insertions(+), 140 deletions(-) diff --git a/README.md b/README.md index 7864c67..64e60b5 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ -[Tmux](http://tmux.sourceforge.net/) is a terminal multiplexer. Tested with tmux 1.5+. - -This config has support for [tmux-mem-cpu-load](http://github.com/thewtex/tmux-mem-cpu-load). - -Prefix mapped to Ctrl-A for `screen` users. - -New to tmux? Order a copy of my book [*The Tao of tmux*](https://leanpub.com/the-tao-of-tmux) on Leanpub, [Amazon Kindle](http://amzn.to/2gPfRhC) or for free [on the web](https://leanpub.com/the-tao-of-tmux/read). - -Want more tmux? Check out the [libtmux](https://github.com/tony/libtmux) python library for controlling tmux, and load your code projects via YAML/JSON with [tmuxp](https://github.com/tony/tmuxp). +**NOTE**: This repo was forked from [tony/tmux-config](https://github.com/tony/tmux-config) and I made adaptation +- [Tmux](https://github.com/tmux/tmux) version should be higher than 1.5 +- Prefix mapped to `Ctrl-a` for `screen` users +- Use [tpm](https://github.com/tmux-plugins/tpm) to manage tmux plug-in, already integrated: + - [tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect): + Restore `tmux` environment after system restart + - [tmux-continuum](https://github.com/tmux-plugins/tmux-continuum): + `tmux` environment will be saved at the interval of 15 minutes. All the saving happens in the background without the impact to your workflow + - [tmux-mem-cpu-load](https://github.com/thewtex/tmux-mem-cpu-load): + A simple, lightweight program provided for system monitoring in the status line of `tmux` Installation ------------ @@ -21,119 +22,6 @@ git clone https://github.com/howhow/tmux-config ~/.my_config/tmux ```bash ln -s ~/.my_config/tmux/.tmux.conf ~/.tmux.conf -``` - - Go to config dir: - -```bash -cd ~/.my_config/tmux -``` - -Stats ------ - -### tmux-mem-cpu-load - -Works on Linux and OS X. - - Prep ourself to download submodule: - -```bash -git submodule init -``` - - Download submodule: - -```bash -git submodule update -``` - - Change dir to tmux-mem-cpu-load: - -```bash -cd ~/.tmux/vendor/tmux-mem-cpu-load -``` - - General make file: - -```bash -cmake . -``` - - Compile our binary: - -```bash -make -``` - - Install our binary to `/usr/local/bin/tmux-mem-cpu-load`: - -```bash -sudo make install -``` - - Go home: - -```bash -cd ~ -``` - - Launch tmux: -``` -tmux -``` - And press `Control + a` then `d` to go back to the terminal. - - Update config: - -```bash -tmux source-file ~/.tmux.conf -``` - -### basic-cpu-and-memory.tmux - -(Cross platform, tested with python 2.7+) - -Update March 19, 2014. Works with psutil 2.0 now. - -Install ``psutil``: - -```bash -sudo pip install psutil -``` - -copy ``~/.tmux/vendor/basic-cpu-and-memory.tmux`` to bin: - -```bash -sudo cp ~/.tmux/vendor/basic-cpu-and-memory.tmux /usr/local/bin/tmux-mem-cpu-load -``` - -make executable: -```bash -sudo chmod +x /usr/local/bin/tmux-mem-cpu-load -``` - -### Powerline (Advanced) - -You can add suport for [powerline](https://github.com/powerline/powerline) by adding these -to your ``~/.tmux.conf``. Be sure to grab and install [powerline-fonts](https://github.com/powerline/fonts) -for your system. - -See [Powerline on ReadTheDocs.org](https://powerline.readthedocs.org/en/master/) for more info. - -``` -# pip install --user git+git://github.com/powerline/powerline -if-shell 'test -f ~/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf' 'source-file ~/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf' - -# [sudo] pip install git+git://github.com/powerline/powerline -if-shell 'test -f /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf' - -# [sudo] pip install git+git://github.com/powerline/powerline -if-shell 'test -f /usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf' -# using python3.3 -if-shell 'test -f /usr/local/lib/python3.3/dist-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/local/lib/python3.3/dist-packages/powerline/bindings/tmux/powerline.conf' -# python 3.4? -# if-shell 'test -f /usr/local/lib/python3.4/dist-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/local/lib/python3.4/dist-packages/powerline/bindings/tmux/powerline.conf' ``` Start tmux @@ -143,13 +31,6 @@ To start a session: `tmux` -To reattach a previous session: - -`tmux attach` - -To reload config file - -`:` (which could Ctrl-B or Ctrl-A if you overidden it) then `source-file ~/.tmux.conf` Commands -------- @@ -176,18 +57,7 @@ Custom: * `Control + a` then `m` to switch to ``main-horizontal`` layout with the main window at 60% height. -More configs / Tools --------------------- - -* *Save / Load your tmux workspaces through JSON or YAML* with [tmuxp](https://github.com/tony/tmuxp). -* *Clone + Synchronize your git / hg / svn projects through JSON / YAML* with [vcspull](https://github.com/tony/vcspull). -* *Modular, Lazy-loading vim configuration* with support for C, C++, Python, Go and Javascript with [tony/vim-config](https://github.com/tony/vim-config) -* *Modular dot-config example* [tony/.dot-config](https://github.com/tony/.dot-config) Other ----- - -* Github: http://www.github.com/tony -* Website: http://www.git-pull.com * LICENSE: MIT -* Author: Tony Narlock (tony@git-pull.com) From f40a00429417297682d08325435bd5b350d10e0a Mon Sep 17 00:00:00 2001 From: How Chen Date: Thu, 14 Jun 2018 10:02:36 +0800 Subject: [PATCH 08/33] Update README.md --- README.md | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 64e60b5..ee2a3ce 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ + +# Use github to sync tmux config **NOTE**: This repo was forked from [tony/tmux-config](https://github.com/tony/tmux-config) and I made adaptation - [Tmux](https://github.com/tmux/tmux) version should be higher than 1.5 - Prefix mapped to `Ctrl-a` for `screen` users @@ -9,31 +11,25 @@ - [tmux-mem-cpu-load](https://github.com/thewtex/tmux-mem-cpu-load): A simple, lightweight program provided for system monitoring in the status line of `tmux` -Installation ------------- - - Download: - +## Installation +Download: ```bash git clone https://github.com/howhow/tmux-config ~/.my_config/tmux ``` - Copy tmux config to home: - +Copy tmux config to home: ```bash ln -s ~/.my_config/tmux/.tmux.conf ~/.tmux.conf ``` -Start tmux ----------- - -To start a session: +## Start tmux +1. type `tmux` in terminal +2. Press `prefix` + I (capital I, as in **I**nstall) to fetch the plugin. -`tmux` +You're good to go! The plugin was cloned to `~/.tmux/plugins/` dir and sourced. -Commands --------- +## Commands Our prefix/leader key is `Control + a` now (just like the `screen` multiplexer). This sequence must be typed before any tmux shortcut. @@ -58,6 +54,5 @@ Custom: * `Control + a` then `m` to switch to ``main-horizontal`` layout with the main window at 60% height. -Other ------ +## Other * LICENSE: MIT From 87d4f578e700f9117aa95349be6a9440346ed1db Mon Sep 17 00:00:00 2001 From: How Chen Date: Thu, 14 Jun 2018 13:51:43 +0800 Subject: [PATCH 09/33] Update README.md --- README.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ee2a3ce..3e45acb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Use github to sync tmux config **NOTE**: This repo was forked from [tony/tmux-config](https://github.com/tony/tmux-config) and I made adaptation - [Tmux](https://github.com/tmux/tmux) version should be higher than 1.5 -- Prefix mapped to `Ctrl-a` for `screen` users +- `` mapped to Ctrl + a for `screen` users - Use [tpm](https://github.com/tmux-plugins/tpm) to manage tmux plug-in, already integrated: - [tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect): Restore `tmux` environment after system restart @@ -24,22 +24,23 @@ ln -s ~/.my_config/tmux/.tmux.conf ~/.tmux.conf ## Start tmux 1. type `tmux` in terminal -2. Press `prefix` + I (capital I, as in **I**nstall) to fetch the plugin. +2. Press `` + I (capital I, as in **I**nstall) to fetch the plugin. You're good to go! The plugin was cloned to `~/.tmux/plugins/` dir and sourced. ## Commands - -Our prefix/leader key is `Control + a` now (just like the `screen` multiplexer). This sequence must be typed before any tmux shortcut. - -* `Control + a` before any command -* `Control + a` then `?` to bring up list of keyboard shortcuts -* `Control + a` then `"` to split window -* `Control + a` then `` to change pane arrangement -* `Control + a` then `o` to rotate panes -* `Control + a` then `h`, `j`, `k`, `l` to move left, down, up, right. Respectively. (vim hjkl) -* `Control + a` then `;` to go to last panel +Our prefix/leader key is Ctrl + a now (just like the `screen` multiplexer). This sequence must be typed before any tmux shortcut. + +| keymap | desc | +|--------|------| +| `` + ? | bring up list of keyboard shortcuts | +| `` + ? | bring up list of keyboard shortcuts | +| `` + " | to split window | +| `` + Space> | to change pane arrangement | +| `` + o | to rotate panes | +| `` + h/j/k/l | to move left/down/up/right. Respectively. (vim hjkl) +| `` + ; | to go to last panel | Beyond your first window: From 3d9dd05a4958be2b69237786e1df5057454510cb Mon Sep 17 00:00:00 2001 From: How Chen Date: Thu, 14 Jun 2018 14:22:25 +0800 Subject: [PATCH 10/33] Update README.md --- README.md | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3e45acb..5771982 100644 --- a/README.md +++ b/README.md @@ -29,30 +29,40 @@ ln -s ~/.my_config/tmux/.tmux.conf ~/.tmux.conf You're good to go! The plugin was cloned to `~/.tmux/plugins/` dir and sourced. -## Commands +## Keymaps Our prefix/leader key is Ctrl + a now (just like the `screen` multiplexer). This sequence must be typed before any tmux shortcut. | keymap | desc | |--------|------| | `` + ? | bring up list of keyboard shortcuts | | `` + ? | bring up list of keyboard shortcuts | -| `` + " | to split window | | `` + Space> | to change pane arrangement | | `` + o | to rotate panes | | `` + h/j/k/l | to move left/down/up/right. Respectively. (vim hjkl) | `` + ; | to go to last panel | -Beyond your first window: +For session: -* `Control + a` then `c` to create a new window -* `Control + a` then `n` to next window -* `Control + a` then `p` to previous window -* `Control + a` then `[0-9]` move to window number -* `Control + a` then `&` to kill window +| keymap | desc | +|--------|------| +| `` + : + type `new` + enter | new session | +| `` + s | list sessions | +| `` + $ | name session | + +For window: -Custom: +| keymap | desc | +|--------|------| +| `` + c | create a new window | +| `` + , | rename current window | +| `` + n | next window | +| `` + p | previous window | +| `` + 0 ~ 9 | move to window number `0` ~ `9` | +| `` + & | kill window | +| `` + m | switch to `main-horizontal` layout with the main window at 60% height| +| `` + - | split current window horizontally | +| `` + \| | split current window vertically | -* `Control + a` then `m` to switch to ``main-horizontal`` layout with the main window at 60% height. ## Other From 0343368b0da6c77583c63b5d495378c1d5c27416 Mon Sep 17 00:00:00 2001 From: How Chen Date: Thu, 14 Jun 2018 14:27:58 +0800 Subject: [PATCH 11/33] update key mapping --- tmux.conf_howchen | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tmux.conf_howchen b/tmux.conf_howchen index 44e8fbf..d120ca2 100644 --- a/tmux.conf_howchen +++ b/tmux.conf_howchen @@ -12,8 +12,8 @@ set-option -g status-attr default set -g @continuum-restore 'on' # set window split -bind-key v split-window -h -bind-key b split-window +bind-key | split-window -h +bind-key - split-window # default window title colors set-window-option -g window-status-fg colour244 #base0 @@ -23,7 +23,7 @@ set-window-option -g window-status-attr dim # active window title colors set-window-option -g window-status-current-fg colour166 #orange set-window-option -g window-status-current-bg default -#set-window-option -g window-status-current-attr bright +set-window-option -g window-status-current-attr bright # pane border set-option -g pane-border-fg colour235 #base02 @@ -83,17 +83,17 @@ bind-key -T copy-mode-vi r send-keys -X rectangle-toggle #bind-key -t vi-copy 'y' copy-selection # hjkl pane traversal -#bind h select-pane -L -#bind j select-pane -D -#bind k select-pane -U -#bind l select-pane -R +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R # switch panes using Alt-arrow without prefix -bind -n M-Left select-pane -L -bind -n M-Right select-pane -R -bind -n M-Up select-pane -U -bind -n M-Down select-pane -D +#bind -n M-Left select-pane -L +#bind -n M-Right select-pane -R +#bind -n M-Up select-pane -U +#bind -n M-Down select-pane -D # set to main-horizontal, 60% height for main pane bind m set-window-option main-pane-height 60\; select-layout main-horizontal From adb958d50f45c9a1459001d3dab744357d229a03 Mon Sep 17 00:00:00 2001 From: How Chen Date: Thu, 14 Jun 2018 14:30:08 +0800 Subject: [PATCH 12/33] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5771982..1ae8f9f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Use github to sync tmux config **NOTE**: This repo was forked from [tony/tmux-config](https://github.com/tony/tmux-config) and I made adaptation - [Tmux](https://github.com/tmux/tmux) version should be higher than 1.5 -- `` mapped to Ctrl + a for `screen` users +- `` changed to Ctrl + a because vim use Ctrl + b - Use [tpm](https://github.com/tmux-plugins/tpm) to manage tmux plug-in, already integrated: - [tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect): Restore `tmux` environment after system restart From e6d0f93cf6dde77316ac50381f6f0af475ce6afb Mon Sep 17 00:00:00 2001 From: How Chen Date: Tue, 19 Jun 2018 16:51:25 +0800 Subject: [PATCH 13/33] Update README.md --- README.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1ae8f9f..9d07361 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,30 @@ ln -s ~/.my_config/tmux/.tmux.conf ~/.tmux.conf You're good to go! The plugin was cloned to `~/.tmux/plugins/` dir and sourced. +## Basic usage +1. list all session +```bash +tmux ls +``` +2. create a new session +```bash +tmux new -s +``` +3. attach to a session +```bash +tmux attch -t +``` +4. kill a session +```bash +tmux kill-session -t +``` +5. kill all session +```bash +tmux ls | grep : | cut -d. -f1 | awk '{print substr($1, 0, length($1)-1)}' | xargs kill +``` -## Keymaps -Our prefix/leader key is Ctrl + a now (just like the `screen` multiplexer). This sequence must be typed before any tmux shortcut. +## Keymaps in the tmux +Our prefix/leader key is Ctrl + a now (just like the `screen` multiplexer). This sequence must be typed before any tmux shortcut. Some keymaps are customized. | keymap | desc | |--------|------| @@ -48,6 +69,7 @@ For session: | `` + : + type `new` + enter | new session | | `` + s | list sessions | | `` + $ | name session | +| `` + d | de-attach from session | For window: @@ -63,7 +85,5 @@ For window: | `` + - | split current window horizontally | | `` + \| | split current window vertically | - - ## Other * LICENSE: MIT From 6134951dbef0c16e9e6a08cb5b61cb1626105f3a Mon Sep 17 00:00:00 2001 From: How Chen Date: Tue, 19 Jun 2018 16:52:28 +0800 Subject: [PATCH 14/33] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 9d07361..f495d9a 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,6 @@ Our prefix/leader key is Ctrl + a now (just like the `scre | keymap | desc | |--------|------| | `` + ? | bring up list of keyboard shortcuts | -| `` + ? | bring up list of keyboard shortcuts | | `` + Space> | to change pane arrangement | | `` + o | to rotate panes | | `` + h/j/k/l | to move left/down/up/right. Respectively. (vim hjkl) From 1f57be661b3a566c5ec79f69cbb64427297a6803 Mon Sep 17 00:00:00 2001 From: How Chen Date: Tue, 19 Jun 2018 16:55:40 +0800 Subject: [PATCH 15/33] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f495d9a..1ef5494 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Use github to sync tmux config **NOTE**: This repo was forked from [tony/tmux-config](https://github.com/tony/tmux-config) and I made adaptation - [Tmux](https://github.com/tmux/tmux) version should be higher than 1.5 -- `` changed to Ctrl + a because vim use Ctrl + b +- `` changed to Ctrl + a (because vim use Ctrl + b) - Use [tpm](https://github.com/tmux-plugins/tpm) to manage tmux plug-in, already integrated: - [tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect): Restore `tmux` environment after system restart @@ -51,7 +51,7 @@ tmux ls | grep : | cut -d. -f1 | awk '{print substr($1, 0, length($1)-1)}' | xar ``` ## Keymaps in the tmux -Our prefix/leader key is Ctrl + a now (just like the `screen` multiplexer). This sequence must be typed before any tmux shortcut. Some keymaps are customized. +Our prefix/leader key is Ctrl + a now (just like the [screen](https://www.gnu.org/software/screen/) multiplexer). This sequence must be typed before any tmux shortcut. Some keymaps are customized. | keymap | desc | |--------|------| From 149a2c30f8c44d34c19d7358f01926d7a4aa5738 Mon Sep 17 00:00:00 2001 From: How Chen Date: Tue, 19 Jun 2018 17:21:58 +0800 Subject: [PATCH 16/33] Update README.md --- README.md | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 1ef5494..78c36c3 100644 --- a/README.md +++ b/README.md @@ -50,19 +50,10 @@ tmux kill-session -t tmux ls | grep : | cut -d. -f1 | awk '{print substr($1, 0, length($1)-1)}' | xargs kill ``` -## Keymaps in the tmux -Our prefix/leader key is Ctrl + a now (just like the [screen](https://www.gnu.org/software/screen/) multiplexer). This sequence must be typed before any tmux shortcut. Some keymaps are customized. - -| keymap | desc | -|--------|------| -| `` + ? | bring up list of keyboard shortcuts | -| `` + Space> | to change pane arrangement | -| `` + o | to rotate panes | -| `` + h/j/k/l | to move left/down/up/right. Respectively. (vim hjkl) -| `` + ; | to go to last panel | - -For session: +## Keymaps in this `tmux.config` +Our prefix/leader key is Ctrl + a now (just like the [screen](https://www.gnu.org/software/screen/) multiplexer). This sequence must be typed before any tmux shortcut. Some keymaps are customized, use `` + ? to bring up list of keyboard shortcuts +### For session | keymap | desc | |--------|------| | `` + : + type `new` + enter | new session | @@ -70,19 +61,38 @@ For session: | `` + $ | name session | | `` + d | de-attach from session | -For window: - +### For window | keymap | desc | |--------|------| +| `` + w | list window | | `` + c | create a new window | | `` + , | rename current window | | `` + n | next window | | `` + p | previous window | +| `` + f | find window | | `` + 0 ~ 9 | move to window number `0` ~ `9` | | `` + & | kill window | -| `` + m | switch to `main-horizontal` layout with the main window at 60% height| + +### For panel +| keymap | desc | +|--------|------| | `` + - | split current window horizontally | | `` + \| | split current window vertically | +| `` + q | show panel number | +| `` + x | kill a panel | +| `` + Space> | to change pane arrangement | +| `` + o | to rotate panes | +| `` + h/j/k/l | to move left/down/up/right. Respectively. (vim hjkl) +| `` + ; | to go to last panel | + +### Copy-paste mode work flow +1. enter copy mode by `` + [ or scroll the mouse +2. move around text via h/j/k/l +3. press v to start select word +4. h/j/k/l or other `vi` key-bind to select, like e +5. y to yank +6. exit copy mode by press q +7. `` + P to paste ## Other * LICENSE: MIT From dc543cbb85674d724a29a221ed761fb3dc02d0ae Mon Sep 17 00:00:00 2001 From: How Chen Date: Tue, 19 Jun 2018 17:41:50 +0800 Subject: [PATCH 17/33] update install script --- install.sh | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index 970e4b8..aad3a1a 100755 --- a/install.sh +++ b/install.sh @@ -1,28 +1,26 @@ -# Author arthurkiller -# email arthur-lee@qq.com -# data 2017-1-4 +##################################################### +# file name: tmux.conf_howchen +# author: chenhow1985gmailcom +# # this shell is used for initialize the tmux-config +##################################################### #!/bin/bash trap exit ERR -if [ -d $HOME/.tmux ] +if [ -d ~/.tmux ] then - echo .tmux already exist - mv $HOME/.tmux $HOME/.tmux.bak + echo ".tmux already exist, backup it" + mv ~/.tmux ~/.tmux.bak fi -if [ -e $HOME/.tmux.conf ] +if [ -e ~/.tmux.conf ] then - echo .tmux.conf already exist - mv $HOME/.tmux.conf $HOME/.tmux.conf.bak + echo ".tmux.conf already exist, backup it" + mv ~/.tmux.conf ~/.tmux.conf.bak fi -cp -r $HOME/tmux-config $HOME/.tmux -ln -s $HOME/.tmux/.tmux.conf $HOME/.tmux.conf - -cd ~/.tmux && git submodule init && git submodule update - -cd ~/.tmux/vendor/tmux-mem-cpu-load && cmake . && make && sudo make install +ln -s ~/.tmux.conf ~/.my_config/tmux/tmux.conf_howchen tmux source-file ~/.tmux.conf + From 599cfe1ea2e9a1cd1b694a3460a571e68889ead4 Mon Sep 17 00:00:00 2001 From: How Chen Date: Mon, 9 Jul 2018 09:24:05 +0800 Subject: [PATCH 18/33] update conf file name --- tmux.conf_howchen => tmux.conf | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tmux.conf_howchen => tmux.conf (100%) diff --git a/tmux.conf_howchen b/tmux.conf similarity index 100% rename from tmux.conf_howchen rename to tmux.conf From fdb91cb1d536f632e69ebe13a47e11c7b15e03cd Mon Sep 17 00:00:00 2001 From: How Chen Date: Mon, 9 Jul 2018 09:40:30 +0800 Subject: [PATCH 19/33] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 78c36c3..2f1bd77 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ git clone https://github.com/howhow/tmux-config ~/.my_config/tmux Copy tmux config to home: ```bash -ln -s ~/.my_config/tmux/.tmux.conf ~/.tmux.conf +ln -s ~/.my_config/tmux/tmux.conf ~/.tmux.conf ``` ## Start tmux From eb301be43025fe6b0bfb3eb73bfe2497b0f69739 Mon Sep 17 00:00:00 2001 From: How Chen Date: Mon, 9 Jul 2018 09:40:56 +0800 Subject: [PATCH 20/33] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index aad3a1a..e4a4e80 100755 --- a/install.sh +++ b/install.sh @@ -20,7 +20,7 @@ then mv ~/.tmux.conf ~/.tmux.conf.bak fi -ln -s ~/.tmux.conf ~/.my_config/tmux/tmux.conf_howchen +ln -s ~/.tmux.conf ~/.my_config/tmux/tmux.conf tmux source-file ~/.tmux.conf From 86ac51514214d3e477f986051a533044c5e86ef4 Mon Sep 17 00:00:00 2001 From: How Chen Date: Fri, 13 Jul 2018 15:37:13 +0800 Subject: [PATCH 21/33] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f1bd77..af9ce7f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Use github to sync tmux config **NOTE**: This repo was forked from [tony/tmux-config](https://github.com/tony/tmux-config) and I made adaptation -- [Tmux](https://github.com/tmux/tmux) version should be higher than 1.5 +- [Tmux](https://github.com/tmux/tmux) version should be higher than **2.5** - `` changed to Ctrl + a (because vim use Ctrl + b) - Use [tpm](https://github.com/tmux-plugins/tpm) to manage tmux plug-in, already integrated: - [tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect): From f52acf5acb9434bc3517d55b577af63b249ef3be Mon Sep 17 00:00:00 2001 From: How Chen Date: Fri, 13 Jul 2018 16:40:38 +0800 Subject: [PATCH 22/33] Update install.sh --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index e4a4e80..d68ecdd 100755 --- a/install.sh +++ b/install.sh @@ -13,6 +13,7 @@ then echo ".tmux already exist, backup it" mv ~/.tmux ~/.tmux.bak fi +git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm if [ -e ~/.tmux.conf ] then From 0e2667987ee327081ca0e3b2758ccc6ff0a8422e Mon Sep 17 00:00:00 2001 From: How Chen Date: Fri, 13 Jul 2018 16:45:22 +0800 Subject: [PATCH 23/33] update install step --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index af9ce7f..ba5b19b 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,11 @@ Download: git clone https://github.com/howhow/tmux-config ~/.my_config/tmux ``` +Download tpm: +```bash +git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm +``` + Copy tmux config to home: ```bash ln -s ~/.my_config/tmux/tmux.conf ~/.tmux.conf From 6cdfee479f571d0a127b10fc833dedde13991b1e Mon Sep 17 00:00:00 2001 From: How Chen Date: Mon, 16 Jul 2018 07:27:36 +0800 Subject: [PATCH 24/33] Update README.md --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ba5b19b..b5cb6cd 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ - [tmux-mem-cpu-load](https://github.com/thewtex/tmux-mem-cpu-load): A simple, lightweight program provided for system monitoring in the status line of `tmux` -## Installation +## Download & Installation Download: ```bash git clone https://github.com/howhow/tmux-config ~/.my_config/tmux @@ -22,7 +22,7 @@ Download tpm: git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm ``` -Copy tmux config to home: +Link tmux config to home: ```bash ln -s ~/.my_config/tmux/tmux.conf ~/.tmux.conf ``` @@ -34,6 +34,11 @@ ln -s ~/.my_config/tmux/tmux.conf ~/.tmux.conf You're good to go! The plugin was cloned to `~/.tmux/plugins/` dir and sourced. ## Basic usage +0. pass color option to xterm, set tmux in `alias` +```bash +tmux='TERM=xterm-256color /usr/local/bin' +``` + 1. list all session ```bash tmux ls From 06260559903fbe743aaf71292ba24b5726066272 Mon Sep 17 00:00:00 2001 From: How Chen Date: Mon, 16 Jul 2018 07:56:34 +0800 Subject: [PATCH 25/33] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b5cb6cd..c1c1876 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ ln -s ~/.my_config/tmux/tmux.conf ~/.tmux.conf ## Start tmux 1. type `tmux` in terminal -2. Press `` + I (capital I, as in **I**nstall) to fetch the plugin. +2. Press `` + I (**capital** I, as in **I**nstall) to fetch the plugin. You're good to go! The plugin was cloned to `~/.tmux/plugins/` dir and sourced. @@ -102,7 +102,7 @@ Our prefix/leader key is Ctrl + a now (just like the [scre 4. h/j/k/l or other `vi` key-bind to select, like e 5. y to yank 6. exit copy mode by press q -7. `` + P to paste +7. `` + P to paste (**capital** P) ## Other * LICENSE: MIT From 914f79bfb76cb047663c1ef74cd2e763ff0a6789 Mon Sep 17 00:00:00 2001 From: How Chen Date: Mon, 16 Jul 2018 09:24:00 +0800 Subject: [PATCH 26/33] change color --- tmux.conf | 70 +++++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/tmux.conf b/tmux.conf index d120ca2..1e39767 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,58 +1,55 @@ -# List of plugins +# list of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' set -g @plugin 'thewtex/tmux-mem-cpu-load' -# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf -set-option -g status-bg colour235 #base02 -set-option -g status-fg colour136 #yellow -set-option -g status-attr default - +# turn ON the continuum feature set -g @continuum-restore 'on' -# set window split -bind-key | split-window -h -bind-key - split-window +########## color scheme ########## +set -g default-terminal "tmux-256color" -# default window title colors +## status color +set-option -g status-bg colour235 #base02 +set-option -g status-fg colour184 #yellow +set-option -g status-attr default + +## default window title colors set-window-option -g window-status-fg colour244 #base0 set-window-option -g window-status-bg default set-window-option -g window-status-attr dim -# active window title colors +## active window title colors set-window-option -g window-status-current-fg colour166 #orange set-window-option -g window-status-current-bg default set-window-option -g window-status-current-attr bright -# pane border +## pane border set-option -g pane-border-fg colour235 #base02 -#set-option -g pane-active-border-fg colour240 #base01 set-option -g pane-active-border-fg colour208 #orange -# message text +## message text set-option -g message-bg colour235 #base02 set-option -g message-fg colour166 #orange -# pane number display +## pane number display set-option -g display-panes-active-colour colour33 #blue set-option -g display-panes-colour colour166 #orange -# clock -#set-window-option -g clock-mode-colour green #green -set-window-option -g clock-mode-colour colour208 #orange +## clock +set-window-option -g clock-mode-colour colour136 +## status line set -g status-interval 1 set -g status-justify centre # center align window list set -g status-left-length 20 set -g status-right-length 140 -set -g status-left '#[fg=green]#H #[fg=black]• #[fg=green,bright]#(uname -r | cut -c 1-6)#[default]' -set -g status-right '#[fg=green,bg=default,bright]#(tmux-mem-cpu-load) #[fg=red,dim,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white,bg=default]%a%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d' +#set -g status-left '#[fg=colour130]#H #[fg=black]• #[fg=yellow,bright]#(uname -r | cut -c 1-6)#[default]' +set -g status-left '#[fg=colour136]#H(#[fg=colour136,bright]#(uname -r | cut -c 1-6))#[default]' +set -g status-right '#[fg=colour136,bg=default,bright]#(tmux-mem-cpu-load) #[fg=green,dim,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white,bg=default]%a%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d' #set -g status-right "#[fg=green]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors --powerline-right --interval 2)#[default]" -# C-b is not acceptable -- Vim uses it -set-option -g prefix C-a -bind-key C-a last-window # Start numbering at 1 set -g base-index 1 @@ -65,22 +62,28 @@ set -s escape-time 0 # client connected to *that window*. Much more reasonable. setw -g aggressive-resize on -# Allows us to use C-a a to send commands to a TMUX session inside -# another TMUX session -bind-key a send-prefix - # Activity monitoring setw -g monitor-activity on set -g visual-activity on +########## Key bind ########## +# C-b is not acceptable -- Vim uses it +set-option -g prefix C-a +bind-key C-a last-window + +# Allows us to use C-a a to send commands to a TMUX session inside another TMUX session +bind-key a send-prefix + +# set window split +bind-key | split-window -h +bind-key - split-window + # Vi copypaste mode set-window-option -g mode-keys vi bind P paste-buffer bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-selection bind-key -T copy-mode-vi r send-keys -X rectangle-toggle -#bind-key -t vi-copy 'v' begin-selection -#bind-key -t vi-copy 'y' copy-selection # hjkl pane traversal bind h select-pane -L @@ -88,7 +91,6 @@ bind j select-pane -D bind k select-pane -U bind l select-pane -R - # switch panes using Alt-arrow without prefix #bind -n M-Left select-pane -L #bind -n M-Right select-pane -R @@ -106,12 +108,10 @@ bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." # auto window rename set-window-option -g automatic-rename -# color -set -g default-terminal "screen-256color" -# utf8 -set -g utf8 -set-window-option -g utf8 on +# utf8, not necessary after tmux 2.2 +#set -g utf8 +#set-window-option -g utf8 on # mouse set -g mouse on From 25222b05ca089356187526296f1a1f787dcabebf Mon Sep 17 00:00:00 2001 From: How Chen Date: Mon, 16 Jul 2018 10:55:26 +0800 Subject: [PATCH 27/33] change color --- tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmux.conf b/tmux.conf index 1e39767..e2f35b4 100644 --- a/tmux.conf +++ b/tmux.conf @@ -31,7 +31,7 @@ set-option -g pane-active-border-fg colour208 #orange ## message text set-option -g message-bg colour235 #base02 -set-option -g message-fg colour166 #orange +set-option -g message-fg colour208 #orange ## pane number display set-option -g display-panes-active-colour colour33 #blue From d93a55130089eeed8db73bf5baaaa6957b65e41d Mon Sep 17 00:00:00 2001 From: How Chen Date: Mon, 16 Jul 2018 15:22:34 +0800 Subject: [PATCH 28/33] update color --- tmux.conf | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tmux.conf b/tmux.conf index e2f35b4..ca82ffa 100644 --- a/tmux.conf +++ b/tmux.conf @@ -45,11 +45,8 @@ set -g status-interval 1 set -g status-justify centre # center align window list set -g status-left-length 20 set -g status-right-length 140 -#set -g status-left '#[fg=colour130]#H #[fg=black]• #[fg=yellow,bright]#(uname -r | cut -c 1-6)#[default]' -set -g status-left '#[fg=colour136]#H(#[fg=colour136,bright]#(uname -r | cut -c 1-6))#[default]' +set -g status-left '#[fg=colour120]#H(#[fg=colour120,bright]#(uname -r | cut -c 1-6))#[default]' set -g status-right '#[fg=colour136,bg=default,bright]#(tmux-mem-cpu-load) #[fg=green,dim,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white,bg=default]%a%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d' -#set -g status-right "#[fg=green]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors --powerline-right --interval 2)#[default]" - # Start numbering at 1 set -g base-index 1 From ed729d3dca31b7e7b39d73f3b7f76f2c98ccf005 Mon Sep 17 00:00:00 2001 From: How Chen Date: Mon, 16 Jul 2018 17:15:54 +0800 Subject: [PATCH 29/33] update status bar --- tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmux.conf b/tmux.conf index ca82ffa..9f34ebe 100644 --- a/tmux.conf +++ b/tmux.conf @@ -46,7 +46,7 @@ set -g status-justify centre # center align window list set -g status-left-length 20 set -g status-right-length 140 set -g status-left '#[fg=colour120]#H(#[fg=colour120,bright]#(uname -r | cut -c 1-6))#[default]' -set -g status-right '#[fg=colour136,bg=default,bright]#(tmux-mem-cpu-load) #[fg=green,dim,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white,bg=default]%a%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d' +set -g status-right '#[fg=colour136,bg=default,bright]#(tmux-mem-cpu-load) #[fg=colour120,dim,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white,bg=default]%a%k:%M:%S-%Z#[default] #[fg=blue]%Y-%m-%d' # Start numbering at 1 set -g base-index 1 From 6db91d03576dd161872995cfbdb343edc46bc851 Mon Sep 17 00:00:00 2001 From: Chen How Date: Tue, 3 Mar 2020 20:02:11 +0800 Subject: [PATCH 30/33] update install script --- install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install.sh b/install.sh index d68ecdd..344425f 100755 --- a/install.sh +++ b/install.sh @@ -7,7 +7,6 @@ #!/bin/bash -trap exit ERR if [ -d ~/.tmux ] then echo ".tmux already exist, backup it" @@ -21,7 +20,7 @@ then mv ~/.tmux.conf ~/.tmux.conf.bak fi -ln -s ~/.tmux.conf ~/.my_config/tmux/tmux.conf +ln -s ~/.my_config/tmux/tmux.conf ~/.tmux.conf tmux source-file ~/.tmux.conf From 91009204b41cf2b43f65095745311da5ef3eebb5 Mon Sep 17 00:00:00 2001 From: Chen How Date: Tue, 3 Mar 2020 20:03:13 +0800 Subject: [PATCH 31/33] update tmux theme after v3.2 --- tmux.conf | 182 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 104 insertions(+), 78 deletions(-) diff --git a/tmux.conf b/tmux.conf index 9f34ebe..397e9b6 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,69 +1,115 @@ -# list of plugins +# List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' -set -g @plugin 'thewtex/tmux-mem-cpu-load' - +#set -g @plugin 'thewtex/tmux-mem-cpu-load' +set -g @plugin 'tmux-plugins/tmux-cpu' +set -g @plugin 'tmux-plugins/tmux-net-speed' +set -g @plugin 'tmux-plugins/tmux-battery' +set -g @plugin 'tmux-plugins/tmux-prefix-highlight' +set -g @plugin 'tmux-plugins/tmux-pain-control' + +# 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' + +##################################### config plugin #################################### +# tmux-continuum # turn ON the continuum feature set -g @continuum-restore 'on' -########## color scheme ########## -set -g default-terminal "tmux-256color" - -## status color -set-option -g status-bg colour235 #base02 -set-option -g status-fg colour184 #yellow -set-option -g status-attr default - -## default window title colors -set-window-option -g window-status-fg colour244 #base0 -set-window-option -g window-status-bg default -set-window-option -g window-status-attr dim +# tmux-net-speed +set -g @net_speed_interfaces "eth0" +set -g @download_speed_format "%10s" +set -g @upload_speed_format "%10s" +set -g @net_speed_format "D:%10s U:%10s" -## active window title colors -set-window-option -g window-status-current-fg colour166 #orange -set-window-option -g window-status-current-bg default -set-window-option -g window-status-current-attr bright - -## pane border -set-option -g pane-border-fg colour235 #base02 -set-option -g pane-active-border-fg colour208 #orange +#################################### config color ###################################### +set -g default-terminal "screen-256color" +# pane border +#set -g pane-border-style fg='#6272a4' +#set -g pane-active-border-style fg='#ff79c6' ## message text -set-option -g message-bg colour235 #base02 -set-option -g message-fg colour208 #orange - -## pane number display -set-option -g display-panes-active-colour colour33 #blue -set-option -g display-panes-colour colour166 #orange - -## clock -set-window-option -g clock-mode-colour colour136 - +#set -g message-style bg='#44475a',fg='#8be9fd' +# ## status line -set -g status-interval 1 -set -g status-justify centre # center align window list -set -g status-left-length 20 -set -g status-right-length 140 -set -g status-left '#[fg=colour120]#H(#[fg=colour120,bright]#(uname -r | cut -c 1-6))#[default]' -set -g status-right '#[fg=colour136,bg=default,bright]#(tmux-mem-cpu-load) #[fg=colour120,dim,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white,bg=default]%a%k:%M:%S-%Z#[default] #[fg=blue]%Y-%m-%d' - -# Start numbering at 1 -set -g base-index 1 - -# Allows for faster key repetition -set -s escape-time 0 - -# 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 - -# Activity monitoring -setw -g monitor-activity on -set -g visual-activity on - -########## Key bind ########## +#set -g status-style bg='#44475a',fg='#bd93f9' +#set -g status-interval 1 +# +## status left +## are we controlling tmux or the content of the panes? +##set -g status-left '#[bg=#f8f8f2]#[fg=#282a36]#{?client_prefix,#[bg=#ff79c6],} ☺ ' +## are we zoomed into a pane? +##set -ga status-left '#[bg=#44475a]#[fg=#ff79c6] #{?window_zoomed_flag, ↕ , }' +# +## window status +#set-window-option -g window-status-style fg='#bd93f9',bg=default +#set-window-option -g window-status-current-style fg='#ff79c6',bg='#282a36' +##set -g window-status-current-format "#[fg=#44475a]#[bg=#bd93f9]#[fg=#f8f8f2]#[bg=#bd93f9] #I #W #[fg=#bd93f9]#[bg=#44475a]" +##set -g window-status-format "#[fg=#f8f8f2]#[bg=#44475a]#I #W #[fg=#44475a] " +#set -g window-status-current-format "#[fg=#44475a]#[bg=#bd93f9]#[fg=#f8f8f2]#[bg=#bd93f9] #I #W #[fg=#bd93f9]#[bg=#44475a]" +#set -g window-status-format "#[fg=#f8f8f2]#[bg=#44475a]#I #W #[fg=#44475a]" +## status right +##set -g status-right '#[fg=#8be9fd,bg=#44475a]#[fg=#44475a,bg=#8be9fd] #(tmux-mem-cpu-load -g 5 --interval 2) ' +##set -ga status-right '#[fg=#ff79c6,bg=#8be9fd]#[fg=#44475a,bg=#ff79c6] #(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") ' +##set -ga status-right '#[fg=#bd93f9,bg=#ff79c6]#[fg=#f8f8f2,bg=#bd93f9] %a %H:%M:%S #[fg=#6272a4]%Y-%m-%d ' +#set -ga status-right '#[fg=#ff79c6,bg=#8be9fd]#[fg=#44475a,bg=#ff79c6] #(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") ' +#set -ga status-right '#[fg=#bd93f9,bg=#ff79c6]#[fg=#f8f8f2,bg=#bd93f9] %a %H:%M:%S #[fg=#6272a4]%Y-%m-%d ' + +## COLORSCHEME: gruvbox dark +set-option -g status "on" + +# default statusbar color +set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1 + +# default window title colors +set-window-option -g window-status-style bg=colour214,fg=colour237 # bg=yellow, fg=bg1 + +# default window with an activity alert +set-window-option -g window-status-activity-style bg=colour237,fg=colour248 # bg=bg1, fg=fg3 + +# active window title colors +set-window-option -g window-status-current-style bg=red,fg=colour237 # fg=bg1 + +# pane border +set-option -g pane-active-border-style fg=colour214 #fg2 +set-option -g pane-border-style fg=colour237 #bg1 + +# message infos +set-option -g message-style bg=colour239,fg=colour223 # bg=bg2, fg=fg1 + +# writing commands inactive +set-option -g message-command-style bg=colour239,fg=colour223 # bg=fg3, fg=bg1 + +# pane number display +set-option -g display-panes-active-colour colour214 #fg2 +set-option -g display-panes-colour colour237 #bg1 + +# clock +#set-window-option -g clock-mode-colour colour109 #blue +set-window-option -g clock-mode-colour colour239 #blue + +# bell +set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg + +## Theme settings mixed with colors (unfortunately, but there is no cleaner way) +set-option -g status-justify "left" +set-option -g status-left-style none +set-option -g status-left-length "80" +set-option -g status-right-style none +set-option -g status-right-length "80" +set-window-option -g window-status-separator "" + +#################################### config status ###################################### +set-option -g status-left "#[fg=colour248, bg=colour241] #S #[fg=colour241, bg=colour237, nobold, noitalics, nounderscore]" +set-option -g status-right "#[fg=colour239, bg=colour237, nobold, nounderscore, noitalics]#[fg=colour246,bg=colour239] %Y-%m-%d %H:%M #[fg=colour248, bg=colour239, nobold, noitalics, nounderscore]#[fg=colour237, bg=colour248] #h " + +set-window-option -g window-status-current-format "#[fg=colour237, bg=colour214, nobold, noitalics, nounderscore] #[fg=colour239, bg=colour214] #I #[fg=colour239, bg=colour214, bold] #W #[fg=colour214, bg=colour237, nobold, noitalics, nounderscore]" +set-window-option -g window-status-format "#[fg=colour237,bg=colour239,noitalics]#[fg=colour223,bg=colour239] #I#[fg=colour223, bg=colour239] #W #[fg=colour239, bg=colour237, noitalics]" + +#################################### Key bind ########################################## # C-b is not acceptable -- Vim uses it set-option -g prefix C-a bind-key C-a last-window @@ -105,7 +151,6 @@ bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." # auto window rename set-window-option -g automatic-rename - # utf8, not necessary after tmux 2.2 #set -g utf8 #set-window-option -g utf8 on @@ -113,24 +158,5 @@ set-window-option -g automatic-rename # mouse set -g mouse on -# https://github.com/edkolev/dots/blob/master/tmux.conf -# Updates for tmux 1.9's current pane splitting paths. - -# from powerline -#run-shell "tmux set-environment -g TMUX_VERSION_MAJOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f1 | sed 's/[^0-9]*//g')" -#run-shell "tmux set-environment -g TMUX_VERSION_MINOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f2 | sed 's/[^0-9]*//g')" - -# status bar -if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 2\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set-option -g status-utf8 on' - -# rm mouse mode fail -#if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 1\)' 'set -g mouse off' -#if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 1\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set -g mode-mouse off' - -# fix pane_current_path on new window and splits -if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind c; bind c new-window -c "#{pane_current_path}"' -if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" "unbind '\"'; bind '\"' split-window -v -c '#{pane_current_path}'" -if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind v; bind v split-window -h -c "#{pane_current_path}"' -if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind %; bind % split-window -h -c "#{pane_current_path}"' - -run '~/.tmux/plugins/tpm/tpm' +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run -b '~/.tmux/plugins/tpm/tpm' From 61cffdd42ea28a5fa04e54df232776e43470cca9 Mon Sep 17 00:00:00 2001 From: Chen How Date: Wed, 4 Mar 2020 02:20:05 +0800 Subject: [PATCH 32/33] add prefix in status line --- tmux.conf | 43 ++++++++++++------------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/tmux.conf b/tmux.conf index 397e9b6..7f9ec78 100644 --- a/tmux.conf +++ b/tmux.conf @@ -25,39 +25,20 @@ set -g @download_speed_format "%10s" set -g @upload_speed_format "%10s" set -g @net_speed_format "D:%10s U:%10s" +# tmux-prefix +set -g @prefix_highlight_fg 'white' # default is 'colour231' +set -g @prefix_highlight_bg 'blue' # default is 'colour04' +set -g @prefix_highlight_show_copy_mode 'on' +set -g @prefix_highlight_copy_mode_attr 'fg=black,bg=yellow,bold' # default is 'fg=default,bg=yellow' +set -g @prefix_highlight_show_sync_mode 'on' +set -g @prefix_highlight_sync_mode_attr 'fg=black,bg=green' # default is 'fg=default,bg=yellow' +set -g @prefix_highlight_prefix_prompt 'Wait' +set -g @prefix_highlight_copy_prompt 'Copy' +set -g @prefix_highlight_sync_prompt 'Sync' + #################################### config color ###################################### set -g default-terminal "screen-256color" -# pane border -#set -g pane-border-style fg='#6272a4' -#set -g pane-active-border-style fg='#ff79c6' -## message text -#set -g message-style bg='#44475a',fg='#8be9fd' -# -## status line -#set -g status-style bg='#44475a',fg='#bd93f9' -#set -g status-interval 1 -# -## status left -## are we controlling tmux or the content of the panes? -##set -g status-left '#[bg=#f8f8f2]#[fg=#282a36]#{?client_prefix,#[bg=#ff79c6],} ☺ ' -## are we zoomed into a pane? -##set -ga status-left '#[bg=#44475a]#[fg=#ff79c6] #{?window_zoomed_flag, ↕ , }' -# -## window status -#set-window-option -g window-status-style fg='#bd93f9',bg=default -#set-window-option -g window-status-current-style fg='#ff79c6',bg='#282a36' -##set -g window-status-current-format "#[fg=#44475a]#[bg=#bd93f9]#[fg=#f8f8f2]#[bg=#bd93f9] #I #W #[fg=#bd93f9]#[bg=#44475a]" -##set -g window-status-format "#[fg=#f8f8f2]#[bg=#44475a]#I #W #[fg=#44475a] " -#set -g window-status-current-format "#[fg=#44475a]#[bg=#bd93f9]#[fg=#f8f8f2]#[bg=#bd93f9] #I #W #[fg=#bd93f9]#[bg=#44475a]" -#set -g window-status-format "#[fg=#f8f8f2]#[bg=#44475a]#I #W #[fg=#44475a]" -## status right -##set -g status-right '#[fg=#8be9fd,bg=#44475a]#[fg=#44475a,bg=#8be9fd] #(tmux-mem-cpu-load -g 5 --interval 2) ' -##set -ga status-right '#[fg=#ff79c6,bg=#8be9fd]#[fg=#44475a,bg=#ff79c6] #(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") ' -##set -ga status-right '#[fg=#bd93f9,bg=#ff79c6]#[fg=#f8f8f2,bg=#bd93f9] %a %H:%M:%S #[fg=#6272a4]%Y-%m-%d ' -#set -ga status-right '#[fg=#ff79c6,bg=#8be9fd]#[fg=#44475a,bg=#ff79c6] #(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") ' -#set -ga status-right '#[fg=#bd93f9,bg=#ff79c6]#[fg=#f8f8f2,bg=#bd93f9] %a %H:%M:%S #[fg=#6272a4]%Y-%m-%d ' - ## COLORSCHEME: gruvbox dark set-option -g status "on" @@ -104,7 +85,7 @@ set-window-option -g window-status-separator "" #################################### config status ###################################### set-option -g status-left "#[fg=colour248, bg=colour241] #S #[fg=colour241, bg=colour237, nobold, noitalics, nounderscore]" -set-option -g status-right "#[fg=colour239, bg=colour237, nobold, nounderscore, noitalics]#[fg=colour246,bg=colour239] %Y-%m-%d %H:%M #[fg=colour248, bg=colour239, nobold, noitalics, nounderscore]#[fg=colour237, bg=colour248] #h " +set-option -g status-right "#{prefix_highlight}#[fg=colour239, bg=colour237, nobold, nounderscore, noitalics]#[fg=colour246,bg=colour239] %Y-%m-%d %H:%M #[fg=colour248, bg=colour239, nobold, noitalics, nounderscore]#[fg=colour237, bg=colour248] #h" set-window-option -g window-status-current-format "#[fg=colour237, bg=colour214, nobold, noitalics, nounderscore] #[fg=colour239, bg=colour214] #I #[fg=colour239, bg=colour214, bold] #W #[fg=colour214, bg=colour237, nobold, noitalics, nounderscore]" set-window-option -g window-status-format "#[fg=colour237,bg=colour239,noitalics]#[fg=colour223,bg=colour239] #I#[fg=colour223, bg=colour239] #W #[fg=colour239, bg=colour237, noitalics]" From 4925db946e4d4e766d9d9afd95956779bd4a3600 Mon Sep 17 00:00:00 2001 From: Chen How Date: Tue, 17 Mar 2020 13:50:49 +0800 Subject: [PATCH 33/33] disable tmux theme plugin --- tmux.conf | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tmux.conf b/tmux.conf index 7f9ec78..60bf156 100644 --- a/tmux.conf +++ b/tmux.conf @@ -9,6 +9,8 @@ set -g @plugin 'tmux-plugins/tmux-battery' set -g @plugin 'tmux-plugins/tmux-prefix-highlight' set -g @plugin 'tmux-plugins/tmux-pain-control' +#set -g @plugin 'jimeh/tmux-themepack' + # Other examples: # set -g @plugin 'github_username/plugin_name' # set -g @plugin 'git@github.com/user/plugin' @@ -19,12 +21,6 @@ set -g @plugin 'tmux-plugins/tmux-pain-control' # turn ON the continuum feature set -g @continuum-restore 'on' -# tmux-net-speed -set -g @net_speed_interfaces "eth0" -set -g @download_speed_format "%10s" -set -g @upload_speed_format "%10s" -set -g @net_speed_format "D:%10s U:%10s" - # tmux-prefix set -g @prefix_highlight_fg 'white' # default is 'colour231' set -g @prefix_highlight_bg 'blue' # default is 'colour04' @@ -36,6 +32,9 @@ set -g @prefix_highlight_prefix_prompt 'Wait' set -g @prefix_highlight_copy_prompt 'Copy' set -g @prefix_highlight_sync_prompt 'Sync' +# tmux theme +#set -g @themepack 'powerline/block/blue' + #################################### config color ###################################### set -g default-terminal "screen-256color" @@ -139,5 +138,11 @@ set-window-option -g automatic-rename # mouse set -g mouse on +# copy from system +# tmux < 2.5 +# bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard' +# tmux >= 2.5 +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' + # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run -b '~/.tmux/plugins/tpm/tpm'