usr/bin/byobu: check if our terminfo supports 256 colors, LP: #409353

This commit is contained in:
Dustin Kirkland 2010-01-12 10:26:33 -06:00
commit ed589b4eb9
2 changed files with 9 additions and 2 deletions

4
debian/changelog vendored
View file

@ -1,5 +1,6 @@
byobu (2.47) unreleased; urgency=low byobu (2.47) unreleased; urgency=low
[ Dustin Kirkland ]
* usr/lib/byobu/network: fix network script regresssion, LP: #506315 * usr/lib/byobu/network: fix network script regresssion, LP: #506315
* usr/lib/byobu/wifi_quality: silence error * usr/lib/byobu/wifi_quality: silence error
* byobu.desktop, byobu.svg: install these again, but hide the menu item * byobu.desktop, byobu.svg: install these again, but hide the menu item
@ -19,6 +20,9 @@ byobu (2.47) unreleased; urgency=low
install the notification timing tests, add a copyright header install the notification timing tests, add a copyright header
- AUTHORS, ChangeLog, NEWS: added - AUTHORS, ChangeLog, NEWS: added
[ Jason Cohen ]
* usr/bin/byobu: check if our terminfo supports 256 colors, LP: #409353
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 11 Jan 2010 22:54:36 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Mon, 11 Jan 2010 22:54:36 -0600
byobu (2.46-0ubuntu1) lucid; urgency=low byobu (2.46-0ubuntu1) lucid; urgency=low

View file

@ -36,9 +36,12 @@ printf "\033]0;${USER}@$(hostname) - ${PKG}\007"
# Launch motd+shell, unless the user has default windows set to launch # Launch motd+shell, unless the user has default windows set to launch
grep -qs "^[^#]" "$HOME/.$PKG/windows" && DEFAULT_WINDOW= || DEFAULT_WINDOW="motd+shell" grep -qs "^[^#]" "$HOME/.$PKG/windows" && DEFAULT_WINDOW= || DEFAULT_WINDOW="motd+shell"
# Check if our terminfo supports 256 colors
[ -x /usr/bin/tput ] && [ $(/usr/bin/tput colors) -eq 256 ] && SCREEN_TERM="-T screen-256color"
# Now let's execute screen! # Now let's execute screen!
if [ "$#" = "0" ]; then if [ "$#" = "0" ]; then
exec screen -c "/usr/share/$PKG/profiles/byoburc" -t shell $DEFAULT_WINDOW exec screen $SCREEN_TERM -c "/usr/share/$PKG/profiles/byoburc" -t shell $DEFAULT_WINDOW
else else
exec screen -c "$HOME/.$PKG/profile" "$@" exec screen $SCREEN_TERM -c "$HOME/.$PKG/profile" "$@"
fi fi