configure colorflags for passthrough mode

This commit is contained in:
sMailund 2017-10-14 10:29:34 +02:00
parent 4d2ca878ea
commit 57c4285dbc

View File

@ -43,6 +43,7 @@ class ColorFlags:
command: If we're currently in command mode. command: If we're currently in command mode.
mode: The current caret mode (CaretMode.off/.on/.selection). mode: The current caret mode (CaretMode.off/.on/.selection).
private: Whether this window is in private browsing mode. private: Whether this window is in private browsing mode.
passthrough: If we're currently in passthrough-mode
""" """
CaretMode = usertypes.enum('CaretMode', ['off', 'on', 'selection']) CaretMode = usertypes.enum('CaretMode', ['off', 'on', 'selection'])
@ -51,6 +52,7 @@ class ColorFlags:
command = attr.ib(False) command = attr.ib(False)
caret = attr.ib(CaretMode.off) caret = attr.ib(CaretMode.off)
private = attr.ib(False) private = attr.ib(False)
passthrough = attr.ib(False)
def to_stringlist(self): def to_stringlist(self):
"""Get a string list of set flags used in the stylesheet. """Get a string list of set flags used in the stylesheet.
@ -66,6 +68,8 @@ class ColorFlags:
strings.append('command') strings.append('command')
if self.private: if self.private:
strings.append('private') strings.append('private')
if self.passthrough:
strings.append('passthrough')
if self.private and self.command: if self.private and self.command:
strings.append('private-command') strings.append('private-command')
@ -88,6 +92,7 @@ def _generate_stylesheet():
('prompt', 'prompts'), ('prompt', 'prompts'),
('insert', 'statusbar.insert'), ('insert', 'statusbar.insert'),
('command', 'statusbar.command'), ('command', 'statusbar.command'),
('passthrough', 'statusbar.passthrough'),
('private-command', 'statusbar.command.private'), ('private-command', 'statusbar.command.private'),
] ]
stylesheet = """ stylesheet = """