mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
byobu-status: allow for no color decorations, helps with older versions
of screen, LP: #432165
This commit is contained in:
parent
cd02a609c1
commit
585d1559cd
2 changed files with 7 additions and 3 deletions
|
@ -33,8 +33,10 @@ find_script () {
|
||||||
# Define colors
|
# Define colors
|
||||||
ESC="\005"
|
ESC="\005"
|
||||||
color() {
|
color() {
|
||||||
|
if [ -z "$1" ] || [ "$COLOR" = "none" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
case $1 in
|
case $1 in
|
||||||
"") true ;;
|
|
||||||
-) printf "$ESC{-}" ;;
|
-) printf "$ESC{-}" ;;
|
||||||
esc) printf "$ESC" ;;
|
esc) printf "$ESC" ;;
|
||||||
bold1) printf "$ESC{=b }" ;;
|
bold1) printf "$ESC{=b }" ;;
|
||||||
|
@ -43,9 +45,9 @@ color() {
|
||||||
invert) printf "$ESC{=r }" ;;
|
invert) printf "$ESC{=r }" ;;
|
||||||
*)
|
*)
|
||||||
if [ "$#" = "2" ]; then
|
if [ "$#" = "2" ]; then
|
||||||
[ "$MONOCHROME" = "1" ] && printf "$ESC{= }" || printf "$ESC{= $1$2}"
|
[ "$COLOR" = "monochrome" ] && printf "$ESC{= }" || printf "$ESC{= $1$2}"
|
||||||
else
|
else
|
||||||
[ "$MONOCHROME" = "1" ] && printf "$ESC{=$1 }" || printf "$ESC{=$1 $2$3}"
|
[ "$COLOR" = "monochrome" ] && printf "$ESC{=$1 }" || printf "$ESC{=$1 $2$3}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -73,6 +73,8 @@ byobu (2.40) unreleased; urgency=low
|
||||||
- define and use a color function for all status indicators, gives
|
- define and use a color function for all status indicators, gives
|
||||||
infinite flexibility
|
infinite flexibility
|
||||||
- replace "undo" with "-"
|
- replace "undo" with "-"
|
||||||
|
* byobu-status: allow for no color decorations, helps with older versions
|
||||||
|
of screen, LP: #432165
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 10 Nov 2009 10:18:20 -0600
|
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 10 Nov 2009 10:18:20 -0600
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue