Skip to content

Commit 5d9f602

Browse files
committed
Smushed commit of the following:
commit a964742 Author: Amy <[email protected]> Date: Thu Nov 13 00:52:08 2025 -0500 re-"fix" that transparent toolbar bug i don't understand. the tab (+) button still looks weird, but it also does on Finder and TextEdit. maybe bc tahoe on bdw. maybe an apple bug. maybe im crazy commit 7707c47 Author: Amy <[email protected]> Date: Thu Nov 13 00:19:03 2025 -0500 (over)write theme at every launch commit 19fca6f Author: Amy <[email protected]> Date: Thu Nov 13 00:11:14 2025 -0500 in the yc theme. straight up "worsening it" commit e06fc2c Author: Amy <[email protected]> Date: Wed Nov 12 23:27:51 2025 -0500 simple alternate temp folder support for my silly personal use case called "i keep deleting stuff by mistake and having to look in /var/folders for the yc temp file" commit f6457e0 Author: Amy <[email protected]> Date: Wed Nov 12 23:24:59 2025 -0500 enough of that yuck commit f18be8c Author: Amy <[email protected]> Date: Tue Nov 11 14:58:32 2025 -0500 lol, NSGlassEffectView
1 parent b3e6b16 commit 5d9f602

File tree

6 files changed

+35
-26
lines changed

6 files changed

+35
-26
lines changed

Delegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ -(void)addSeparatorTo:(NSMenu*)menu
4141

