mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -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
|
||||
ESC="\005"
|
||||
color() {
|
||||
if [ -z "$1" ] || [ "$COLOR" = "none" ]; then
|
||||
return 0
|
||||
fi
|
||||
case $1 in
|
||||
"") true ;;
|
||||
-) printf "$ESC{-}" ;;
|
||||
esc) printf "$ESC" ;;
|
||||
bold1) printf "$ESC{=b }" ;;
|
||||
|
@ -43,9 +45,9 @@ color() {
|
|||
invert) printf "$ESC{=r }" ;;
|
||||
*)
|
||||
if [ "$#" = "2" ]; then
|
||||
[ "$MONOCHROME" = "1" ] && printf "$ESC{= }" || printf "$ESC{= $1$2}"
|
||||
[ "$COLOR" = "monochrome" ] && printf "$ESC{= }" || printf "$ESC{= $1$2}"
|
||||
else
|
||||
[ "$MONOCHROME" = "1" ] && printf "$ESC{=$1 }" || printf "$ESC{=$1 $2$3}"
|
||||
[ "$COLOR" = "monochrome" ] && printf "$ESC{=$1 }" || printf "$ESC{=$1 $2$3}"
|
||||
fi
|
||||
;;
|
||||
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
|
||||
infinite flexibility
|
||||
- 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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue