summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-03-27 06:48:57 +0100
committerMichael Vogt <mvo@debian.org>2014-03-27 06:48:57 +0100
commitc34d1202e991a6f0ab5bed82c2e1ca0d155038b1 (patch)
treeb0bbc7ac0f4276efe12bd566c7074d2d0e1f7f2c
parent574d8d43f755019c7223fe128b22b27fd836017d (diff)
make fancy-progress fg/bg color configurable
Add two new options: Dpkg::Progress-Fancy::Progress-{fg,bg} that allows customizing the colors in the dpkg fancy progress output.
-rw-r--r--apt-pkg/install-progress.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc
index dfe4fb18c..96334b006 100644
--- a/apt-pkg/install-progress.cc
+++ b/apt-pkg/install-progress.cc
@@ -338,8 +338,12 @@ bool PackageManagerFancy::StatusChanged(std::string PackageName,
static std::string save_cursor = "\033[s";
static std::string restore_cursor = "\033[u";
- static std::string set_bg_color = "\033[42m"; // green
- static std::string set_fg_color = "\033[30m"; // black
+ // green
+ static std::string set_bg_color = DeQuoteString(
+ _config->Find("Dpkg::Progress-Fancy::Progress-fg", "%1b[42m"));
+ // black
+ static std::string set_fg_color = DeQuoteString(
+ _config->Find("Dpkg::Progress-Fancy::Progress-bg", "%1b[30m"));
static std::string restore_bg = "\033[49m";
static std::string restore_fg = "\033[39m";