Last active
June 19, 2018 08:38
-
-
Save nullpo-head/174a92ff56679bbdfcdbd1ae04c3ca3f to your computer and use it in GitHub Desktop.
OS icon PS script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set a simple prompt with an OS icon! | |
if [ `uname` = Darwin ]; then | |
SYSTEM_ICON="" | |
PS_COL=${PS_COL:="38;5;6"} | |
elif [ -n "`cat /proc/version | grep Microsoft`" ]; then | |
SYSTEM_ICON="" | |
PS_COL=${PS_COL:="38;5;70"} | |
elif [ `uname` = Linux ]; then | |
SYSTEM_ICON="" | |
PS_COL=${PS_COL:="38;5;39"} | |
fi | |
export PS1="\[\033[${PS_COL}m\]\W\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[${PS_COL}m\]${SYSTEM_ICON}\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment