Be more positive ;)
This commit is contained in:
parent
4989b1f8bb
commit
3a9b0faa06
@ -150,34 +150,38 @@ def to_layout_names(raw):
|
|||||||
raise ValueError('The window layout {} is unknown'.format(p))
|
raise ValueError('The window layout {} is unknown'.format(p))
|
||||||
|
|
||||||
|
|
||||||
|
def positive_int(x):
|
||||||
|
return max(0, int(x))
|
||||||
|
|
||||||
|
|
||||||
def positive_float(x):
|
def positive_float(x):
|
||||||
return max(0, float(x))
|
return max(0, float(x))
|
||||||
|
|
||||||
|
|
||||||
type_map = {
|
type_map = {
|
||||||
'scrollback_lines': int,
|
'scrollback_lines': positive_int,
|
||||||
'scrollback_pager': shlex.split,
|
'scrollback_pager': shlex.split,
|
||||||
'scrollback_in_new_tab': to_bool,
|
'scrollback_in_new_tab': to_bool,
|
||||||
'font_size': to_font_size,
|
'font_size': to_font_size,
|
||||||
'font_size_delta': float,
|
'font_size_delta': positive_float,
|
||||||
'cursor_shape': to_cursor_shape,
|
'cursor_shape': to_cursor_shape,
|
||||||
'cursor_opacity': to_opacity,
|
'cursor_opacity': to_opacity,
|
||||||
'open_url_modifiers': to_open_url_modifiers,
|
'open_url_modifiers': to_open_url_modifiers,
|
||||||
'repaint_delay': int,
|
'repaint_delay': positive_int,
|
||||||
'window_border_width': positive_float,
|
'window_border_width': positive_float,
|
||||||
'window_margin_width': positive_float,
|
'window_margin_width': positive_float,
|
||||||
'window_padding_width': positive_float,
|
'window_padding_width': positive_float,
|
||||||
'wheel_scroll_multiplier': float,
|
'wheel_scroll_multiplier': float,
|
||||||
'visual_bell_duration': float,
|
'visual_bell_duration': positive_float,
|
||||||
'enable_audio_bell': to_bool,
|
'enable_audio_bell': to_bool,
|
||||||
'click_interval': float,
|
'click_interval': positive_float,
|
||||||
'mouse_hide_wait': float,
|
'mouse_hide_wait': positive_float,
|
||||||
'cursor_blink_interval': float,
|
'cursor_blink_interval': positive_float,
|
||||||
'cursor_stop_blinking_after': float,
|
'cursor_stop_blinking_after': positive_float,
|
||||||
'enabled_layouts': to_layout_names,
|
'enabled_layouts': to_layout_names,
|
||||||
'remember_window_size': to_bool,
|
'remember_window_size': to_bool,
|
||||||
'initial_window_width': int,
|
'initial_window_width': positive_int,
|
||||||
'initial_window_height': int,
|
'initial_window_height': positive_int,
|
||||||
'use_system_wcwidth': to_bool,
|
'use_system_wcwidth': to_bool,
|
||||||
'macos_hide_titlebar': to_bool,
|
'macos_hide_titlebar': to_bool,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,7 +45,7 @@ cursor_shape block
|
|||||||
cursor_blink_interval 0.5
|
cursor_blink_interval 0.5
|
||||||
|
|
||||||
# Stop blinking cursor after the specified number of seconds of keyboard inactivity. Set to
|
# Stop blinking cursor after the specified number of seconds of keyboard inactivity. Set to
|
||||||
# zero or a negative number to never stop blinking.
|
# zero to never stop blinking.
|
||||||
cursor_stop_blinking_after 15.0
|
cursor_stop_blinking_after 15.0
|
||||||
|
|
||||||
# Number of lines of history to keep in memory for scrolling back
|
# Number of lines of history to keep in memory for scrolling back
|
||||||
@ -71,7 +71,7 @@ click_interval 0.5
|
|||||||
select_by_word_characters :@-./_~?&=%+#
|
select_by_word_characters :@-./_~?&=%+#
|
||||||
|
|
||||||
# Hide mouse cursor after the specified number of seconds of the mouse not being used. Set to
|
# Hide mouse cursor after the specified number of seconds of the mouse not being used. Set to
|
||||||
# zero or a negative number to disable mouse cursor hiding.
|
# zero to disable mouse cursor hiding.
|
||||||
mouse_hide_wait 3.0
|
mouse_hide_wait 3.0
|
||||||
|
|
||||||
# The enabled window layouts. A comma separated list of layout names. The special value * means
|
# The enabled window layouts. A comma separated list of layout names. The special value * means
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user