Cleanup previous PR
This commit is contained in:
parent
14dcf38e51
commit
fda2646dd3
@ -68,6 +68,8 @@ Detailed list of changes
|
|||||||
|
|
||||||
- macOS: Fix the maximized window not taking up full space when the title bar is hidden or when :opt:`resize_in_steps` is configured (:iss:`6021`)
|
- macOS: Fix the maximized window not taking up full space when the title bar is hidden or when :opt:`resize_in_steps` is configured (:iss:`6021`)
|
||||||
|
|
||||||
|
- Linux: A new option :opt:`linux_bell_theme` to control which sound theme is used for the bell sound (:pull:`4858`)
|
||||||
|
|
||||||
- ssh kitten: Change the syntax of glob patterns slightly to match common usage
|
- ssh kitten: Change the syntax of glob patterns slightly to match common usage
|
||||||
elsewhere. Now the syntax is the same a "extendedglob" in most shells.
|
elsewhere. Now the syntax is the same a "extendedglob" in most shells.
|
||||||
|
|
||||||
|
|||||||
@ -162,6 +162,7 @@ free_canberra_event_fields(CanberraEvent *e) {
|
|||||||
free(e->which_sound); e->which_sound = NULL;
|
free(e->which_sound); e->which_sound = NULL;
|
||||||
free(e->event_id); e->event_id = NULL;
|
free(e->event_id); e->event_id = NULL;
|
||||||
free(e->media_role); e->media_role = NULL;
|
free(e->media_role); e->media_role = NULL;
|
||||||
|
free(e->theme_name); e->theme_name = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -245,7 +246,7 @@ play_desktop_sound(PyObject *self UNUSED, PyObject *args) {
|
|||||||
const char *which, *event_id = "test sound";
|
const char *which, *event_id = "test sound";
|
||||||
const char *theme_name = "freedesktop";
|
const char *theme_name = "freedesktop";
|
||||||
int is_path = 0;
|
int is_path = 0;
|
||||||
if (!PyArg_ParseTuple(args, "s|sp", &which, &event_id, &is_path, &theme_name)) return NULL;
|
if (!PyArg_ParseTuple(args, "s|sps", &which, &event_id, &is_path, &theme_name)) return NULL;
|
||||||
play_canberra_sound(which, event_id, is_path, "event", theme_name);
|
play_canberra_sound(which, event_id, is_path, "event", theme_name);
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1387,8 +1387,8 @@ ring_audio_bell(void) {
|
|||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
cocoa_system_beep(OPT(bell_path));
|
cocoa_system_beep(OPT(bell_path));
|
||||||
#else
|
#else
|
||||||
if (OPT(bell_path)) play_canberra_sound(OPT(bell_path), "kitty bell", true, "event", OPT(linux_bell_theme_name));
|
if (OPT(bell_path)) play_canberra_sound(OPT(bell_path), "kitty bell", true, "event", OPT(bell_theme));
|
||||||
else play_canberra_sound("bell", "kitty bell", false, "event", OPT(linux_bell_theme_name));
|
else play_canberra_sound("bell", "kitty bell", false, "event", OPT(bell_theme));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -858,8 +858,8 @@ MP3 or WAV on macOS (NSSound)
|
|||||||
'''
|
'''
|
||||||
)
|
)
|
||||||
|
|
||||||
opt('linux_bell_theme_name', '__custom',
|
opt('linux_bell_theme', '__custom', ctype='!bell_theme',
|
||||||
long_text='If audio bell is enabled on Linux, sets the XDG Sound Theme kitty will use to play the bell sound.'
|
long_text='The XDG Sound Theme kitty will use to play the bell sound.'
|
||||||
' Defaults to the custom theme name used by GNOME and Budgie, falling back to the default freedesktop theme if it does not exist.'
|
' Defaults to the custom theme name used by GNOME and Budgie, falling back to the default freedesktop theme if it does not exist.'
|
||||||
' This option may be removed if Linux ever provides desktop-agnostic support for setting system sound themes.'
|
' This option may be removed if Linux ever provides desktop-agnostic support for setting system sound themes.'
|
||||||
)
|
)
|
||||||
|
|||||||
4
kitty/options/parse.py
generated
4
kitty/options/parse.py
generated
@ -1024,8 +1024,8 @@ class Parser:
|
|||||||
def kitty_mod(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
def kitty_mod(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||||
ans['kitty_mod'] = to_modifiers(val)
|
ans['kitty_mod'] = to_modifiers(val)
|
||||||
|
|
||||||
def linux_bell_theme_name(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
def linux_bell_theme(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||||
ans['linux_bell_theme_name'] = str(val)
|
ans['linux_bell_theme'] = str(val)
|
||||||
|
|
||||||
def linux_display_server(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
def linux_display_server(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||||
val = val.lower()
|
val = val.lower()
|
||||||
|
|||||||
15
kitty/options/to-c-generated.h
generated
15
kitty/options/to-c-generated.h
generated
@ -473,6 +473,19 @@ convert_from_opts_bell_path(PyObject *py_opts, Options *opts) {
|
|||||||
Py_DECREF(ret);
|
Py_DECREF(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
convert_from_python_linux_bell_theme(PyObject *val, Options *opts) {
|
||||||
|
bell_theme(val, opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
convert_from_opts_linux_bell_theme(PyObject *py_opts, Options *opts) {
|
||||||
|
PyObject *ret = PyObject_GetAttrString(py_opts, "linux_bell_theme");
|
||||||
|
if (ret == NULL) return;
|
||||||
|
convert_from_python_linux_bell_theme(ret, opts);
|
||||||
|
Py_DECREF(ret);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
convert_from_python_active_border_color(PyObject *val, Options *opts) {
|
convert_from_python_active_border_color(PyObject *val, Options *opts) {
|
||||||
opts->active_border_color = active_border_color(val);
|
opts->active_border_color = active_border_color(val);
|
||||||
@ -1119,6 +1132,8 @@ convert_opts_from_python_opts(PyObject *py_opts, Options *opts) {
|
|||||||
if (PyErr_Occurred()) return false;
|
if (PyErr_Occurred()) return false;
|
||||||
convert_from_opts_bell_path(py_opts, opts);
|
convert_from_opts_bell_path(py_opts, opts);
|
||||||
if (PyErr_Occurred()) return false;
|
if (PyErr_Occurred()) return false;
|
||||||
|
convert_from_opts_linux_bell_theme(py_opts, opts);
|
||||||
|
if (PyErr_Occurred()) return false;
|
||||||
convert_from_opts_active_border_color(py_opts, opts);
|
convert_from_opts_active_border_color(py_opts, opts);
|
||||||
if (PyErr_Occurred()) return false;
|
if (PyErr_Occurred()) return false;
|
||||||
convert_from_opts_inactive_border_color(py_opts, opts);
|
convert_from_opts_inactive_border_color(py_opts, opts);
|
||||||
|
|||||||
@ -104,6 +104,10 @@ background_image(PyObject *src, Options *opts) { STR_SETTER(background_image); }
|
|||||||
static void
|
static void
|
||||||
bell_path(PyObject *src, Options *opts) { STR_SETTER(bell_path); }
|
bell_path(PyObject *src, Options *opts) { STR_SETTER(bell_path); }
|
||||||
|
|
||||||
|
static void
|
||||||
|
bell_theme(PyObject *src, Options *opts) { STR_SETTER(bell_theme); }
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
window_logo_path(PyObject *src, Options *opts) { STR_SETTER(default_window_logo); }
|
window_logo_path(PyObject *src, Options *opts) { STR_SETTER(default_window_logo); }
|
||||||
|
|
||||||
|
|||||||
4
kitty/options/types.py
generated
4
kitty/options/types.py
generated
@ -376,7 +376,7 @@ option_names = ( # {{{
|
|||||||
'italic_font',
|
'italic_font',
|
||||||
'kitten_alias',
|
'kitten_alias',
|
||||||
'kitty_mod',
|
'kitty_mod',
|
||||||
'linux_bell_theme_name',
|
'linux_bell_theme',
|
||||||
'linux_display_server',
|
'linux_display_server',
|
||||||
'listen_on',
|
'listen_on',
|
||||||
'macos_colorspace',
|
'macos_colorspace',
|
||||||
@ -535,7 +535,7 @@ class Options:
|
|||||||
input_delay: int = 3
|
input_delay: int = 3
|
||||||
italic_font: str = 'auto'
|
italic_font: str = 'auto'
|
||||||
kitty_mod: int = 5
|
kitty_mod: int = 5
|
||||||
linux_bell_theme_name: str = '__custom'
|
linux_bell_theme: str = '__custom'
|
||||||
linux_display_server: choices_for_linux_display_server = 'auto'
|
linux_display_server: choices_for_linux_display_server = 'auto'
|
||||||
listen_on: str = 'none'
|
listen_on: str = 'none'
|
||||||
macos_colorspace: choices_for_macos_colorspace = 'srgb'
|
macos_colorspace: choices_for_macos_colorspace = 'srgb'
|
||||||
|
|||||||
@ -1405,7 +1405,7 @@ finalize(void) {
|
|||||||
if (detached_windows.windows) free(detached_windows.windows);
|
if (detached_windows.windows) free(detached_windows.windows);
|
||||||
detached_windows.capacity = 0;
|
detached_windows.capacity = 0;
|
||||||
#define F(x) free(OPT(x)); OPT(x) = NULL;
|
#define F(x) free(OPT(x)); OPT(x) = NULL;
|
||||||
F(background_image); F(bell_path); F(default_window_logo);
|
F(background_image); F(bell_path); F(bell_theme); F(default_window_logo);
|
||||||
#undef F
|
#undef F
|
||||||
// we leak the texture here since it is not guaranteed
|
// we leak the texture here since it is not guaranteed
|
||||||
// that freeing the texture will work during shutdown and
|
// that freeing the texture will work during shutdown and
|
||||||
|
|||||||
@ -29,7 +29,6 @@ typedef struct {
|
|||||||
double wheel_scroll_multiplier, touch_scroll_multiplier;
|
double wheel_scroll_multiplier, touch_scroll_multiplier;
|
||||||
int wheel_scroll_min_lines;
|
int wheel_scroll_min_lines;
|
||||||
bool enable_audio_bell;
|
bool enable_audio_bell;
|
||||||
const char *linux_bell_theme_name;
|
|
||||||
CursorShape cursor_shape;
|
CursorShape cursor_shape;
|
||||||
float cursor_beam_thickness;
|
float cursor_beam_thickness;
|
||||||
float cursor_underline_thickness;
|
float cursor_underline_thickness;
|
||||||
@ -47,7 +46,7 @@ typedef struct {
|
|||||||
unsigned int macos_option_as_alt;
|
unsigned int macos_option_as_alt;
|
||||||
float macos_thicken_font;
|
float macos_thicken_font;
|
||||||
WindowTitleIn macos_show_window_title_in;
|
WindowTitleIn macos_show_window_title_in;
|
||||||
char *bell_path;
|
char *bell_path, *bell_theme;
|
||||||
float background_opacity, dim_opacity;
|
float background_opacity, dim_opacity;
|
||||||
float text_contrast, text_gamma_adjustment;
|
float text_contrast, text_gamma_adjustment;
|
||||||
bool text_old_gamma;
|
bool text_old_gamma;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user