Add tmux config and replace zellij with tmux in zshrc.
Zhrc also has some light refactoring, and has added a zsh local file which gets sourced if it exists, useful for adding local environment variables
This commit is contained in:
parent
6ebb641656
commit
d094fce66d
6 changed files with 186 additions and 6 deletions
14
home/.config/tmux/tmux-move-pane.sh
Executable file
14
home/.config/tmux/tmux-move-pane.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/zsh
|
||||
|
||||
source_pane=$(tmux display-message -p '#{pane_id}')
|
||||
target_window=$1
|
||||
|
||||
window_exists=$(tmux list-windows -F '#I' | grep "^$target_window$")
|
||||
|
||||
if [ -z "$window_exists" ]; then
|
||||
tmux break-pane -d -t $target_window
|
||||
else
|
||||
target_pane=$(tmux list-panes -t $target_window -F '#{pane_id}' | sort | tail -n 1)
|
||||
tmux join-pane -d -s $source_pane -t $target_pane
|
||||
tmux select-layout -t $target_window main-vertical
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue