From 0188cf8a1a9abc3b03fb1cee91ed2aa1f20b1ebd Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 1 Mar 2010 14:50:35 +1300 Subject: 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. --- libmproxy/console.py | 38 ++++++++++++++++---------------------- mitmproxy | 3 --- 2 files changed, 16 insertions(+), 25 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): diff --git a/mitmproxy b/mitmproxy index 5ae9f058..af841144 100755 --- a/mitmproxy +++ b/mitmproxy @@ -35,9 +35,6 @@ if __name__ == '__main__': type = "int", dest="port", default=8080, help = "Port." ) - parser.add_option( - "-t", "--terminal-backround", action="store_true", dest="terminal_background", - default=False, help="Uses the standard terminal background instead of setting an own. Useful for transparent terminals.") options, args = parser.parse_args() certpath = os.path.expanduser(options.cert) -- cgit v1.2.3