mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
add cursor_trail_color to nullable_colors and all_color_settings
This commit is contained in:
parent
7738c55c4b
commit
063cf243c1
5 changed files with 24 additions and 22 deletions
6
kitty/options/parse.py
generated
6
kitty/options/parse.py
generated
|
|
@ -938,12 +938,12 @@ class Parser:
|
|||
def cursor_trail(self, val: str, ans: dict[str, typing.Any]) -> None:
|
||||
ans['cursor_trail'] = positive_int(val)
|
||||
|
||||
def cursor_trail_decay(self, val: str, ans: dict[str, typing.Any]) -> None:
|
||||
ans['cursor_trail_decay'] = cursor_trail_decay(val)
|
||||
|
||||
def cursor_trail_color(self, val: str, ans: dict[str, typing.Any]) -> None:
|
||||
ans['cursor_trail_color'] = to_color_or_none(val)
|
||||
|
||||
def cursor_trail_decay(self, val: str, ans: dict[str, typing.Any]) -> None:
|
||||
ans['cursor_trail_decay'] = cursor_trail_decay(val)
|
||||
|
||||
def cursor_trail_start_threshold(self, val: str, ans: dict[str, typing.Any]) -> None:
|
||||
ans['cursor_trail_start_threshold'] = positive_int(val)
|
||||
|
||||
|
|
|
|||
30
kitty/options/to-c-generated.h
generated
30
kitty/options/to-c-generated.h
generated
|
|
@ -226,19 +226,6 @@ convert_from_opts_cursor_trail_decay(PyObject *py_opts, Options *opts) {
|
|||
Py_DECREF(ret);
|
||||
}
|
||||
|
||||
static void
|
||||
convert_from_python_cursor_trail_color(PyObject *val, Options *opts) {
|
||||
cursor_trail_color(val, opts);
|
||||
}
|
||||
|
||||
static void
|
||||
convert_from_opts_cursor_trail_color(PyObject *py_opts, Options *opts) {
|
||||
PyObject *ret = PyObject_GetAttrString(py_opts, "cursor_trail_color");
|
||||
if (ret == NULL) return;
|
||||
convert_from_python_cursor_trail_color(ret, opts);
|
||||
Py_DECREF(ret);
|
||||
}
|
||||
|
||||
static void
|
||||
convert_from_python_cursor_trail_start_threshold(PyObject *val, Options *opts) {
|
||||
opts->cursor_trail_start_threshold = PyLong_AsLong(val);
|
||||
|
|
@ -252,6 +239,19 @@ convert_from_opts_cursor_trail_start_threshold(PyObject *py_opts, Options *opts)
|
|||
Py_DECREF(ret);
|
||||
}
|
||||
|
||||
static void
|
||||
convert_from_python_cursor_trail_color(PyObject *val, Options *opts) {
|
||||
cursor_trail_color(val, opts);
|
||||
}
|
||||
|
||||
static void
|
||||
convert_from_opts_cursor_trail_color(PyObject *py_opts, Options *opts) {
|
||||
PyObject *ret = PyObject_GetAttrString(py_opts, "cursor_trail_color");
|
||||
if (ret == NULL) return;
|
||||
convert_from_python_cursor_trail_color(ret, opts);
|
||||
Py_DECREF(ret);
|
||||
}
|
||||
|
||||
static void
|
||||
convert_from_python_scrollback_indicator_opacity(PyObject *val, Options *opts) {
|
||||
opts->scrollback_indicator_opacity = PyFloat_AsFloat(val);
|
||||
|
|
@ -1224,10 +1224,10 @@ convert_opts_from_python_opts(PyObject *py_opts, Options *opts) {
|
|||
if (PyErr_Occurred()) return false;
|
||||
convert_from_opts_cursor_trail_decay(py_opts, opts);
|
||||
if (PyErr_Occurred()) return false;
|
||||
convert_from_opts_cursor_trail_color(py_opts, opts);
|
||||
if (PyErr_Occurred()) return false;
|
||||
convert_from_opts_cursor_trail_start_threshold(py_opts, opts);
|
||||
if (PyErr_Occurred()) return false;
|
||||
convert_from_opts_cursor_trail_color(py_opts, opts);
|
||||
if (PyErr_Occurred()) return false;
|
||||
convert_from_opts_scrollback_indicator_opacity(py_opts, opts);
|
||||
if (PyErr_Occurred()) return false;
|
||||
convert_from_opts_scrollback_pager_history_size(py_opts, opts);
|
||||
|
|
|
|||
8
kitty/options/types.py
generated
8
kitty/options/types.py
generated
|
|
@ -336,8 +336,8 @@ option_names = (
|
|||
'cursor_stop_blinking_after',
|
||||
'cursor_text_color',
|
||||
'cursor_trail',
|
||||
'cursor_trail_decay',
|
||||
'cursor_trail_color',
|
||||
'cursor_trail_decay',
|
||||
'cursor_trail_start_threshold',
|
||||
'cursor_underline_thickness',
|
||||
'default_pointer_shape',
|
||||
|
|
@ -520,8 +520,8 @@ class Options:
|
|||
cursor_stop_blinking_after: float = 15.0
|
||||
cursor_text_color: kitty.fast_data_types.Color | None = Color(17, 17, 17)
|
||||
cursor_trail: int = 0
|
||||
cursor_trail_decay: tuple[float, float] = (0.1, 0.4)
|
||||
cursor_trail_color: kitty.fast_data_types.Color | None = None
|
||||
cursor_trail_decay: tuple[float, float] = (0.1, 0.4)
|
||||
cursor_trail_start_threshold: int = 2
|
||||
cursor_underline_thickness: float = 2.0
|
||||
default_pointer_shape: choices_for_default_pointer_shape = 'beam'
|
||||
|
|
@ -1053,6 +1053,7 @@ defaults.mouse_map = [
|
|||
nullable_colors = frozenset({
|
||||
'cursor',
|
||||
'cursor_text_color',
|
||||
'cursor_trail_color',
|
||||
'visual_bell_color',
|
||||
'active_border_color',
|
||||
'tab_bar_background',
|
||||
|
|
@ -1062,5 +1063,4 @@ nullable_colors = frozenset({
|
|||
})
|
||||
|
||||
|
||||
secret_options = ('remote_control_password', 'file_transfer_confirmation_bypass')
|
||||
|
||||
secret_options = ('remote_control_password', 'file_transfer_confirmation_bypass')
|
||||
|
|
@ -18,6 +18,7 @@ var nullable_colors = map[string]bool{
|
|||
"active_border_color": true,
|
||||
"cursor": true,
|
||||
"cursor_text_color": true,
|
||||
"cursor_trail_color": true,
|
||||
"selection_background": true,
|
||||
"selection_foreground": true,
|
||||
"tab_bar_background": true,
|
||||
|
|
|
|||
|
|
@ -298,6 +298,7 @@ var AllColorSettingNames = map[string]bool{ // {{{
|
|||
"color99": true,
|
||||
"cursor": true,
|
||||
"cursor_text_color": true,
|
||||
"cursor_trail_color": true,
|
||||
"foreground": true,
|
||||
"inactive_border_color": true,
|
||||
"inactive_tab_background": true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue