Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandra authored and Alexandra committed May 17, 2022
0 parents commit 79a2a69
Show file tree
Hide file tree
Showing 331 changed files with 10,218 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.x linguist-language=Objective-C
*.xm linguist-language=Objective-C
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
.theos
/packages
.vscode
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Alexandra (@Traurige)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export ARCHS = arm64 arm64e
export TARGET = iphone:clang:14.4:13.0
export SYSROOT = $(THEOS)/sdks/iOS/14/iPhoneOS14.4.sdk
export PREFIX = $(THEOS)/toolchain/Xcode.xctoolchain/usr/bin/

INSTALL_TARGET_PROCESSES = SpringBoard
SUBPROJECTS += Tweak/iPhone Tweak/iPad Preferences

include $(THEOS)/makefiles/common.mk
include $(THEOS_MAKE_PATH)/aggregate.mk
47 changes: 47 additions & 0 deletions Preferences/DRYAppearanceSettings.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#import "DRYRootListController.h"

@implementation DRYAppearanceSettings

- (UIColor *)tintColor {

return [UIColor colorWithRed:0.56 green:0.74 blue:0.98 alpha:1];

}

- (UIStatusBarStyle)statusBarStyle {

return UIStatusBarStyleDarkContent;

}

- (UIColor *)navigationBarTitleColor {

return [UIColor whiteColor];

}

- (UIColor *)navigationBarTintColor {

return [UIColor whiteColor];

}

- (UIColor *)tableViewCellSeparatorColor {

return [[UIColor whiteColor] colorWithAlphaComponent:0];

}

- (UIColor *)navigationBarBackgroundColor {

return [UIColor colorWithRed:0.56 green:0.74 blue:0.98 alpha:1];

}

- (BOOL)translucentNavigationBar {

return YES;

}

@end
15 changes: 15 additions & 0 deletions Preferences/DRYBackgroundSubPreferencesListController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#import <Preferences/PSListController.h>
#import <Preferences/PSListItemsController.h>
#import <Preferences/PSSpecifier.h>
#import <CepheiPrefs/HBListController.h>
#import <CepheiPrefs/HBAppearanceSettings.h>

@interface DRYAppearanceSettings : HBAppearanceSettings
@end

@interface DRYBackgroundSubPreferencesListController : HBListController
@property(nonatomic, retain)DRYAppearanceSettings* appearanceSettings;
@property(nonatomic, retain)UILabel* titleLabel;
@property(nonatomic, retain)UIBlurEffect* blur;
@property(nonatomic, retain)UIVisualEffectView* blurView;
@end
62 changes: 62 additions & 0 deletions Preferences/DRYBackgroundSubPreferencesListController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#import "DRYBackgroundSubPreferencesListController.h"

@implementation DRYBackgroundSubPreferencesListController

- (void)viewDidLoad {

[super viewDidLoad];

self.appearanceSettings = [DRYAppearanceSettings new];
self.hb_appearanceSettings = [self appearanceSettings];

self.blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleRegular];
self.blurView = [[UIVisualEffectView alloc] initWithEffect:[self blur]];

}

- (void)viewWillAppear:(BOOL)animated {

[super viewWillAppear:animated];

[[self blurView] setFrame:[[self view] bounds]];
[[self blurView] setAlpha:1];
[[self view] addSubview:[self blurView]];

[UIView animateWithDuration:0.4 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
[[self blurView] setAlpha:0];
} completion:nil];

}

- (id)specifiers {

return _specifiers;

}

- (void)loadFromSpecifier:(PSSpecifier *)specifier {

NSString* sub = [specifier propertyForKey:@"DRYSub"];
NSString* title = [specifier name];

_specifiers = [self loadSpecifiersFromPlistName:sub target:self];

[self setTitle:title];
[[self navigationItem] setTitle:title];

}

- (void)setSpecifier:(PSSpecifier *)specifier {

[self loadFromSpecifier:specifier];
[super setSpecifier:specifier];

}

- (BOOL)shouldReloadSpecifiersOnResume {

return false;

}

@end
15 changes: 15 additions & 0 deletions Preferences/DRYContributorsSubPreferencesListController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#import <Preferences/PSListController.h>
#import <Preferences/PSListItemsController.h>
#import <Preferences/PSSpecifier.h>
#import <CepheiPrefs/HBListController.h>
#import <CepheiPrefs/HBAppearanceSettings.h>

@interface DRYAppearanceSettings : HBAppearanceSettings
@end

@interface DRYContributorsSubPreferencesListController : HBListController
@property(nonatomic, retain)DRYAppearanceSettings* appearanceSettings;
@property(nonatomic, retain)UILabel* titleLabel;
@property(nonatomic, retain)UIBlurEffect* blur;
@property(nonatomic, retain)UIVisualEffectView* blurView;
@end
62 changes: 62 additions & 0 deletions Preferences/DRYContributorsSubPreferencesListController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#import "DRYContributorsSubPreferencesListController.h"

@implementation DRYContributorsSubPreferencesListController

- (void)viewDidLoad {

[super viewDidLoad];

self.appearanceSettings = [DRYAppearanceSettings new];
self.hb_appearanceSettings = [self appearanceSettings];

self.blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleRegular];
self.blurView = [[UIVisualEffectView alloc] initWithEffect:[self blur]];

}

