<prefix> s
- show sessions in choose mode
<prefix> w
- show windows in choose mode
<prefix> : new -s <name of session>
Ctrl + B, $
https://superuser.com/a/428025/644627
Ctrl+b : attach -c "#{pane_current_path}"
https://tech.serhatteker.com/post/2022-05/how-to-resize-tmux-panes
Vertically rezie current panel to have 3 less cells :resize-pane -D 3
Direction
:resize-pane -L 3 # Resizes the current pane Left by 3 cells
:resize-pane -R 3 # Resizes the current pane Right by 3 cells
:resize-pane -U 3 # Resizes the current pane Upward by 3 cells
:resize-pane -D 3 # Resizes the current pane Down by 3 cells
# Using variables to characterize the command:
DIRECTION=D
CellSize=3
:resize-pane -$DIRECTION $cell-size
It was hard to find some information about tmux modes:
I ran into Josh Branchaud's post on the subject https://dev.to/jbranchaud/the-modes-of-tmux-3d86
This led me to searching mode on tmux man page: https://man7.org/linux/man-pages/man1/tmux.1.html
Default Mode - (not defined in the man page but is described in Getting Started with tmux - By Victor Quinn)
Control Mode
- Control Mode (control mode is accessable through
<prefix> :
in a tmux session.)
Windows and Panes
- Copy Mode
- View Mode
- Choose Mode
- Client Mode
- Tree Mode
- Customize Mode
Formats
- Pane Mode
Buffers
- Buffer Mode
At that point I wanted to know what the normal / default mode would be called. ...
downloading the tmux source code: https://github.com/tmux/tmux
And searching, as far as I could tell from the c code. There was no enum and the pane modes actually have a case statement where they assign a screen mode and a cursor mode.
tmux/screen.c - screen_set_cursor_style()
default mode (made up term) is pane_in_mode: 0
command mode is definately pane_in_mode: 1
**Dump variable values in tmux **
https://superuser.com/a/1461746/644627
tmux display-message -a
tmux display-message -a | grep pane
(Ignore this comment it has been added to the gist above.)
Found it!
Ctrl+b :
attach -c ~/Desktop
source: https://unix.stackexchange.com/a/274551/188491
Running the following command before and after you will see the session path change.
tmux display-message -a | grep session
Ctrl+b :
attach -c "#{pane_current_path}"
(Ignore this comment it has been added to the gist above.)