macOS: Add an option macos_show_window_title_in_menubar to not show the current window title in the menu-bar

Fixes #1066
This commit is contained in:
Kovid Goyal 2019-01-30 13:29:55 +05:30
parent 8952afd6cc
commit 6a9a7dee55
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
5 changed files with 10 additions and 2 deletions

View File

@ -13,6 +13,9 @@ Changelog
- macOS: Fix :kbd:`cmd+period` key not working (:iss:`1318`)
- macOS: Add an option :opt:`macos_show_window_title_in_menubar` to not
show the current window title in the menu-bar (:iss:`1066`)
- Fix using remote control to set cursor text color causing errors when
creating new windows (:iss:`1326`)

View File

@ -547,7 +547,7 @@ update_window_title(Window *w, OSWindow *os_window) {
Py_INCREF(os_window->window_title);
set_os_window_title(os_window, PyUnicode_AsUTF8(w->title));
#ifdef __APPLE__
if (os_window->is_focused) cocoa_update_title(w->title);
if (os_window->is_focused && OPT(macos_show_window_title_in_menubar)) cocoa_update_title(w->title);
#endif
return true;
}

View File

@ -831,6 +831,10 @@ o('macos_traditional_fullscreen', False, long_text=_('''
Use the traditional full-screen transition, that is faster, but less pretty.
'''))
o('macos_show_window_title_in_menubar', True, long_text=_('''
Show the title of the currently active window in the macOS
menu-bar, making use of otherwise wasted space.'''))
# Disabled by default because of https://github.com/kovidgoyal/kitty/issues/794
o('macos_custom_beam_cursor', False, long_text=_('''
Enable/disable custom mouse cursor for macOS that is easier to see on both

View File

@ -391,6 +391,7 @@ PYWRAP1(set_options) {
S(macos_option_as_alt, PyObject_IsTrue);
S(macos_traditional_fullscreen, PyObject_IsTrue);
S(macos_quit_when_last_window_closed, PyObject_IsTrue);
S(macos_show_window_title_in_menubar, PyObject_IsTrue);
S(macos_window_resizable, PyObject_IsTrue);
S(macos_hide_from_tasks, PyObject_IsTrue);
S(macos_thicken_font, PyFloat_AsDouble);

View File

@ -24,7 +24,7 @@ typedef struct {
color_type url_color, background, active_border_color, inactive_border_color, bell_border_color;
double repaint_delay, input_delay;
bool focus_follows_mouse, hide_window_decorations;
bool macos_option_as_alt, macos_hide_from_tasks, macos_quit_when_last_window_closed, macos_window_resizable, macos_traditional_fullscreen;
bool macos_option_as_alt, macos_hide_from_tasks, macos_quit_when_last_window_closed, macos_window_resizable, macos_traditional_fullscreen, macos_show_window_title_in_menubar;
float macos_thicken_font;
int adjust_line_height_px, adjust_column_width_px;
float adjust_line_height_frac, adjust_column_width_frac;