Make allow_remote_control a little more fine grained
Also, only respect listen_on if there is a possiblility of rc commands over it being accepted
This commit is contained in:
Generated
+18
-13
@@ -6,18 +6,18 @@ from kitty.conf.utils import (
|
||||
unit_float
|
||||
)
|
||||
from kitty.options.utils import (
|
||||
action_alias, active_tab_title_template, allow_hyperlinks, allow_remote_control, bell_on_tab,
|
||||
box_drawing_scale, clear_all_mouse_actions, clear_all_shortcuts, clipboard_control,
|
||||
clone_source_strategies, config_or_absolute_path, copy_on_select, cursor_text_color,
|
||||
deprecated_adjust_line_height, deprecated_hide_window_decorations_aliases,
|
||||
deprecated_macos_show_window_title_in_menubar_alias, deprecated_send_text, disable_ligatures,
|
||||
edge_width, env, font_features, hide_window_decorations, macos_option_as_alt, macos_titlebar_color,
|
||||
modify_font, narrow_symbols, optional_edge_width, parse_map, parse_mouse_map, paste_actions,
|
||||
remote_control_password, resize_draw_strategy, scrollback_lines, scrollback_pager_history_size,
|
||||
shell_integration, store_multiple, symbol_map, tab_activity_symbol, tab_bar_edge,
|
||||
tab_bar_margin_height, tab_bar_min_tabs, tab_fade, tab_font_style, tab_separator,
|
||||
tab_title_template, titlebar_color, to_cursor_shape, to_font_size, to_layout_names, to_modifiers,
|
||||
url_prefixes, url_style, visual_window_select_characters, window_border_width, window_size
|
||||
action_alias, active_tab_title_template, allow_hyperlinks, bell_on_tab, box_drawing_scale,
|
||||
clear_all_mouse_actions, clear_all_shortcuts, clipboard_control, clone_source_strategies,
|
||||
config_or_absolute_path, copy_on_select, cursor_text_color, deprecated_adjust_line_height,
|
||||
deprecated_hide_window_decorations_aliases, deprecated_macos_show_window_title_in_menubar_alias,
|
||||
deprecated_send_text, disable_ligatures, edge_width, env, font_features, hide_window_decorations,
|
||||
macos_option_as_alt, macos_titlebar_color, modify_font, narrow_symbols, optional_edge_width,
|
||||
parse_map, parse_mouse_map, paste_actions, remote_control_password, resize_draw_strategy,
|
||||
scrollback_lines, scrollback_pager_history_size, shell_integration, store_multiple, symbol_map,
|
||||
tab_activity_symbol, tab_bar_edge, tab_bar_margin_height, tab_bar_min_tabs, tab_fade,
|
||||
tab_font_style, tab_separator, tab_title_template, titlebar_color, to_cursor_shape, to_font_size,
|
||||
to_layout_names, to_modifiers, url_prefixes, url_style, visual_window_select_characters,
|
||||
window_border_width, window_size
|
||||
)
|
||||
|
||||
|
||||
@@ -54,7 +54,12 @@ class Parser:
|
||||
ans['allow_hyperlinks'] = allow_hyperlinks(val)
|
||||
|
||||
def allow_remote_control(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||
ans['allow_remote_control'] = allow_remote_control(val)
|
||||
val = val.lower()
|
||||
if val not in self.choices_for_allow_remote_control:
|
||||
raise ValueError(f"The value {val} is not a valid choice for allow_remote_control")
|
||||
ans["allow_remote_control"] = val
|
||||
|
||||
choices_for_allow_remote_control = frozenset(('password', 'socket-only', 'socket', 'no', 'n', 'false', 'yes', 'y', 'true'))
|
||||
|
||||
def background(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||
ans['background'] = to_color(val)
|
||||
|
||||
Reference in New Issue
Block a user