This commit is contained in:
DeveloperDurp 2025-04-08 07:01:07 -05:00
parent b6cf50d87f
commit 3ce3e3927c
2 changed files with 17 additions and 2 deletions

View file

@ -72,16 +72,31 @@ notes() {
tmux new-session -s notes nvim Welcome.md
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 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
new) new $2 ;;
switch) switch ;;
delete) delete ;;
window) window ;;
notes) notes ;;
popup) popup ;;
*) echo "Please enter an action" ;;
esac

View file

@ -106,7 +106,7 @@ bind f display-popup -E -w 80% -h 75% "yazi"
bind T if-shell -F '#{==:#{session_name},popup}' {
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}' {