dwm-inspired tiling pane management for Tmux.
unified.tmux.conf contains the functionality of lib/dwm.tmux and bin/dwm.tmux It can be used directly as the .tmux.conf file
dwm.tmux requires tmux > 3.2.
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
.
To use, source the dwm.tmux
tmux config:
echo 'source-file /usr/local/lib/dwm.tmux' >> $HOME/.tmux.conf
dwm.tmux
defines the following command aliases, each with a default keybinding:
newpane
Meta-n
Create a new pane and place it in the Main panenewpanecurdir
Meta-w
Create a new pane starting in the same directory and place it in the Main panekillpane
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 panenextpane
Meta-j
Select the next pane (clockwise)prevpane
Meta-k
Select the previous pane (counterclockwise)rotateccw
Meta-<
Rotate panes counterclockwiserotatecw
Meta->
Rotate panes clockwiselayouttile
Meta-t
Refresh layout (return to Main and Stack setup)zoom
Meta-Enter
Place select pane in the Main panefloat
Meta-Space
Switch pane to floating fullscreendecmfact
Meta-h
Decrease the main pane space factorincmfact
Meta-l
Increase the main pane space factorwindow[0-9]
Meta-[0-9]
Select the target window by ID
Also defined are environment variables to tweak behavior:
mfact
Main pane space factor, the size of the main pane as a percentage of total window sizekilllast
If value is greater than0
, kill pane even if its the last pane in a window
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
.
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.