Compare commits

..

No commits in common. "88fe71138023b306f1b28265c3778c2f4d6fbfc3" and "5043c7ddc1d17d1855ba9f79934c2edf15335c39" have entirely different histories.

4 changed files with 169 additions and 187 deletions

49
README.md Normal file
View file

@ -0,0 +1,49 @@
# Darkcloud TMUX Config
## Features
* A custom theme that matches the one used in [darkcloud-vimconfig](https://github.com/prurigro/darkcloud-vimconfig).
* A bandwidth monitor showing the current upload and download speed of either **eth0** or the device you've set to **$NETDEV**.
* Sane defaults and a set of custom key bindings that group similar ideas and make frequently used commands easier to access.
* Optional support for powerline fonts that looks oh so much better when they're used :).
![Darkcloud TMUX Config Theme](https://i.imgur.com/Ps3XmMc.png)
## Installation
1. Choose either **tmux.powerline.conf** if powerline fonts are available or **tmux.normal.conf** if they're not, and install it to __/etc/tmux.conf__ for a system-wide install or __~/.tmux.conf__ for a local install.
1. Install **bwrate** to somewhere available in **$PATH** and make it executable (ie: `install -Dm755 bwrate /usr/local/bin/bwrate`)
1. If your network device isn't named **eth0**, set **$NETDEV** to the name of the device you'd like to use somewhere tmux will see it when it runs (ie: `echo 'export NETDEV="wlan0"' >> ~/.bashrc`)
## Key Bindings
* **Prefix**: `<Ctrl><Space>`
| Key(s) | Behaviour |
|-----------------------------------------|----------------------------------------------------------------------------------------|
| `c` and `<Ctrl>c` | Create a new pane and create a new pane in the current directory respectively |
| `[` and `]` | Split the window vertically and horizontally respectively |
| `-` and `=` | Select an even layout vertically and horizontally respectively |
| `_` and `+` | Rotate the window counter-clockwise and clockwise respectively |
| `S` | Run the `swap-pane` command to swap the current pane with the marked one |
| `.` and `,` | Move and swap the current window with the provided window number respectively |
| `$` and `#` | Rename the current session and window with the provided name respectively |
| `<Space>` and `<Ctrl><Space>` | Move to the previously selected pane and window respectively |
| `h`, `j`, `k` and `l` | Move left, down, up and right between panes respectively like the arrow keys |
| `` ` `` | Toggle synchronized input between the panes on the current window |
| `<Ctrl>r` | Clear the terminal history, tmux history and the current window/pane |
| `r` and `R` | Reload /etc/tmux.conf and ~/.tmux.conf respectively |
| `?` and `/` | Show help for available key bindings and commands respectively |
| `y` and `<Ctrl>p` | Enter __copy mode__ and paste from the copy buffer respectively |
| `<Ctrl>v` and `<Ctrl>y` | Pastes the X buffer in tmux, and sends the tmux buffer to X respectively |
| (**copy mode**) `v`, `y` and `<Escape>` | Begin selection, copy selection and cancel **copy mode** respectively |
| `W` | Write scrollback buffer to file |
| `Alt-[0-9]` (no prefix) | Switch directly to the given window |
## Credits
* Written by Kevin MacMartin: [GitHub Projects](https://github.com/prurigro) | [Arch Linux AUR Packages](https://aur.archlinux.org/packages/?SeB=m&K=prurigro)
## License
This config and the bwrate script are released under the MIT license.

View file

@ -1,63 +0,0 @@
# Darkcloud TMUX Config
## Features
* A custom theme that matches the one used in [darkcloud-vimconfig](https://github.com/prurigro/darkcloud-vimconfig).
* A bandwidth monitor showing the current upload and download speed of either **eth0** or the device you've set to **$NETDEV**.
* Sane defaults and a set of custom key bindings that group similar ideas and make frequently used commands easier to access.
* Optional support for powerline fonts that looks oh so much better when they're used :).
![Darkcloud TMUX Config Theme](https://i.imgur.com/Ps3XmMc.png)
## Installation
1. Choose either `tmux.powerline.conf` if powerline fonts are available or `tmux.normal.conf` if they're not, and install it to __/etc/tmux.conf__ for a system-wide install or __~/.tmux.conf__ for a local install.
1. Install **bwrate** to somewhere available in `$PATH` and make it executable (ie: `install -Dm755 bwrate /usr/local/bin/bwrate`)
1. If your network device isn't named `eth0`, set `$NETDEV` to the name of the device you'd like to use somewhere tmux will see it when it runs (ie: `echo 'export NETDEV="wlan0"' >> ~/.bashrc`)
## Key Bindings
* **Prefix**: `<Ctrl><Space>`
### With Prefix
| Key(s) | Behaviour |
|-----------------------------------------|--------------------------------------------------------------------|
| `c` and `<Ctrl>c` | Create a new pane and create a new pane in the current directory |
| `[` and `]` | Split the window vertically and horizontally |
| `-` and `=` | Select an even layout vertically and horizontally |
| `_` and `+` | Rotate the panes clockwise and counter-clockwise |
| `S` | Swap the current pane with the marked one (`M` to mark) |
| `,` | Swap the current window with another (using its index) |
| `#` | Rename the current window |
| `<Space>` and `<Ctrl><Space>` | Move to the previously selected pane and window |
| `` ` `` | Toggle synchronized input between the panes on the current window |
| `r` | Reload /etc/tmux.conf |
| `?` and `/` | Show help for available key binding help and command help |
| `W` | Write scrollback buffer to file |
| `V` | Enter **copy mode** |
| `<Ctrl>p` | Paste from the copy buffer |
### Without Prefix
| Key(s) | Behaviour |
|-----------------------------------------|--------------------------------------------------------------------|
| `<Alt><Shift><Up,Down,Left,Right>` | Navigate to the pane in the respective direction |
| `<Alt>N` and `<Alt>P` | Switch to the next and previous window |
| `Alt-[0-9]` | Switch to the window with the respective index |
### Copy Mode
| Key(s) | Behaviour |
|-----------------------------------------|--------------------------------------------------------------------|
| `v` | Start visually selecting text |
| `y` | Copy the selected text |
| `<Escape>` | Exit **copy mode**
## Credits
* Written by Kevin MacMartin: [GitHub Projects](https://github.com/prurigro) | [Arch Linux AUR Packages](https://aur.archlinux.org/packages/?SeB=m&K=prurigro)
## License
This config and the bwrate script are released under the MIT license.

View file

@ -53,71 +53,71 @@ bind -T root MouseDown3Pane send-keys -M # send right clicks to the application
# KEY BINDINGS # KEY BINDINGS
# #
# c and <ctrl>c to create a new pane in the current path and in home # r and <ctrl>r to reloading ~/.tmux.conf and /etc/tmux.conf respectively
bind r source-file ~/.tmux.conf
bind R source-file /etc/tmux.conf
#
# c and <ctrl>c to create a new pane in the current path and in home respectively
bind C-c new-window -c "#{pane_current_path}" bind C-c new-window -c "#{pane_current_path}"
bind c new-window bind c new-window
# #
# [ and ] to splitting the window into top/bottom and left/right # [ and ] to splitting the window into top/bottom and left/right respectively
bind [ split-window -v -c "#{pane_current_path}" bind [ split-window -v -c "#{pane_current_path}"
bind ] split-window -h -c "#{pane_current_path}" bind ] split-window -h -c "#{pane_current_path}"
# #
# - and = to evenly laying out the panes top->bottom and left->right # - and = to evenly laying out the panes top->bottom and left->right respectively
bind - select-layout even-vertical bind - select-layout even-vertical
bind = select-layout even-horizontal bind = select-layout even-horizontal
# #
# _ and + to rotate the panes clockwise and counter-clockwise # _ and + to rotate counter-clockwise and clockwise respectively
bind -r _ rotate-window -U bind -r _ rotate-window -U
bind -r + rotate-window -D bind -r + rotate-window -D
# #
# S to run the swap-pane command # S to run the swap-pane command
bind S swap-pane bind S swap-pane
# #
# , to swap the current window with another # . and , to move and swap the current window respectively (. is set by default)
bind , command-prompt "swap-window -t '%%'" bind , command-prompt "swap-window -t '%%'"
# #
# # to rename the current window # $ and # to rename the session and current window respectively ($ is set by default)
bind "#" command-prompt -I '#W' "rename-window '%%'" bind "#" command-prompt -I '#W' "rename-window '%%'"
# #
# Space and <ctrl><space> to navigating to the previously selected window and pane # Space and <ctrl>Space to navigating to the previously selected window and pane respectively
bind Space last-window bind Space last-window
bind C-Space last-pane bind C-Space last-pane
# #
# ` to synchronous panes # rebind up,down,left,right to the same without repeat
bind Left select-pane -L
bind Down select-pane -D
bind Up select-pane -U
bind Right select-pane -R
#
# h,j,k,l to movement left,down,up,right between panes respectively
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#
# ~ to synchronous panes
bind ` set-window-option synchronize-panes \; display "synchronize-panes: toggled" bind ` set-window-option synchronize-panes \; display "synchronize-panes: toggled"
# #
# r to reload /etc/tmux.conf # escape to clearing history and screen
bind r source-file /etc/tmux.conf bind C-r send-keys -R\; send-keys 'C-l'\; clear-history
# #
# ? and / to show keyboard and command help # ? and <ctrl>? to keyboard and command help respectively
bind ? list-keys bind ? list-keys
bind / list-commands bind / list-commands
# #
# W to save scrollback to file # y and <ctrl>p to copy mode and pasting the copy buffer respectively
bind-key W command-prompt -p 'write scrollback to file:' -I '~/' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer' bind y copy-mode
#
# V to enter copy mode
bind V copy-mode
#
# <ctrl>p paste the copy buffer
bind C-p paste-buffer bind C-p paste-buffer
# #
# rebind up,down,left and right to the same without repeat # (copy mode) v,y and escape to select, copy and cancel respectively
bind Up select-pane -U bind -Tcopy-mode-vi y send -X copy-selection
bind Down select-pane -D bind -Tcopy-mode-vi v send -X begin-selection
bind Left select-pane -L bind -Tcopy-mode-vi Escape send -X cancel
bind Right select-pane -R
# #
# (without prefix) <alt><shift> + up,down,left and right to navigate between panes # bind <alt>[0-9] to switching directly to the respective window
bind -n M-S-Up select-pane -U
bind -n M-S-Down select-pane -D
bind -n M-S-Left select-pane -L
bind -n M-S-Right select-pane -R
#
# (without prefix) <alt> + N and P to move to the next and previous windows
bind -n M-N next-window
bind -n M-P previous-window
#
# (without prefix) <alt>[0-9] to switch directly to the window with the respective index
bind -n M-1 select-window -t 1 bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2 bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3 bind -n M-3 select-window -t 3
@ -129,10 +129,8 @@ bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9 bind -n M-9 select-window -t 9
bind -n M-0 select-window -t 10 bind -n M-0 select-window -t 10
# #
# (copy mode) v,y and escape to select, copy and cancel # save scrollback to file
bind -Tcopy-mode-vi v send -X begin-selection bind-key W command-prompt -p 'write scrollback to file:' -I '~/tmux-history.txt' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
bind -Tcopy-mode-vi y send -X copy-selection
bind -Tcopy-mode-vi Escape send -X cancel
# STATUS LINE # STATUS LINE
# #

View file

@ -53,71 +53,71 @@ bind -T root MouseDown3Pane send-keys -M # send right clicks to the application
# KEY BINDINGS # KEY BINDINGS
# #
# c and <ctrl>c to create a new pane in the current path and in home # r and <ctrl>r to reloading ~/.tmux.conf and /etc/tmux.conf respectively
bind r source-file ~/.tmux.conf
bind R source-file /etc/tmux.conf
#
# c and <ctrl>c to create a new pane in the current path and in home respectively
bind C-c new-window -c "#{pane_current_path}" bind C-c new-window -c "#{pane_current_path}"
bind c new-window bind c new-window
# #
# [ and ] to splitting the window into top/bottom and left/right # [ and ] to splitting the window into top/bottom and left/right respectively
bind [ split-window -v -c "#{pane_current_path}" bind [ split-window -v -c "#{pane_current_path}"
bind ] split-window -h -c "#{pane_current_path}" bind ] split-window -h -c "#{pane_current_path}"
# #
# - and = to evenly laying out the panes top->bottom and left->right # - and = to evenly laying out the panes top->bottom and left->right respectively
bind - select-layout even-vertical bind - select-layout even-vertical
bind = select-layout even-horizontal bind = select-layout even-horizontal
# #
# _ and + to rotate the panes clockwise and counter-clockwise # _ and + to rotate counter-clockwise and clockwise respectively
bind -r _ rotate-window -U bind -r _ rotate-window -U
bind -r + rotate-window -D bind -r + rotate-window -D
# #
# S to run the swap-pane command # S to run the swap-pane command
bind S swap-pane bind S swap-pane
# #
# , to swap the current window with another # . and , to move and swap the current window respectively (. is set by default)
bind , command-prompt "swap-window -t '%%'" bind , command-prompt "swap-window -t '%%'"
# #
# # to rename the current window # $ and # to rename the session and current window respectively ($ is set by default)
bind "#" command-prompt -I '#W' "rename-window '%%'" bind "#" command-prompt -I '#W' "rename-window '%%'"
# #
# Space and <ctrl><space> to navigating to the previously selected window and pane # Space and <ctrl>Space to navigating to the previously selected window and pane respectively
bind Space last-window bind Space last-window
bind C-Space last-pane bind C-Space last-pane
# #
# ` to synchronous panes # rebind up,down,left,right to the same without repeat
bind Left select-pane -L
bind Down select-pane -D
bind Up select-pane -U
bind Right select-pane -R
#
# h,j,k,l to movement left,down,up,right between panes respectively
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#
# ~ to synchronous panes
bind ` set-window-option synchronize-panes \; display "synchronize-panes: toggled" bind ` set-window-option synchronize-panes \; display "synchronize-panes: toggled"
# #
# r to reload /etc/tmux.conf # escape to clearing history and screen
bind r source-file /etc/tmux.conf bind C-r send-keys -R\; send-keys 'C-l'\; clear-history
# #
# ? and / to show keyboard and command help # ? and <ctrl>? to keyboard and command help respectively
bind ? list-keys bind ? list-keys
bind / list-commands bind / list-commands
# #
# W to save scrollback to file # y and <ctrl>p to copy mode and pasting the copy buffer respectively
bind-key W command-prompt -p 'write scrollback to file:' -I '~/' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer' bind y copy-mode
#
# V to enter copy mode
bind V copy-mode
#
# <ctrl>p paste the copy buffer
bind C-p paste-buffer bind C-p paste-buffer
# #
# rebind up,down,left and right to the same without repeat # (copy mode) v,y and escape to select, copy and cancel respectively
bind Up select-pane -U bind -Tcopy-mode-vi y send -X copy-selection
bind Down select-pane -D bind -Tcopy-mode-vi v send -X begin-selection
bind Left select-pane -L bind -Tcopy-mode-vi Escape send -X cancel
bind Right select-pane -R
# #
# (without prefix) <alt><shift> + up,down,left and right to navigate between panes # bind <alt>[0-9] to switching directly to the respective window
bind -n M-S-Up select-pane -U
bind -n M-S-Down select-pane -D
bind -n M-S-Left select-pane -L
bind -n M-S-Right select-pane -R
#
# (without prefix) <alt> + N and P to move to the next and previous windows
bind -n M-N next-window
bind -n M-P previous-window
#
# (without prefix) <alt>[0-9] to switch directly to the window with the respective index
bind -n M-1 select-window -t 1 bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2 bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3 bind -n M-3 select-window -t 3
@ -129,10 +129,8 @@ bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9 bind -n M-9 select-window -t 9
bind -n M-0 select-window -t 10 bind -n M-0 select-window -t 10
# #
# (copy mode) v,y and escape to select, copy and cancel # save scrollback to file
bind -Tcopy-mode-vi v send -X begin-selection bind-key W command-prompt -p 'write scrollback to file:' -I '~/tmux-history.txt' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
bind -Tcopy-mode-vi y send -X copy-selection
bind -Tcopy-mode-vi Escape send -X cancel
# STATUS LINE # STATUS LINE
# #