From d6a009d38625c9a78705a7f8dc764532ee9fbde7 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Wed, 18 Aug 2021 21:48:07 -0500 Subject: fedora tweaks --- rog/fedora/home/myconfig.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 rog/fedora/home/myconfig.sh (limited to 'rog/fedora/home') diff --git a/rog/fedora/home/myconfig.sh b/rog/fedora/home/myconfig.sh new file mode 100755 index 0000000..66f712b --- /dev/null +++ b/rog/fedora/home/myconfig.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# use it like this in .bashrc +# +# if [[ -f ~/.myconfig.sh ]]; then +# source ~/.myconfig.sh +# fi + +# git completion and custom PS1 +#source /usr/share/git/completion/git-prompt.sh +source /usr/share/git-core/contrib/completion/git-prompt.sh +GIT_PS1_SHOWDIRTYSTATE=1 + +if [[ $(id -u) -eq 0 ]]; then + PS1='\[\e[1;37m\][\[\e[m\]\[\e[1;31m\]\u\[\e[m\]@\[\e[1;37m\]\h\[\e[m\] \[\e[1;36m\]\w\[\e[m\]\[\e[1;37m\]]\[\e[m\]\[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]' +else + PS1='\[\e[1;37m\][\[\e[m\]\[\e[1;32m\]\u\[\e[m\]@\[\e[1;37m\]\h\[\e[m\] \[\e[1;36m\]\w\[\e[m\]\[\e[1;33m\]$(__git_ps1 " (%s)")\[\e[m\]\[\e[1;37m\]]\[\e[m\]\[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]' +fi + +# aliases +alias bb='history -c && history -w && reset' + -- cgit v1.2.3