Updating PKGBUILD; restructuring some aliases & functions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user