Fix indent
This commit is contained in:
parent
0de6b9edf1
commit
c6aa7f2ded
38
zlogin
38
zlogin
|
@ -42,31 +42,37 @@ fi
|
||||||
|
|
||||||
# List tmux sessions if tmux is available
|
# List tmux sessions if tmux is available
|
||||||
if [ $(command -v tmux) ]; then
|
if [ $(command -v tmux) ]; then
|
||||||
TMUX_SESSION=$(tmux ls 2> /dev/null|grep -- window)
|
TMUX_SESSION=$(tmux ls 2> /dev/null|grep -- window)
|
||||||
# If tmux session available and if not already inside a tmux
|
# If tmux session available and if not already inside a tmux
|
||||||
if [ ${TMUX_SESSION} ] && [ -z "${TMUX}" ]; then
|
if [ ${TMUX_SESSION} ] && [ -z "${TMUX}" ]; then
|
||||||
printf '%b' "${MAGENTA}++++++++++++++++++++++++ ${WHITEB}Tmux session${RESET} ${MAGENTA}:++++++++++++++++++++++++${RESET}\n"
|
printf '%b' "${MAGENTA}++++++++++++++++++++++++ ${WHITEB}Tmux session${RESET} ${MAGENTA}:++++++++++++++++++++++++${RESET}\n"
|
||||||
tmux ls
|
tmux ls
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ssh-agent with fix socket path
|
||||||
|
## See load-ssh-agent function in ~/.zsh/zshrc
|
||||||
|
load-ssh-agent
|
||||||
|
|
||||||
# Recupere un caractere unique
|
# Recupere un caractere unique
|
||||||
getc ()
|
getc ()
|
||||||
{
|
{
|
||||||
stty raw -echo
|
stty raw -echo
|
||||||
tmp=`dd bs=1 count=1 2>/dev/null`
|
tmp=`dd bs=1 count=1 2>/dev/null`
|
||||||
eval $1='$tmp'
|
eval $1='$tmp'
|
||||||
stty cooked
|
stty cooked
|
||||||
}
|
}
|
||||||
|
|
||||||
## Autorun an X session with some restrictions
|
## Autorun an X session with some restrictions
|
||||||
## Set a ~/.noxorg file to work in tty only
|
## Set a ~/.noxorg file to work in tty only
|
||||||
# If non-root session
|
# If non-root session
|
||||||
if [ ${USER} != "root" ] && [ $(command -v startx) ]; then
|
if [ ${USER} != "root" ] && [ $(command -v startx) ]; then
|
||||||
# If it's a VC console and
|
# If it's a VC console and
|
||||||
# no X session already launch and
|
# no X session already launch and
|
||||||
# no ~/.noxorg file exist
|
# no ~/.noxorg file exist
|
||||||
if [ -z "${SSH_TTY}" ] && [ -z "$(pidof /usr/lib/xorg/Xorg)" ] && [ ! -f ~/.noxorg ];then
|
if [ -z "${SSH_TTY}" ] &&
|
||||||
|
[ ! -f "${HOME}/.noxorg" ] &&
|
||||||
|
! pidof "/usr/lib/xorg/Xorg" ; then
|
||||||
echo "Aucune session X11 détectée, voulez vous en lancer une ? [O|n]"
|
echo "Aucune session X11 détectée, voulez vous en lancer une ? [O|n]"
|
||||||
getc start_x
|
getc start_x
|
||||||
if [ `echo "$start_x" | grep "n"` ];then
|
if [ `echo "$start_x" | grep "n"` ];then
|
||||||
|
@ -76,7 +82,3 @@ if [ ${USER} != "root" ] && [ $(command -v startx) ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ssh-agent with fix socket path
|
|
||||||
## See load-ssh-agent function in ~/.zsh/zshrc
|
|
||||||
load-ssh-agent
|
|
||||||
|
|
Loading…
Reference in New Issue