alias: tni and tai as interactive versions of tn i ta, .profile: add startx as alternative to sx

This commit is contained in:
2025-09-29 22:55:30 +02:00
parent f76cac70eb
commit e0f22f25cf
2 changed files with 20 additions and 1 deletions

View File

@@ -16,7 +16,17 @@ tn() {
if [ $# -eq 0 ]; then
tmux new
else
tmux new -s "$@"
tmux new -A -s "$@"
fi
}
tni() {
DIR=$(zoxide query -l | vis-menu -p 'Dir:' -l 10)
if [ -n "$DIR" ]; then
NAME=$(echo | vis-menu -p 'Session name:' $(basename $DIR))
if [ -n "$DIR" ]; then
tmux new -A -s "$NAME" -c "$DIR"
fi
fi
}
@@ -28,6 +38,13 @@ ta() {
fi
}
tai() {
NAME=$(tmux ls | vis-menu -p 'Session:' -l 10 | cut -d: -f1)
if [ -n "$NAME" ]; then
tmux attach -t "$NAME"
fi
}
vf() {
vis "+fzf-files auto-files '$1'"
}