Skip to content
Snippets Groups Projects
Commit 23c1c5da authored by George Nachman's avatar George Nachman
Browse files

Add an advanced pref to disable the status bar icon. Issue 6047

parent a89e0e3b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -192,5 +192,6 @@
+ (BOOL)dwcLineCache;
+ (BOOL)lowFiCombiningMarks;
+ (CGFloat)verticalBarCursorWidth;
+ (BOOL)statusBarIcon;
 
@end
Loading
Loading
@@ -165,6 +165,7 @@ DEFINE_STRING(viewManPageCommand, @"man %@ || sleep 3", @"General: Command to vi
DEFINE_BOOL(experimentalKeyHandling, YES, @"General: Improved support for input method editors like AquaSKK.");
DEFINE_BOOL(hideStuckTooltips, YES, @"General: Hide stuck tooltips.\nWhen you hide iTerm2 using a hotkey while a tooltip is fading out it gets stuck because of an OS bug. Work around it with a nasty hack by enabling this feature.")
DEFINE_BOOL(openFileOverridesSendText, YES, @"General: Should opening a script with iTerm2 disable the default profile's “Send Text at Start” setting?\nIf you use “open iTerm2 file.command” or drag a script onto iTerm2's icon and this setting is enabled then the script will be executed in lieu of the profile's “Send Text at Start” setting. If this setting is off then both will be executed.");
DEFINE_BOOL(statusBarIcon, YES, @"General: Add status bar icon when excluded from dock?\nWhen you turn on “Exclude from Dock and Cmd-Tab Application Switcher” a status bar icon is added to the menu bar so you can switch the setting back off. Disable this to remove the status bar icon. Doing so makes it very hard to get to Preferences. You must restart iTerm2 after changing this setting.");
 
#pragma mark - Drawing
DEFINE_BOOL(zippyTextDrawing, YES, @"Drawing: Use zippy text drawing algorithm?\nThis draws non-ASCII text more quickly but with lower fidelity. This setting is ignored if ligatures are enabled in Prefs > Profiles > Text.");
Loading
Loading
Loading
Loading
@@ -381,17 +381,18 @@
dispatch_async(dispatch_get_main_queue(), ^{
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
});
NSImage *image = [NSImage imageNamed:@"StatusItem"];
self.statusBarItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:image.size.width] retain];
_statusBarItem.title = @"";
_statusBarItem.image = image;
_statusBarItem.alternateImage = [NSImage imageNamed:@"StatusItemAlt"];
_statusBarItem.highlightMode = YES;
_statusBarItem.menu = [[self delegate] statusBarMenu];
} else {
if ([iTermAdvancedSettingsModel statusBarIcon]) {
NSImage *image = [NSImage imageNamed:@"StatusItem"];
self.statusBarItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:image.size.width] retain];
_statusBarItem.title = @"";
_statusBarItem.image = image;
_statusBarItem.alternateImage = [NSImage imageNamed:@"StatusItemAlt"];
_statusBarItem.highlightMode = YES;
_statusBarItem.menu = [[self delegate] statusBarMenu];
}
} else if (_statusBarItem != nil) {
[[NSStatusBar systemStatusBar] removeStatusItem:_statusBarItem];
self.statusBarItem = nil;
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment