Merge branch 'minor-tweaks' of https://github.com/page-down/kitty
This commit is contained in:
commit
3f3fe6b178
@ -380,7 +380,16 @@ cocoa_create_global_menu(void) {
|
|||||||
keyEquivalent:@""];
|
keyEquivalent:@""];
|
||||||
[appMenu addItem:[NSMenuItem separatorItem]];
|
[appMenu addItem:[NSMenuItem separatorItem]];
|
||||||
MENU_ITEM(appMenu, @"Preferences…", edit_config_file);
|
MENU_ITEM(appMenu, @"Preferences…", edit_config_file);
|
||||||
MENU_ITEM(appMenu, @"Reload preferences", reload_config);
|
MENU_ITEM(appMenu, @"Reload Preferences", reload_config);
|
||||||
|
[appMenu addItem:[NSMenuItem separatorItem]];
|
||||||
|
|
||||||
|
NSMenu* servicesMenu = [[NSMenu alloc] init];
|
||||||
|
[NSApp setServicesMenu:servicesMenu];
|
||||||
|
[[appMenu addItemWithTitle:@"Services"
|
||||||
|
action:NULL
|
||||||
|
keyEquivalent:@""] setSubmenu:servicesMenu];
|
||||||
|
[servicesMenu release];
|
||||||
|
[appMenu addItem:[NSMenuItem separatorItem]];
|
||||||
|
|
||||||
[appMenu addItemWithTitle:[NSString stringWithFormat:@"Hide %@", app_name]
|
[appMenu addItemWithTitle:[NSString stringWithFormat:@"Hide %@", app_name]
|
||||||
action:@selector(hide:)
|
action:@selector(hide:)
|
||||||
@ -394,15 +403,6 @@ cocoa_create_global_menu(void) {
|
|||||||
keyEquivalent:@""];
|
keyEquivalent:@""];
|
||||||
[appMenu addItem:[NSMenuItem separatorItem]];
|
[appMenu addItem:[NSMenuItem separatorItem]];
|
||||||
|
|
||||||
NSMenu* servicesMenu = [[NSMenu alloc] init];
|
|
||||||
[NSApp setServicesMenu:servicesMenu];
|
|
||||||
[[appMenu addItemWithTitle:@"Services"
|
|
||||||
action:NULL
|
|
||||||
keyEquivalent:@""] setSubmenu:servicesMenu];
|
|
||||||
[servicesMenu release];
|
|
||||||
|
|
||||||
[appMenu addItem:[NSMenuItem separatorItem]];
|
|
||||||
|
|
||||||
[[appMenu addItemWithTitle:@"Secure Keyboard Entry"
|
[[appMenu addItemWithTitle:@"Secure Keyboard Entry"
|
||||||
action:@selector(toggleSecureInput:)
|
action:@selector(toggleSecureInput:)
|
||||||
keyEquivalent:@"s"]
|
keyEquivalent:@"s"]
|
||||||
@ -470,7 +470,7 @@ cocoa_create_global_menu(void) {
|
|||||||
keyEquivalent:@""];
|
keyEquivalent:@""];
|
||||||
NSMenu* helpMenu = [[NSMenu alloc] initWithTitle:@"Help"];
|
NSMenu* helpMenu = [[NSMenu alloc] initWithTitle:@"Help"];
|
||||||
[helpMenuItem setSubmenu:helpMenu];
|
[helpMenuItem setSubmenu:helpMenu];
|
||||||
[[helpMenu addItemWithTitle:[NSString stringWithFormat:@"Visit %@ website", app_name]
|
[[helpMenu addItemWithTitle:[NSString stringWithFormat:@"Visit %@ Website", app_name]
|
||||||
action:@selector(open_kitty_website_url:)
|
action:@selector(open_kitty_website_url:)
|
||||||
keyEquivalent:@"?"]
|
keyEquivalent:@"?"]
|
||||||
setTarget:global_menu_target];
|
setTarget:global_menu_target];
|
||||||
|
|||||||
@ -65,7 +65,7 @@ def find_best_match(family: str, bold: bool = False, italic: bool = False, ignor
|
|||||||
] == italic else 0
|
] == italic else 0
|
||||||
monospace_match = 1 if candidate['monospace'] else 0
|
monospace_match = 1 if candidate['monospace'] else 0
|
||||||
is_regular_width = not candidate['expanded'] and not candidate['condensed']
|
is_regular_width = not candidate['expanded'] and not candidate['condensed']
|
||||||
# prefer demi-bold to bold to heavy, less bold means less chance of
|
# prefer semi-bold to bold to heavy, less bold means less chance of
|
||||||
# overflow
|
# overflow
|
||||||
weight_distance_from_medium = abs(candidate['weight'])
|
weight_distance_from_medium = abs(candidate['weight'])
|
||||||
return style_match, monospace_match, 1 if is_regular_width else 0, 1 - weight_distance_from_medium
|
return style_match, monospace_match, 1 if is_regular_width else 0, 1 - weight_distance_from_medium
|
||||||
|
|||||||
@ -33,9 +33,11 @@ opt('font_family', 'monospace',
|
|||||||
long_text='''
|
long_text='''
|
||||||
You can specify different fonts for the bold/italic/bold-italic variants.
|
You can specify different fonts for the bold/italic/bold-italic variants.
|
||||||
To get a full list of supported fonts use the `kitty list-fonts` command.
|
To get a full list of supported fonts use the `kitty list-fonts` command.
|
||||||
By default they are derived automatically, by the OSes font system. Setting
|
By default they are derived automatically, by the OSes font system. When
|
||||||
them manually is useful for font families that have many weight variants like
|
bold_font or bold_italic_font is set to :code:`auto`, the priority of bold
|
||||||
Book, Medium, Thick, etc. For example::
|
fonts is semi-bold, bold, heavy. Setting them manually is useful for font
|
||||||
|
families that have many weight variants like Book, Medium, Thick, etc.
|
||||||
|
For example::
|
||||||
|
|
||||||
font_family Operator Mono Book
|
font_family Operator Mono Book
|
||||||
bold_font Operator Mono Medium
|
bold_font Operator Mono Medium
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user