mirror of https://github.com/dylanaraps/shfm.git
red status line for root, blue for everyone else
This commit is contained in:
parent
c20abb5dad
commit
e52a161f02
11
shfm
11
shfm
|
@ -145,7 +145,7 @@ list_print() {
|
||||||
|
|
||||||
for file do
|
for file do
|
||||||
case $i in
|
case $i in
|
||||||
"$y2") esc SGR 34 7
|
"$y2") esc SGR 0 7
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $((i - end)) in
|
case $((i - end)) in
|
||||||
|
@ -169,7 +169,12 @@ redraw() {
|
||||||
status_line() {
|
status_line() {
|
||||||
esc DECSC
|
esc DECSC
|
||||||
esc CUP "$LINES"
|
esc CUP "$LINES"
|
||||||
esc SGR 31 7
|
|
||||||
|
case $USER in
|
||||||
|
root) esc SGR 31 7 ;;
|
||||||
|
*) esc SGR 34 7 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
printf '%-*s' "$COLUMNS" "$1"
|
printf '%-*s' "$COLUMNS" "$1"
|
||||||
esc SGR
|
esc SGR
|
||||||
esc DECRC
|
esc DECRC
|
||||||
|
@ -199,7 +204,7 @@ line_print() {
|
||||||
offset=$1
|
offset=$1
|
||||||
|
|
||||||
case $offset in
|
case $offset in
|
||||||
"$y") esc SGR 34 7
|
"$y") esc SGR 0 7
|
||||||
esac
|
esac
|
||||||
|
|
||||||
shift "$offset"
|
shift "$offset"
|
||||||
|
|
Loading…
Reference in New Issue