tmux session managment

This commit is contained in:
thek4n 2024-10-13 18:03:13 +03:00
parent 20e0ec5f7a
commit 6fd2f58f6c
3 changed files with 1 additions and 44 deletions

View File

@ -188,13 +188,4 @@ bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 2 scroll-down
# Session managment
bind 1 run-shell ~/.tmux/01.sh
bind 2 run-shell ~/.tmux/02.sh
bind 3 run-shell ~/.tmux/03.sh
bind 4 run-shell ~/.tmux/04.sh
bind 5 run-shell ~/.tmux/05.sh
bind 6 run-shell ~/.tmux/06.sh
bind 7 run-shell ~/.tmux/07.sh
bind 8 run-shell ~/.tmux/08.sh
bind 9 run-shell ~/.tmux/09.sh
bind 0 run-shell ~/.tmux/10.sh
bind f display-popup -EE '"$HOME/.tmux/$(ls ~/.tmux/*.sh | xargs -n 1 basename | fzf +m)"'

View File

@ -1,18 +0,0 @@
#!/usr/bin/env bash
set -x
SESSION=dotfiles
MAINW=1
WORKING_PROJECT="$HOME/dotfiles"
if ! tmux has-session -t "$SESSION"; then
tmux new-session -s "$SESSION" -d -n "$MAINW" -c "$WORKING_PROJECT"
tmux splitw -t "$SESSION:$MAINW" -d -b -h -l "$_tmux_other_pane_size" -c '#{pane_current_path}'
tmux send-keys -t "$SESSION:$MAINW.1" "git pull && git push" Enter
tmux send-keys -t "$SESSION:$MAINW.2" '$EDITOR' Enter
tmux send-keys -t "$SESSION:$MAINW.2" ':Telescope find_files' Enter
fi
tmux switch-client -t "$SESSION"

View File

@ -1,16 +0,0 @@
#!/usr/bin/env bash
set -x
SESSION="sandbox${RANDOM}"
MAINW=1
WORKING_PROJECT="$(mktemp -d)"
tmux new-session -s "$SESSION" -d -n "$MAINW" -c ~
tmux splitw -t "$SESSION:$MAINW" -d -b -h -l "$_tmux_other_pane_size" -c '#{pane_current_path}'
tmux new-window -d -n "2" -t "$SESSION:2" -c "$WORKING_PROJECT"
tmux splitw -t "$SESSION:2" -d -b -h -l "$_tmux_other_pane_size" -c "$WORKING_PROJECT"
tmux send-keys -t "$SESSION:2.1" 'git clone .' Left Left
tmux switch-client -t "$SESSION"