]> git.saurik.com Git - apt.git/commitdiff
make fancy-progress fg/bg color configurable
authorMichael Vogt <mvo@debian.org>
Thu, 27 Mar 2014 05:48:57 +0000 (06:48 +0100)
committerMichael Vogt <mvo@debian.org>
Thu, 27 Mar 2014 05:48:57 +0000 (06:48 +0100)
Add two new options: Dpkg::Progress-Fancy::Progress-{fg,bg} that
allows customizing the colors in the dpkg fancy progress output.

apt-pkg/install-progress.cc

index dfe4fb18c98ab8a92f11bf3b8a8ca2533671bd5b..96334b00652f76e96415ab444a539dea531faaf7 100644 (file)
@@ -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";