mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 10:12:17 +02:00
Added macos_fullscreen_ignore_safe_area_insets option
This commit is contained in:
@@ -2695,6 +2695,15 @@ pretty.
|
||||
'''
|
||||
)
|
||||
|
||||
opt('macos_fullscreen_ignore_safe_area_insets', 'no',
|
||||
option_type='to_bool', ctype='bool',
|
||||
long_text='''
|
||||
When using :opt:`macos_traditional_fullscreen`, ignore the safe area insets on
|
||||
displays such as MacBook screens with a notch. This allows kitty to use the
|
||||
full display frame instead of leaving space for the notch area.
|
||||
'''
|
||||
)
|
||||
|
||||
opt('macos_show_window_title_in', 'all',
|
||||
choices=('all', 'menubar', 'none', 'window'), ctype='window_title_in',
|
||||
long_text='''
|
||||
|
||||
3
kitty/options/parse.py
generated
3
kitty/options/parse.py
generated
@@ -1094,6 +1094,9 @@ class Parser:
|
||||
def macos_dock_badge_on_bell(self, val: str, ans: dict[str, typing.Any]) -> None:
|
||||
ans['macos_dock_badge_on_bell'] = to_bool(val)
|
||||
|
||||
def macos_fullscreen_ignore_safe_area_insets(self, val: str, ans: dict[str, typing.Any]) -> None:
|
||||
ans['macos_fullscreen_ignore_safe_area_insets'] = to_bool(val)
|
||||
|
||||
def macos_hide_from_tasks(self, val: str, ans: dict[str, typing.Any]) -> None:
|
||||
ans['macos_hide_from_tasks'] = to_bool(val)
|
||||
|
||||
|
||||
15
kitty/options/to-c-generated.h
generated
15
kitty/options/to-c-generated.h
generated
@@ -1396,6 +1396,19 @@ convert_from_opts_macos_thicken_font(PyObject *py_opts, Options *opts) {
|
||||
Py_DECREF(ret);
|
||||
}
|
||||
|
||||
static void
|
||||
convert_from_python_macos_fullscreen_ignore_safe_area_insets(PyObject *val, Options *opts) {
|
||||
opts->macos_fullscreen_ignore_safe_area_insets = PyObject_IsTrue(val);
|
||||
}
|
||||
|
||||
static void
|
||||
convert_from_opts_macos_fullscreen_ignore_safe_area_insets(PyObject *py_opts, Options *opts) {
|
||||
PyObject *ret = PyObject_GetAttrString(py_opts, "macos_fullscreen_ignore_safe_area_insets");
|
||||
if (ret == NULL) return;
|
||||
convert_from_python_macos_fullscreen_ignore_safe_area_insets(ret, opts);
|
||||
Py_DECREF(ret);
|
||||
}
|
||||
|
||||
static void
|
||||
convert_from_python_macos_traditional_fullscreen(PyObject *val, Options *opts) {
|
||||
opts->macos_traditional_fullscreen = PyObject_IsTrue(val);
|
||||
@@ -1671,6 +1684,8 @@ convert_opts_from_python_opts(PyObject *py_opts, Options *opts) {
|
||||
if (PyErr_Occurred()) return false;
|
||||
convert_from_opts_macos_hide_from_tasks(py_opts, opts);
|
||||
if (PyErr_Occurred()) return false;
|
||||
convert_from_opts_macos_fullscreen_ignore_safe_area_insets(py_opts, opts);
|
||||
if (PyErr_Occurred()) return false;
|
||||
convert_from_opts_macos_quit_when_last_window_closed(py_opts, opts);
|
||||
if (PyErr_Occurred()) return false;
|
||||
convert_from_opts_macos_window_resizable(py_opts, opts);
|
||||
|
||||
2
kitty/options/types.py
generated
2
kitty/options/types.py
generated
@@ -386,6 +386,7 @@ option_names = (
|
||||
'macos_colorspace',
|
||||
'macos_custom_beam_cursor',
|
||||
'macos_dock_badge_on_bell',
|
||||
'macos_fullscreen_ignore_safe_area_insets',
|
||||
'macos_hide_from_tasks',
|
||||
'macos_menubar_title_max_length',
|
||||
'macos_option_as_alt',
|
||||
@@ -598,6 +599,7 @@ class Options:
|
||||
macos_colorspace: choices_for_macos_colorspace = 'srgb'
|
||||
macos_custom_beam_cursor: bool = False
|
||||
macos_dock_badge_on_bell: bool = True
|
||||
macos_fullscreen_ignore_safe_area_insets: bool = False
|
||||
macos_hide_from_tasks: bool = False
|
||||
macos_menubar_title_max_length: int = 0
|
||||
macos_option_as_alt: int = 0
|
||||
|
||||
Reference in New Issue
Block a user