alias: tni and tai as interactive versions of tn i ta, .profile: add startx as alternative to sx
This commit is contained in:
@@ -16,7 +16,17 @@ tn() {
|
|||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
tmux new
|
tmux new
|
||||||
else
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,6 +38,13 @@ ta() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tai() {
|
||||||
|
NAME=$(tmux ls | vis-menu -p 'Session:' -l 10 | cut -d: -f1)
|
||||||
|
if [ -n "$NAME" ]; then
|
||||||
|
tmux attach -t "$NAME"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
vf() {
|
vf() {
|
||||||
vis "+fzf-files auto-files '$1'"
|
vis "+fzf-files auto-files '$1'"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,5 +35,7 @@ if [[ -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" && "$XDG_VTNR" -eq 1 ]]; then
|
|||||||
exec river
|
exec river
|
||||||
elif which /usr/bin/sx > /dev/null; then
|
elif which /usr/bin/sx > /dev/null; then
|
||||||
exec /usr/bin/sx ~/.xsession
|
exec /usr/bin/sx ~/.xsession
|
||||||
|
elif which /usr/bin/startx > /dev/null; then
|
||||||
|
exec /usr/bin/startx
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user