- (void)viewWillAppear:(BOOL)animated {

[super viewWillAppear:animated];

[[self blurView] setFrame:[[self view] bounds]];
[[self blurView] setAlpha:1];
[[self view] addSubview:[self blurView]];

[UIView animateWithDuration:0.4 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
[[self blurView] setAlpha:0];
} completion:nil];

}

- (id)specifiers {

return _specifiers;

}

- (void)loadFromSpecifier:(PSSpecifier *)specifier {

NSString* sub = [specifier propertyForKey:@"DRYSub"];
NSString* title = [specifier name];

_specifiers = [self loadSpecifiersFromPlistName:sub target:self];

[self setTitle:title];
[[self navigationItem] setTitle:title];

}

- (void)setSpecifier:(PSSpecifier *)specifier {

[self loadFromSpecifier:specifier];
[super setSpecifier:specifier];

}

- (BOOL)shouldReloadSpecifiersOnResume {

return false;

}

@end
17 changes: 17 additions & 0 deletions Preferences/DRYHelloSubPreferencesListController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#import <Preferences/PSListController.h>
#import <Preferences/PSListItemsController.h>
#import <Preferences/PSSpecifier.h>
#import <CepheiPrefs/HBListController.h>
#import <CepheiPrefs/HBAppearanceSettings.h>
#import <Cephei/HBRespringController.h>

@interface DRYAppearanceSettings : HBAppearanceSettings
@end

@interface DRYHelloSubPreferencesListController : HBListController
@property(nonatomic, retain)DRYAppearanceSettings* appearanceSettings;
@property(nonatomic, retain)UILabel* titleLabel;
@property(nonatomic, retain)UIBlurEffect* blur;
@property(nonatomic, retain)UIVisualEffectView* blurView;
- (void)respring;
@end
89 changes: 89 additions & 0 deletions Preferences/DRYHelloSubPreferencesListController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#import "DRYHelloSubPreferencesListController.h"

@implementation DRYHelloSubPreferencesListController

- (void)viewDidLoad {

[super viewDidLoad];

self.appearanceSettings = [DRYAppearanceSettings new];
self.hb_appearanceSettings = [self appearanceSettings];

self.blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleRegular];
self.blurView = [[UIVisualEffectView alloc] initWithEffect:[self blur]];

}

- (void)viewWillAppear:(BOOL)animated {

[super viewWillAppear:animated];

[[self blurView] setFrame:[[self view] bounds]];
[[self blurView] setAlpha:1];
[[self view] addSubview:[self blurView]];

[UIView animateWithDuration:0.4 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
[[self blurView] setAlpha:0];
} completion:nil];

}

- (id)specifiers {

return _specifiers;

}

- (void)loadFromSpecifier:(PSSpecifier *)specifier {

NSString* sub = [specifier propertyForKey:@"DRYSub"];
NSString* title = [specifier name];

_specifiers = [self loadSpecifiersFromPlistName:sub target:self];

[self setTitle:title];
[[self navigationItem] setTitle:title];

}

- (void)setSpecifier:(PSSpecifier *)specifier {

[self loadFromSpecifier:specifier];
[super setSpecifier:specifier];

}

- (void)setPreferenceValue:(id)value specifier:(PSSpecifier*)specifier {

[super setPreferenceValue:value specifier:specifier];

if ([[specifier propertyForKey:@"key"] isEqualToString:@"enableHello"]) {
[self respring];
}

}

- (BOOL)shouldReloadSpecifiersOnResume {

return false;

}

- (void)respring {

[[self blurView] setFrame:[[self view] bounds]];
[[self blurView] setAlpha:0];
[[self view] addSubview:[self blurView]];

[UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
[[self blurView] setAlpha:1];
} completion:^(BOOL finished) {
if (![[NSFileManager defaultManager] fileExistsAtPath:@"/Library/MobileSubstrate/DynamicLibraries/shuffle.dylib"])
[HBRespringController respringAndReturnTo:[NSURL URLWithString:@"prefs:root=Diary"]];
else
[HBRespringController respringAndReturnTo:[NSURL URLWithString:@"prefs:root=Tweaks&path=Diary"]];
}];

}

@end
17 changes: 17 additions & 0 deletions Preferences/DRYMediaPlayerSubPreferencesListController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#import <Preferences/PSListController.h>
#import <Preferences/PSListItemsController.h>
#import <Preferences/PSSpecifier.h>
#import <CepheiPrefs/HBListController.h>
#import <CepheiPrefs/HBAppearanceSettings.h>
#import <Cephei/HBRespringController.h>

@interface DRYAppearanceSettings : HBAppearanceSettings
@end

@interface DRYMediaPlayerSubPreferencesListController : HBListController
@property(nonatomic, retain)DRYAppearanceSettings* appearanceSettings;
@property(nonatomic, retain)UILabel* titleLabel;
@property(nonatomic, retain)UIBlurEffect* blur;
@property(nonatomic, retain)UIVisualEffectView* blurView;
- (void)respring;
@end
Loading

0 comments on commit 79a2a69

Please sign in to comment.