diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2010-03-01 14:50:35 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2010-03-01 14:50:35 +1300 |
commit | 0188cf8a1a9abc3b03fb1cee91ed2aa1f20b1ebd (patch) | |
tree | fd9a8231e9d6a239640f3b59c83dca3bf24db316 /libmproxy | |
parent | b91156723b443f6a7bf6bb7b49e799bd04e8ad15 (diff) | |
download | mitmproxy-0188cf8a1a9abc3b03fb1cee91ed2aa1f20b1ebd.tar.gz mitmproxy-0188cf8a1a9abc3b03fb1cee91ed2aa1f20b1ebd.tar.bz2 mitmproxy-0188cf8a1a9abc3b03fb1cee91ed2aa1f20b1ebd.zip |
Just make using the user's terminal background the default.
This just makes sense. Later on, we'll have a config file in which users can
set the palette, so that they can over-ride the default background if they
really want.
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/console.py | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/libmproxy/console.py b/libmproxy/console.py index 73e629b3..9ba9474b 100644 --- a/libmproxy/console.py +++ b/libmproxy/console.py @@ -758,43 +758,37 @@ class ConsoleMaster(controller.Master): ('key', "q"), ":back ", ] def __init__(self, server, options): - self.set_palette(options.terminal_background) + self.set_palette() controller.Master.__init__(self, server) - self.config = options.verbose self.state = State() self.stickycookie = None self.stickyhosts = {} - def set_palette(self, terminal_background): - if terminal_background: - background_color = 'default' - else: - background_color = 'black' - + def set_palette(self): self.palette = [ ('body', 'black', 'dark cyan', 'standout'), - ('foot', 'light gray', background_color), - ('title', 'white', background_color,), - ('editline', 'white', background_color,), + ('foot', 'light gray', 'default'), + ('title', 'white', 'default',), + ('editline', 'white', 'default',), # Help - ('key', 'light cyan', background_color, 'underline'), - ('head', 'white', background_color), - ('text', 'light gray', background_color), + ('key', 'light cyan', 'default', 'underline'), + ('head', 'white', 'default'), + ('text', 'light gray', 'default'), # List and Connections - ('method', 'dark cyan', background_color), - ('focus', 'yellow', background_color), - ('goodcode', 'light green', background_color), - ('error', 'light red', background_color), - ('header', 'dark cyan', background_color), + ('method', 'dark cyan', 'default'), + ('focus', 'yellow', 'default'), + ('goodcode', 'light green', 'default'), + ('error', 'light red', 'default'), + ('header', 'dark cyan', 'default'), ('heading', 'white', 'dark blue'), - ('inactive', 'dark gray', background_color), - ('ack', 'light red', background_color), + ('inactive', 'dark gray', 'default'), + ('ack', 'light red', 'default'), # Hex view - ('offset', 'dark cyan', background_color), + ('offset', 'dark cyan', 'default'), ] def run(self): |