tmux session
This commit is contained in:
parent
adb2c7713e
commit
7bb9a3ca97
@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
SESSION=s01
|
SESSION=dotfiles
|
||||||
MAINW=1
|
MAINW=1
|
||||||
|
|
||||||
WORKING_PROJECT="$HOME/code/shell/note"
|
WORKING_PROJECT="$HOME/dotfiles"
|
||||||
EDITOR="vi"
|
|
||||||
|
|
||||||
if ! tmux has-session -t "$SESSION"; then
|
if ! tmux has-session -t "$SESSION"; then
|
||||||
tmux new-session -s "$SESSION" -d -n "$MAINW" -c "$WORKING_PROJECT"
|
tmux new-session -s "$SESSION" -d -n "$MAINW" -c "$WORKING_PROJECT"
|
||||||
tmux send-keys -t "$SESSION:$MAINW" "$EDITOR" Enter
|
tmux send-keys -t "$SESSION:$MAINW" '$EDITOR' Enter
|
||||||
tmux splitw -t "$SESSION:$MAINW" -d -h -l 40% -c '#{pane_current_path}'
|
tmux send-keys -t "$SESSION:$MAINW" , f f
|
||||||
|
tmux splitw -t "$SESSION:$MAINW" -d -h -l 35% -c '#{pane_current_path}'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tmux switch-client -t "$SESSION"
|
tmux switch-client -t "$SESSION"
|
||||||
Loading…
x
Reference in New Issue
Block a user