update
This commit is contained in:
parent
b6cf50d87f
commit
3ce3e3927c
2 changed files with 17 additions and 2 deletions
|
|
@ -72,16 +72,31 @@ notes() {
|
||||||
tmux new-session -s notes nvim Welcome.md
|
tmux new-session -s notes nvim Welcome.md
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
tmux send-keys -t "$name" 'set -g status off' C-m
|
tmux send-keys -t "$name" 'tmux set -g status off;clear' C-m
|
||||||
tmux send-keys -t "$name" 'nvim Welcome.md' C-m
|
tmux send-keys -t "$name" 'nvim Welcome.md' C-m
|
||||||
tmux attach-session -t "$name"
|
tmux attach-session -t "$name"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
popup() {
|
||||||
|
name="popup"
|
||||||
|
|
||||||
|
tmux has-session -t ${name} >/dev/null && {
|
||||||
|
tmux attach-session -t ${name}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
tmux new-session -d -s "$name" -c "$HOME"
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
tmux send-keys -t "$name" 'tmux set -g status off;clear' C-m
|
||||||
|
tmux attach-session -t "$name"
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
new) new $2 ;;
|
new) new $2 ;;
|
||||||
switch) switch ;;
|
switch) switch ;;
|
||||||
delete) delete ;;
|
delete) delete ;;
|
||||||
window) window ;;
|
window) window ;;
|
||||||
notes) notes ;;
|
notes) notes ;;
|
||||||
|
popup) popup ;;
|
||||||
*) echo "Please enter an action" ;;
|
*) echo "Please enter an action" ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ bind f display-popup -E -w 80% -h 75% "yazi"
|
||||||
bind T if-shell -F '#{==:#{session_name},popup}' {
|
bind T if-shell -F '#{==:#{session_name},popup}' {
|
||||||
detach-client
|
detach-client
|
||||||
} {
|
} {
|
||||||
display-popup -d "#{pane_current_path}" -xC -yC -w 80% -h 75% -E 'tmux attach-session -t popup || tmux new-session -s popup'
|
display-popup -d "#{pane_current_path}" -xC -yC -w 80% -h 75% -E ". $HOME/.config/scripts/sessions.sh popup"
|
||||||
}
|
}
|
||||||
|
|
||||||
bind S if-shell -F '#{==:#{session_name},scratch}' {
|
bind S if-shell -F '#{==:#{session_name},scratch}' {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue