💾 Archived View for gopher.zcrayfish.soy › 0 › irc › profile.d.zcrayfish.sh captured on 2024-08-31 at 11:57:46.
⬅️ Previous capture (2024-03-21)
-=-=-=-=-=-=-
# Check for interactive shell export MOSH_SERVER_NETWORK_TMOUT="3600" if [ -z "$PS1" ] # no prompt? ### if [ -v PS1 ] # On Bash 4.2+ ... then return 0 else #If it's interactive, print useful information echo "$USER $(/usr/bin/tty) $(date "+%Y-%d-%m %k:%M:%S")" cat /etc/motd fi #Enable mouse support in midnight commander, lynx alias lynx="lynx -use_mouse" alias mc="mc -x" alias mcedit="mcedit -x" alias pico="env DISPLAY=null pico -m" #S.u.S.E. style prompt if [ "$PS1" ]; then if [ "`id -u`" -eq 0 ]; then export PS1='\e[0;31m\u@\h:\w\$\e[m ' else export PS1='\u@\h:\w> ' fi fi #Run su as login shell by default: case "$TERM" in tmux*) su() { if [ "${1+set}" = set ]; then /bin/su "$@" else local code=0 local ancien ancien=$(/usr/local/bin/tmux display-message -p '#W' 2> /dev/null ) /usr/local/bin/tmux rename-window "#[bg=red]#[fg=white]ash" 2> /dev/null command /bin/su -l code=$? /usr/local/bin/tmux rename-window "$ancien" 2> /dev/null /usr/local/bin/tmux set -w automatic-rename on 2> /dev/null return $code fi } :;; *) su() { if [ "${1+set}" = set ]; then /bin/su "$@" else su -l fi } :;; esac