dwm.tmux
dwm.tmux copied to clipboard
dwm-inpsired tiling pane management for tmux
dwm.tmux
dwm-inspired tiling pane management for Tmux.

Dependencies
dwm.tmux requires tmux > 3.2.
Installation
To install, use the provided Makefile:
git clone https://github.com/saysjonathan/dwm.tmux.git
cd dwm.tmux
make
By default dwm.tmux uses /usr/local as it's prefix. To change the prefix:
make PREFIX=$HOME
Ensure that $PREFIX/bin is in your PATH.
Setup
To use, source the dwm.tmux tmux config:
echo 'source-file /usr/local/lib/dwm.tmux' >> $HOME/.tmux.conf
Usage
dwm.tmux defines the following command aliases, each with a default keybinding:
newpaneMeta-nCreate a new pane and place it in the Main panenewpanecurdirMeta-wCreate a new pane starting in the same directory and place it in the Main panekillpaneMeta-cClose 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 panenextpaneMeta-jSelect the next pane (clockwise)prevpaneMeta-kSelect the previous pane (counterclockwise)rotateccwMeta-<Rotate panes counterclockwiserotatecwMeta->Rotate panes clockwiselayouttileMeta-tRefresh layout (return to Main and Stack setup)zoomMeta-EnterPlace select pane in the Main panefloatMeta-SpaceSwitch pane to floating fullscreendecmfactMeta-hDecrease the main pane space factorincmfactMeta-lIncrease the main pane space factorwindow[0-9]Meta-[0-9]Select the target window by ID
Also defined are environment variables to tweak behavior:
mfactMain pane space factor, the size of the main pane as a percentage of total window sizekilllastIf value is greater than0, kill pane even if its the last pane in a window
Customizations
Keybindings and default values can be set in a configuration file:
setenv -g killlast 1 # kill pane even if it's the last
bind -n M-q killpane
bind -n M-t newpanecurdir
Customizations should be added after the source-file command which loads dwm.tmux.
Details
Similar to dwm, windows are always organised as follows:
====================================
| | S1 |
| |==================
| M(0) | S2 |
| |==================
| | S3 |
====================================
A large Main pane is placed on the left side of the screen while a stack of smaller panes is placed on the right. The Main pane is always pane 0, while the stack of panes is numbered sequentially in ascending order.