diff --git a/.aliases b/.aliases index 48805a9..17b8e99 100644 --- a/.aliases +++ b/.aliases @@ -1,8 +1,9 @@ #!/bin/bash # # Author: Severin Kaderli -# Update apt packages, npm modules and composer -alias update="sudo apt-get update; sudo apt-get dist-upgrade -y; sudo npm update -g; composer self-update" - # Shortcut for clear because I often type the DOS command instead alias cls="clear" + +# Some aliases for ls +alias ls="ls -l --color=auto" +alias ll="ls -al" diff --git a/.bashrc b/.bashrc index 60be21b..c5a4af9 100644 --- a/.bashrc +++ b/.bashrc @@ -30,38 +30,11 @@ case "$TERM" in xterm|xterm-color|*-256color) color_prompt=yes;; esac -# uncomment for a colored prompt, if the terminal has the capability; turned -# off by default to not distract the user: the focus in a terminal window -# should be on the output of commands, not on the prompt -#force_color_prompt=yes - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - if [[ ${EUID} == 0 ]] ; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] ' - else - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] ' - fi -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h \w \$ ' -fi unset color_prompt force_color_prompt -# enable color support of ls and also add handy aliases +# Enable color support of ls if [ -x /usr/bin/dircolors ]; then test -r $HOME/.dircolors && eval "$(dircolors -b $HOME/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - alias grep='grep --color=auto' fi # Sourcing alias definitions @@ -87,3 +60,11 @@ fi if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:/opt/Hyper:$PATH" fi + +# Set bash prompt +RCol='\033[0m' +Gre='\033[32m'; +Red='\033[31m'; +Blu='\033[34m'; +Yel='\033[33m'; +PS1="${RCol}┌─[\`if [ \$? = 0 ]; then echo "${Gre}"; else echo "${Red}"; fi\`\t\[${Rcol}\] \[${Blu}\]\h\[${RCol}\] \[${Yel}\]\w\[${RCol}\]]\n└─╼ " diff --git a/.config/compton.conf b/.config/compton.conf index 774d21c..e69de29 100644 --- a/.config/compton.conf +++ b/.config/compton.conf @@ -1,3 +0,0 @@ -opacity-rule = [ - "80:class_g = 'Hyper'" -];