Updating PKGBUILD; restructuring some aliases & functions

This commit is contained in:
2025-11-03 11:11:18 -06:00
parent f80c799ec9
commit cd920b33d3
5 changed files with 42 additions and 28 deletions

View File

@@ -1,7 +1,7 @@
# Set up screen/tmux safety nest by default for remote sessions
if [ -n "$SSH_CLIENT" ]; then
if [ -n "$SSH_CLIENT" ]; then
# Prefer tmux
if [ -x "$(which tmux 2>/dev/null)" ] && [ -z "$TMUX" ]; then
if [ -x "$(which tmux 2>/dev/null)" ] && [ -z "$TMUX" ]; then
if [ `tmux list-sessions | grep created | wc -l` -eq 0 ]; then
exec tmux
elif [ `tmux list-sessions | grep created | wc -l` -eq 1 ] && [ `tmux list-sessions | grep attached | wc -l` -eq 0 ]; then
@@ -10,7 +10,11 @@ if [ -n "$SSH_CLIENT" ]; then
tmux list-sessions
fi
alias tat="exec tmux a -d -t"
fi;
function tssh() {
tmux new-window -n "$1" "/bin/bash -i -l -c ssh\ $1"
tmux select-window -t "$1"
}
fi;
### XFCE4 ###
elif [ `who -m | grep -E "^$(whoami)" | awk '{ print $2; }' | grep -E -c "^tty"` -eq 1 ] && [ -x /usr/sbin/startxfce4 ] && [ `pgrep -ac xinit` -eq 0 ] && [ `whoami` != 'root' ]; then