summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2024-11-08 07:54:36 +0200
committerSyndamia <kamen@syndamia.com>2024-11-08 07:54:36 +0200
commit2bffa44c20313a9a9b0e39df852f023c2f6e2191 (patch)
tree4e20a4f25876f2ec3be08b824349d11963dcae48
parent254c0a41afbe8890c94016746718c535c7144ca0 (diff)
downloaddotfiles-2bffa44c20313a9a9b0e39df852f023c2f6e2191.tar
dotfiles-2bffa44c20313a9a9b0e39df852f023c2f6e2191.tar.gz
dotfiles-2bffa44c20313a9a9b0e39df852f023c2f6e2191.zip
feat(bash): Change cursor color when we have no write access in the current folder
-rw-r--r--.bashrc2
1 files changed, 2 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index 64a7efd..b6f2ad9 100644
--- a/.bashrc
+++ b/.bashrc
@@ -171,12 +171,14 @@
}
ps_precursor() {
+ [ ! -w . ] && colors_prt "$PS_WARN" "$PS_BG"
if [ -n "$___changes" ]
then
printf "$PS_PREC_GIT"
else
printf "$PS_PREC"
fi
+ colors_res
}
trap "SECONDS=0;___timer=''" SIGUSR2