Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Punch a hole through the find-cursor stars so you can see the cursor.…
… Don't show the arrow find-cursor view reguarly.
- Loading branch information
Showing
5 changed files
with
76 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// NSDate+NSDate_iTerm.h | ||
// iTerm2 | ||
// | ||
// Created by George Nachman on 10/22/15. | ||
// | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSDate (iTerm) | ||
|
||
+ (BOOL)isAprilFools; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// NSDate+NSDate_iTerm.m | ||
// iTerm2 | ||
// | ||
// Created by George Nachman on 10/22/15. | ||
// | ||
// | ||
|
||
#import "NSDate+iTerm.h" | ||
|
||
@implementation NSDate (iTerm) | ||
|
||
+ (BOOL)isAprilFools { | ||
static NSTimeInterval lastComputation; | ||
static BOOL result; | ||
NSTimeInterval now = [self timeIntervalSinceReferenceDate]; | ||
if (now - lastComputation > 3600) { | ||
// Check no more than once an hour. This could be much more efficient, but doing anything with | ||
// time is fraught with bugs and peril, so we'll just keep it simple. | ||
NSCalendar *calendar = | ||
[[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease]; | ||
NSDateComponents *components = | ||
[calendar components:(NSMonthCalendarUnit | NSDayCalendarUnit) fromDate:[self date]]; | ||
result = (components.month == 4 && components.day == 1); | ||
lastComputation = now; | ||
} | ||
return result; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters