__ | |_.--------.--.--.--.--. | _| | | |_ _| |____|__|__|__|_____|__.__| == terminology == +--------------+-----------+ | pane | pane | | | | +--------------+-----------+ | pane | | | +-[window][window][window]-+ windows ------- - windows (like a browser tabs) can be cycled through using leader + n/p - each window can be labelled using leader + , (comma) panes ----- - panes can be navigated using leader + arrow keystrokes - each pane can be labelled the command `select-pane -T ` a session can be thought of as a workspace. a session can contain lots of different windows and of course those windows can contain different panes. use cases for sessions might be to have a "dev" environment, or a collection of long running processes to monitor if you don't want to turn them into services. merging windows as panes ------------------------ when you want to pull in another window you need to mark the window you wish to pull in using leader + m (you'll see an M next to the window title) then go to the window you which to pull in the marked window and use the command `join-pane`, by default the panes will split horizontally (see keystrokes on how to change the arrangement) == keystrokes == - leader + : - enter command mode - leader + z - zoom in/out of pane[1] - leader + alt + 1 - balance all panes vertically - leader + alt + 2 - balance all panes horizontal - leader + space - cycle through different layouts more can be found in man or this [3] == building for raspberry pies == debian's always going to be several versions behind. here's an example build to enable sixel. ``` curl -LO https://github.com/tmux/tmux/releases/download/3.6a/tmux-3.6a.tar.gz tar xvfz tmux-3.6a.tar.gz cd tmux-3.6a/ sudo apt install -y libevent-dev bison byacc # warning: you may need to install the 'build-essential' package ./configure --enable-sixel # 3rd attempt make ./tmux -V sudo make install # will attempt to install in /usr/local ``` == scratchpad == ``` # multi line hooks[2] to be used in conjunction with [1] tmux set-hook -g after-resize-pane \ 'if "[ #{window_zoomed_flag} -eq 1 ]" \ "run \"tmux select-pane -P bg=red\"" \ "run \"tmux select-pane -P bg=black\"" ' ``` == todo == - add zoom pane[1][2] - add shell env (ssh agent, etc) on reattach[4] - turn hooks into multi line for readability[5] - read tao of tmux book see if it differs from the original site [6] - shell wrapper for tmux commands [7] == references == [1]: https://superuser.com/questions/238702/maximizing-a-pane-in-tmux [2]: https://superuser.com/a/1455092/52458 [3]: https://github.com/tony/tmux-config/?tab=readme-ov-file#commands [4]: https://github.com/samoshkin/tmux-config/tree/master [5]: https://devel.tech/tips/n/tMuXz2lj/the-power-of-tmux-hooks/ [6]: https://leanpub.com/read/the-tao-of-tmux [7]: https://superuser.com/questions/238702/maximizing-a-pane-in-tmux [8]: https://thoughtbot.com/blog/a-tmux-crash-course