4242
-(void)applicationWillFinishLaunching:(NSNotification*)note
4343
{
44-
Settings.checkFirstRun;
44+
Settings.start;
4545

4646
NSMenu* bar=NSMenu.alloc.init.autorelease;
4747

Document.m

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,20 @@ -(BOOL)loadURL:(NSURL*)url
5959
{
6060
self.fileURL=url;
6161

62+
NSString* tempFolder;
63+
NSString* alternateFolder=[NSString stringWithFormat:@"~/Documents/%@ Storage",AppName].stringByExpandingTildeInPath;
64+
BOOL alternateFolderIsFolder=false;
65+
if([NSFileManager.defaultManager fileExistsAtPath:alternateFolder isDirectory:&alternateFolderIsFolder]&&alternateFolderIsFolder)
66+
{
67+
tempFolder=alternateFolder;
68+
}
69+
else
70+
{
71+
tempFolder=NSTemporaryDirectory();
72+
}
73+
6274
NSString* tempName=[NSString stringWithFormat:@"%@.%ld.txt",AppName,(long)(NSDate.date.timeIntervalSince1970*NSEC_PER_SEC)];
63-
NSURL* tempURL=[NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:tempName]];
75+
NSURL* tempURL=[NSURL fileURLWithPath:[tempFolder stringByAppendingPathComponent:tempName]];
6476

6577
if(url)
6678
{

Settings.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
#define AmyThemeBlurMaterial NSVisualEffectMaterialMenu
2-
#define AmyThemeBackgroundColorOpaque @"1 1 1"
3-
#define AmyThemeBackgroundColorTranslucent @"1 1 1 0.8"
1+
#define AmyThemeBackgroundColor @"1 1 1"
42

5-
#define AmyThemeBaseColor @"0.1 0 0.5"
3+
#define AmyThemeBaseColor @"0.1 0 0.4"
64
#define AmyThemeNormalColor [AmyThemeBaseColor stringByAppendingString:@" 0.7"]
75
#define AmyThemeMetaColor [AmyThemeBaseColor stringByAppendingString:@" 0.5"]
86
#define AmyThemeHighlightColor [AmyThemeBaseColor stringByAppendingString:@" 0.05"]
97
#define AmyThemeSelectionColor [AmyThemeBaseColor stringByAppendingString:@" 0.15"]
108

11-
#define AmyThemeKeywordColor @"0.7 0 0.8 0.9"
12-
#define AmyThemeTypeColor @"0.5 0 0.8 0.9"
9+
#define AmyThemeKeywordColor @"0.7 0 0.7"
10+
#define AmyThemeTypeColor @"0.5 0 0.8"
1311

14-
#define AmyThemeStringColor @"0.7 0 0.9 0.7"
15-
#define AmyThemeNumberColor @"0.3 0 0.9 0.7"
12+
#define AmyThemeStringColor @"0.8 0.3 1"
13+
#define AmyThemeNumberColor @"0.5 0.3 1"
1614

1715
#define AmyThemeRegularFont @"SFMono-Regular - 12"
1816
#define AmyThemeItalicFont @"SFMono-RegularItalic - 12"
1917
#define AmyThemeBoldFont @"SFMono-Bold - 12"
2018

21-
#define AmyThemeTerminalBlurAmount 1
22-
#define AmyThemeTerminalBackgroundColor @"1 1 1 0.9"
2319
#define AmyThemeTerminalFont @"SFMono-Regular"
2420
#define AmyThemeTerminalFontSize 11
2521

Settings.m

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,27 +100,34 @@ +(void)setShowedProjectModeExplanation:(BOOL)value
100100
[NSUserDefaults.standardUserDefaults setBool:value forKey:@"showed project mode explanation"];
101101
}
102102

103+
+(void)saveDefaultTheme
104+
{
105+
[Xcode saveThemeWithName:AppName backgroundColor:AmyThemeBackgroundColor highlightColor:AmyThemeHighlightColor selectionColor:AmyThemeSelectionColor defaultFont:AmyThemeRegularFont defaultColor:AmyThemeNormalColor commentFont:AmyThemeItalicFont commentColor:AmyThemeMetaColor preprocessorFont:AmyThemeRegularFont preprocessorColor:AmyThemeMetaColor classFont:AmyThemeBoldFont classColor:AmyThemeTypeColor functionFont:AmyThemeBoldFont functionColor:AmyThemeTypeColor keywordFont:AmyThemeBoldFont keywordColor:AmyThemeKeywordColor stringFont:AmyThemeBoldFont stringColor:AmyThemeStringColor numberFont:AmyThemeBoldFont numberColor:AmyThemeNumberColor];
106+
}
107+
103108
+(void)reset
104109
{
105110
for(SettingsMapping* mapping in Settings.mappings)
106111
{
107112
mapping.reset;
108113
}
109114

110-
[Xcode saveThemeWithName:AppName backgroundColor:AmyThemeBackgroundColorTranslucent highlightColor:AmyThemeHighlightColor selectionColor:AmyThemeSelectionColor defaultFont:AmyThemeRegularFont defaultColor:AmyThemeNormalColor commentFont:AmyThemeItalicFont commentColor:AmyThemeMetaColor preprocessorFont:AmyThemeRegularFont preprocessorColor:AmyThemeMetaColor classFont:AmyThemeBoldFont classColor:AmyThemeTypeColor functionFont:AmyThemeBoldFont functionColor:AmyThemeTypeColor keywordFont:AmyThemeBoldFont keywordColor:AmyThemeKeywordColor stringFont:AmyThemeBoldFont stringColor:AmyThemeStringColor numberFont:AmyThemeBoldFont numberColor:AmyThemeNumberColor];
115+
Settings.saveDefaultTheme;
111116
Xcode.themeName=AppName;
112117

113118
Settings.showedProjectModeExplanation=false;
114119
}
115120

116-
+(void)checkFirstRun
121+
+(void)start
117122
{
118123
if(![NSUserDefaults.standardUserDefaults boolForKey:@"launched"])
119124
{
120125
[NSUserDefaults.standardUserDefaults setBool:true forKey:@"launched"];
121126

122127
Settings.reset;
123128
}
129+
130+
Settings.saveDefaultTheme;
124131
}
125132

126133
+(NSString*)xcodeTypeWithType:(NSString*)type
@@ -147,7 +154,7 @@ +(NSColor*)colorWithString:(NSString*)string
147154

148155
+(void)saveAppIcon
149156
{
150-
CGColorRef backgroundColor=[Settings colorWithString:AmyThemeBackgroundColorOpaque].CGColor;
157+
CGColorRef backgroundColor=[Settings colorWithString:AmyThemeBackgroundColor].CGColor;
151158
CGColorRef strokeColor=[Settings colorWithString:AmyThemeNormalColor].CGColor;
152159
CGColorRef fillColor=[Settings colorWithString:AmyThemeHighlightColor].CGColor;
153160

@@ -206,9 +213,7 @@ +(void)saveTerminalTheme
206213

207214
@"Font":[NSKeyedArchiver archivedDataWithRootObject:[NSFont fontWithName:AmyThemeTerminalFont size:AmyThemeTerminalFontSize] requiringSecureCoding:false error:nil],
208215

209-
@"BackgroundBlur":@AmyThemeTerminalBlurAmount,
210-
211-
@"BackgroundColor":[Settings terminalColorDataWithString:AmyThemeTerminalBackgroundColor],
216+
@"BackgroundColor":[Settings terminalColorDataWithString:AmyThemeBackgroundColor],
212217
@"SelectionColor":[Settings terminalColorDataWithString:AmyThemeSelectionColor],
213218
@"TextColor":[Settings terminalColorDataWithString:AmyThemeNormalColor],
214219
@"TextBoldColor":[Settings terminalColorDataWithString:AmyThemeNormalColor],

WindowController.m

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@ -(instancetype)init
7070
self.window=[NSWindow.alloc initWithContentRect:CGRectZero styleMask:style backing:NSBackingStoreBuffered defer:false].autorelease;
7171
self.window.delegate=Delegate.shared;
7272

73-
NSVisualEffectView* blurView=NSVisualEffectView.alloc.init.autorelease;
74-
blurView.material=AmyThemeBlurMaterial;
75-
blurView.state=NSVisualEffectStateActive;
76-
self.window.contentView=blurView;
73+
// TODO: a tahoe bug or i was relying on undefined behavior? idk
74+
75+
self.window.backgroundColor=[Settings colorWithString:AmyThemeBackgroundColor];
7776

7877
[self syncProjectModeWithPrevious:WindowController.lastInstance];
7978

@@ -97,9 +96,7 @@ -(void)setXcodeViewController:(XcodeViewController*)newController
9796

9897
if(_xcodeViewController)
9998
{
100-
self.window.contentView.subviews=@[_xcodeViewController.view];
101-
_xcodeViewController.view.frame=self.window.contentView.frame;
102-
_xcodeViewController.view.autoresizingMask=NSViewWidthSizable|NSViewHeightSizable;
99+
self.window.contentView=_xcodeViewController.view;
103100

104101
[Xcode focusViewController:_xcodeViewController withSelection:oldSelection];
105102
}

build.zsh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ then
5555
set +e
5656

5757
defaults delete $id
58-
rm ~/Library/Developer/Xcode/UserData/FontAndColorThemes/"$name".xccolortheme
5958

6059
"$name.app/Contents/MacOS/$name"
6160
else

0 commit comments

Comments
 (0)