SpectreOS-old/bash.bashrc
simono41 85c27d7aa8 fix
2018-02-27 22:31:11 +01:00

83 lines
17 KiB
Text
Executable file
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# /etc/bash.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ $DISPLAY ]] && shopt -s checkwinsize
PS1='[\u@\h \W]\$ '
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
screen*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
esac
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
echo -e "                        .                         "
echo -e "                        ;'                        "
echo -e "                       'cl.                       "
echo -e "                      .cccl                       "
echo -e "                      :cccl:                      "
echo -e "                     ,cccccl'                     "
echo -e "                    .lllcccco.                    "
echo -e "                   .lllllllcll                    "
echo -e "                   cllllllllloc                   "
echo -e "                  . :oolllllllo;                  "
echo -e "                 ;oc..:ooolllllo'                 "
echo -e "                'ddooo::loooollod.                "
echo -e "               .ddddddoooooooooooo.               "
echo -e "              .ddddddddddoooooooooo               "
echo -e "             .dddddddolllcccccllllol              "
echo -e "             odddolccccccccccccccccc:             "
echo -e "            odlcccccccccccccccccccccc;            "
echo -e "           :cccccccccc,....:cccccccccc,           "
echo -e "          ;cccccccccc.      'cccccccccc'          "
echo -e "         ,cccccccccc.        'cccccccccc.         "
echo -e "        ,cccccccccc;          :cccccccccc.        "
echo -e "       'ccccccccccc.          ,cccccc:;;cc.       "
echo -e "      .cccccccccccc.          .cccccccc:...       "
echo -e "     .ccccccccccccc.          'ccccccccccc'       "
echo -e "    .cccccccccc:;'.           ..,;cccccccccc,     "
echo -e "   .ccccccc;'.                      .,:cccccc:    "
echo -e "  .cccc:'.                              .,cccc:   "
echo -e " .cc;.                                     .':c:  "
echo -e ".,.                                            ., "
echo -e "                                                  "
echo -e "\n";
echo -e "\033[1;33m Willkommen auf $(uname -n) \033[0m";
echo -e "\n";
echo -e "=============================================================================================="
echo -e "\033[1;33m Systemzeit: \033[0m" `date | awk '{print $4}'`
echo -e "\033[1;33m Online seit: \033[0m" `uptime | awk '{print $3}'` "Stunden"
echo -e "\033[1;33m Speichernutzung: \033[0m" `cat /proc/meminfo|grep 'MemF'| awk '{print $2}'` "kB von" `cat /proc/meminfo|grep 'MemT'| awk '{print $2}'` "kB frei"
if [ -f /sys/class/thermal/thermal_zone0/temp ]; then
echo -e "\033[1;33m CPU-Temp: \033[0m" `cat /sys/class/thermal/thermal_zone0/temp| awk '{print $1/1000}'` "°C"
fi
echo -e "\033[1;33m Haupt-IP: \033[0m" `hostname -i`
echo -e "\033[1;33m IPs: \033[0m" `ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1`
echo -e "\033[1;33m Macs: \033[0m" `ip link | grep ether`
echo -e "\033[1;33m Hostname: \033[0m" `hostname`
echo -e "\033[1;33m Benutzer: \033[0m" `whoami`
echo -e "\033[1;33m Grafikkarte: \033[0m" `lspci | grep -e VGA -e 3D -m 1`
echo -e "\033[1;33m Öffentliche IP: \033[0m" `wget -qO- ipv4.icanhazip.com || echo "Gescheitert"`
echo -e "=============================================================================================="
echo -e "User Anschluß Seit von"
/usr/bin/who
echo -e "=============================================================================================="
alias reboot="sudo systemctl reboot"
alias poweroff="sudo systemctl poweroff"
alias halt="sudo systemctl halt"
alias hibernate="sudo systemctl hibernate"
alias hybrid="sudo systemctl hybrid-sleep"
alias suspend="sudo systemctl suspend"