Skip to content
Snippets Groups Projects
Commit bdffad5b authored by Akiva Leffert's avatar Akiva Leffert Committed by George Nachman
Browse files

Setting to allow hot key window to float above windows even in background.

This is useful for watching the status of a terminal even when you're
doing other things.
parent 7157c6cb
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -170,6 +170,11 @@ static void RollInHotkeyTerm(PseudoTerminal* term)
}
}
if (term) {
if ([iTermAdvancedSettingsModel hotkeyWindowFloatsAboveOtherWindows]) {
term.window.level = NSFloatingWindowLevel;
} else {
term.window.level = NSNormalWindowLevel;
}
[term setIsHotKeyWindow:YES];
 
[[term window] setAlphaValue:0];
Loading
Loading
Loading
Loading
@@ -6966,6 +6966,10 @@ static NSTimeInterval kMinimumPartialLineTriggerCheckInterval = 0.5;
return [[self tab] realParentWindow];
}
 
- (BOOL)popupWindowIsInHotkeyWindow {
return self.tab.realParentWindow.isHotKeyWindow;
}
- (VT100Screen *)popupVT100Screen {
return _screen;
}
Loading
Loading
Loading
Loading
@@ -23,6 +23,7 @@
// Return YES if the delegate handles it, NO if Popup should handle it.
- (BOOL)popupHandleSelector:(SEL)selector string:(NSString *)string currentValue:(NSString *)currentValue;
- (void)popupWillClose:(Popup *)popup;
- (BOOL)popupWindowIsInHotkeyWindow;
 
@end
 
Loading
Loading
Loading
Loading
@@ -2,6 +2,7 @@
 
#import "Popup.h"
#import "DebugLogging.h"
#import "iTermAdvancedSettingsModel.h"
#import "NSWindow+PSM.h"
#import "PopupEntry.h"
#import "PopupModel.h"
Loading
Loading
@@ -93,11 +94,15 @@
return YES;
}
 
- (void)popWithDelegate:(id<PopupDelegate>)delegate
{
- (void)popWithDelegate:(id<PopupDelegate>)delegate {
self.delegate = delegate;
[[self window] setParentWindow:delegate.popupWindowController.window];
if (delegate.popupWindowIsInHotkeyWindow &&
[iTermAdvancedSettingsModel hotkeyWindowFloatsAboveOtherWindows]) {
self.window.level = NSPopUpMenuWindowLevel;
}
self.window.alphaValue = 0;
[self showWindow:delegate.popupWindowController];
[[self window] makeKeyAndOrderFront:delegate.popupWindowController];
Loading
Loading
Loading
Loading
@@ -54,8 +54,7 @@
shutdown_ = YES;
}
 
- (void)setParentWindow:(NSWindow*)parentWindow
{
- (void)setParentWindow:(NSWindow*)parentWindow {
[parentWindow_ autorelease];
parentWindow_ = [parentWindow retain];
}
Loading
Loading
Loading
Loading
@@ -17,6 +17,7 @@
+ (BOOL)alternateMouseScroll;
+ (BOOL)traditionalVisualBell;
+ (double)hotkeyTermAnimationDuration;
+ (BOOL)hotkeyWindowFloatsAboveOtherWindows;
+ (NSString *)searchCommand;
+ (double)antiIdleTimerPeriod;
+ (BOOL)dockIconTogglesWindow;
Loading
Loading
Loading
Loading
@@ -83,6 +83,7 @@ DEFINE_BOOL(requireCmdForDraggingText, NO, @"Terminal: To drag images or selecte
#pragma mark Hotkey
DEFINE_FLOAT(hotkeyTermAnimationDuration, 0.25, @"Hotkey: Duration in seconds of the hotkey window animation.");
DEFINE_BOOL(dockIconTogglesWindow, NO, @"Hotkey: If the only window is a hotkey window, then clicking the dock icon shows or hides it.");
DEFINE_BOOL(hotkeyWindowFloatsAboveOtherWindows, NO, @"Hotkey: The hotkey window floats above other windows even when another application is active.\nYou must disable “Prefs > Keys > Hotkey window hides when focus is lost” for this setting to be effective.");
 
#pragma mark General
DEFINE_STRING(searchCommand, @"http://google.com/search?q=%@", @"General: Template for URL of search engine.\niTerm2 replaces the string “%@” with the text to search for. Query parameter percent escaping is used.");
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