aboutsummaryrefslogtreecommitdiff
path: root/tmux/.tmux/plugins
diff options
context:
space:
mode:
authorKumar Damani <damani.kumar@gmail.com>2019-12-09 00:13:52 +0000
committerKumar Damani <damani.kumar@gmail.com>2019-12-09 00:13:52 +0000
commit63ad7837556192589799261cdccc28ee3002b36e (patch)
tree34523192bcac71533d895653bd413455dbaf7e71 /tmux/.tmux/plugins
parentbad72a6710ac3a8d78c98327d9b9f7e987751862 (diff)
updated mutt and st
Diffstat (limited to 'tmux/.tmux/plugins')
-rw-r--r--tmux/.tmux/plugins/dwm.tmux/README.md43
-rw-r--r--tmux/.tmux/plugins/dwm.tmux/dwm.tmux41
-rw-r--r--tmux/.tmux/plugins/dwm.tmux/screenshot.pngbin0 -> 467353 bytes
3 files changed, 84 insertions, 0 deletions
diff --git a/tmux/.tmux/plugins/dwm.tmux/README.md b/tmux/.tmux/plugins/dwm.tmux/README.md
new file mode 100644
index 0000000..c971e77
--- /dev/null
+++ b/tmux/.tmux/plugins/dwm.tmux/README.md
@@ -0,0 +1,43 @@
+dwm.tmux
+===
+[dwm](http://dwm.suckless.org/)-inspired tiling pane management for Tmux.
+
+![](https://raw.githubusercontent.com/saysjonathan/dwm.tmux/master/screenshot.png)
+
+## Usage
+dwm.tmux defines several keybindings to assist with pane management:
+
+- `Meta-N` Create a new pane and place it in the Main pane
+- `Meta-W` Create a new pane starting in the same directory and place it in the Main pane
+- `Meta-C` Close the current pane. If the pane is in the Main pane, close the pane and promote the first pane in the stack to the Main pane
+- `Meta-J` Select the next pane (clockwise)
+- `Meta-K` Select the previous pane (counterclockwise)
+- `Meta-,` Rotate panes counterclockwise
+- `Meta-.` Rotate panes clockwise
+- `Meta-R` Refresh layout
+- `Meta-space` Place select pane in the Main pane
+- `Meta-m` Zoom selected pane
+
+## Details
+
+Similar to dwm, windows are always organised as follows:
+
+```
+ ====================================
+| | S1 |
+| |==================
+| M(0) | S2 |
+| |==================
+| | S3 |
+ ====================================
+```
+
+A large Master pane is placed on the left side of the screen while a stack of smaller panes is placed on the right. The Master pane is always pane 0, while the stack of panes is numbered sequentially in ascending order.
+
+## Setup
+To use dwm.tmux:
+
+- `git clone git@github.com/saysjonathan/dwm.tmux.git $HOME/.dwm.tmux`
+- `echo 'source-file $HOME/.dwm.tmux/dwm.tmux' >> $HOME/.tmux.conf`
+
+dwm.tmux requires tmux > 2.0.
diff --git a/tmux/.tmux/plugins/dwm.tmux/dwm.tmux b/tmux/.tmux/plugins/dwm.tmux/dwm.tmux
new file mode 100644
index 0000000..9a3a218
--- /dev/null
+++ b/tmux/.tmux/plugins/dwm.tmux/dwm.tmux
@@ -0,0 +1,41 @@
+# Create new pane
+bind -n M-n split-window -t :.0 \;\
+ swap-pane -s :.0 -t :.1 \;\
+ select-layout main-vertical \;\
+ run "tmux resize-pane -t :.0 -x \"$(echo \"#{window_width}/2/1\" | bc)\""
+
+# Create new pane in current directory
+bind -n M-w split-window -t :.0 -c "#{pane_current_path}" \;\
+ swap-pane -s :.0 -t :.1 \;\
+ select-layout main-vertical \;\
+ run "tmux resize-pane -t :.0 -x \"$(echo \"#{window_width}/2/1\" | bc)\""
+
+# Kill pane
+bind -n M-c kill-pane -t :. \;\
+ select-layout main-vertical \;\
+ run "tmux resize-pane -t :.0 -x \"$(echo \"#{window_width}/2/1\" | bc)\"" \;\
+ select-pane -t :.0
+
+
+# Next pane
+bind -n M-j select-pane -t :.+
+
+# Prev pane
+bind -n M-k select-pane -t :.-
+
+# Rotate counterclockwise
+bind -n M-, rotate-window -U \; select-pane -t 0
+
+# Rotate clockwise
+bind -n M-. rotate-window -D \; select-pane -t 0
+
+# Focus selected pane
+bind -n M-Space swap-pane -s :. -t :.0 \; select-pane -t :.0
+
+# Refresh layout
+bind -n M-r select-layout main-vertical \;\
+ run "tmux resize-pane -t :.0 -x \"$(echo \"#{window_width}/2/1\" | bc)\""
+
+# Zoom selected pane
+unbind M-m
+bind -n M-m resize-pane -Z
diff --git a/tmux/.tmux/plugins/dwm.tmux/screenshot.png b/tmux/.tmux/plugins/dwm.tmux/screenshot.png
new file mode 100644
index 0000000..1efed57
--- /dev/null
+++ b/tmux/.tmux/plugins/dwm.tmux/screenshot.png
Binary files differ