diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index bd5347d..0000000 --- a/.gitmodules +++ /dev/null @@ -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/.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' diff --git a/.tmux.conf b/.tmux.conf deleted file mode 100644 index da15918..0000000 --- a/.tmux.conf +++ /dev/null @@ -1,108 +0,0 @@ -# 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 window split -bind-key v split-window -h -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 - -# 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 colour240 #base01 - -# message text -set-option -g message-bg colour235 #base02 -set-option -g message-fg colour166 #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 green #green - - -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' - -# 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 - -# 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 - -# 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 - -# 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 - -# hjkl pane traversal -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R - -# set to main-horizontal, 60% height for main pane -bind m set-window-option main-pane-height 60\; select-layout main-horizontal - -bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'" - -# reload config -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" - -# 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}"' diff --git a/README.md b/README.md index c4af994..c1c1876 100644 --- a/README.md +++ b/README.md @@ -1,193 +1,108 @@ -[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). - -Installation ------------- - - Download: - -```bash -git clone https://github.com/tony/tmux-config.git ~/.tmux -``` - - Copy tmux config to home: +# 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 **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): + 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` + +## Download & Installation +Download: ```bash -ln -s ~/.tmux/.tmux.conf ~/.tmux.conf +git clone https://github.com/howhow/tmux-config ~/.my_config/tmux ``` - Go to config dir: - +Download tpm: ```bash -cd ~/.tmux +git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm ``` -Stats ------ - -### tmux-mem-cpu-load - -Works on Linux and OS X. - - Prep ourself to download submodule: - +Link tmux config to home: ```bash -git submodule init +ln -s ~/.my_config/tmux/tmux.conf ~/.tmux.conf ``` - Download submodule: - -```bash -git submodule update -``` +## Start tmux +1. type `tmux` in terminal +2. Press `` + I (**capital** I, as in **I**nstall) to fetch the plugin. - Change dir to tmux-mem-cpu-load: +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 -cd ~/.tmux/vendor/tmux-mem-cpu-load +tmux='TERM=xterm-256color /usr/local/bin' ``` - General make file: - +1. list all session ```bash -cmake . +tmux ls ``` - - Compile our binary: - +2. create a new session ```bash -make +tmux new -s ``` - - Install our binary to `/usr/local/bin/tmux-mem-cpu-load`: - +3. attach to a session ```bash -sudo make install +tmux attch -t ``` - - Go home: - +4. kill a session ```bash -cd ~ -``` - - Launch tmux: +tmux kill-session -t ``` -tmux -``` - And press `Control + a` then `d` to go back to the terminal. - - Update config: - +5. kill all session ```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 ----------- - -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 --------- - -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 - -Beyond your first window: - -* `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 - -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 +tmux ls | grep : | cut -d. -f1 | awk '{print substr($1, 0, length($1)-1)}' | xargs kill +``` + +## 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 | +| `` + s | list sessions | +| `` + $ | name session | +| `` + d | de-attach from session | + +### 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 | + +### 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 (**capital** P) + +## Other * LICENSE: MIT -* Author: Tony Narlock (tony@git-pull.com) diff --git a/install.sh b/install.sh index 970e4b8..344425f 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 +git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm -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 ~/.my_config/tmux/tmux.conf ~/.tmux.conf tmux source-file ~/.tmux.conf + diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 0000000..60bf156 --- /dev/null +++ b/tmux.conf @@ -0,0 +1,148 @@ +# 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 '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' + +#set -g @plugin 'jimeh/tmux-themepack' + +# 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' + +# 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' + +# tmux theme +#set -g @themepack 'powerline/block/blue' + +#################################### config color ###################################### +set -g default-terminal "screen-256color" + +## 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 "#{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]" + +#################################### 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 + +# hjkl pane traversal +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 + +bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'" + +# reload config +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 + +# 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' 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