Skip to content

Commit

Permalink
Add user defaults for closing automatic window or changing terminal s…
Browse files Browse the repository at this point in the history
…etting
  • Loading branch information
jbtule committed Oct 10, 2019
1 parent 5c5419f commit 14c306b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cd to .../cd to .../main.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ int main(int argc, const char * argv[]) {
newWin = [[terminal windows] objectWithID: [NSNumber numberWithInteger:newWin.id]];
TerminalTab* newTab = [[newWin tabs] objectAtLocation:@1];

if(true) { //setting set
NSString* setName = [[NSUserDefaults standardUserDefaults] stringForKey:@"cdto-new-window-setting"];
if(setName != nil && ![setName isEqualToString:@""]) { //setting set
NSString* setName = @"Grass";
TerminalSettingsSet* chosenSet = nil;
for (TerminalSettingsSet *set in [terminal settingsSets]) {
Expand All @@ -68,7 +69,7 @@ int main(int argc, const char * argv[]) {
}
}

if(true){ //close first launch window
if([[NSUserDefaults standardUserDefaults] boolForKey:@"cdto-close-default-window"]){ //close first launch window
if([[win tabs] count] == 1){
TerminalTab* tab = [[win tabs]objectAtLocation:@1];
if(![tab busy]){
Expand Down

0 comments on commit 14c306b

Please sign in to comment.