TWEAK_NAME = ZenithDark | TWEAK_NAME = ZenithDark | ||||
$(TWEAK_NAME)_FILES = Tweak.xm | |||||
$(TWEAK_NAME)_FRAMEWORKS = UIKit CoreGraphics | |||||
$(TWEAK_NAME)_EXTRA_FRAMEWORKS += Cephei CepheiPrefs | |||||
ZenithDark_FILES = Tweak.xm | |||||
ZenithDark_FRAMEWORKS = UIKit CoreGraphics | |||||
include $(THEOS_MAKE_PATH)/tweak.mk | include $(THEOS_MAKE_PATH)/tweak.mk | ||||
include $(THEOS_MAKE_PATH)/aggregate.mk | include $(THEOS_MAKE_PATH)/aggregate.mk | ||||
after-install:: | after-install:: | ||||
install.exec "sbreload" | |||||
install.exec "sbreload" |
#import "ZenithDark.h" | #import "ZenithDark.h" | ||||
#import <Cephei/HBPreferences.h> | |||||
/* | /* | ||||
Version: 1.2 | Version: 1.2 | ||||
Architecture: iphoneos-arm | Architecture: iphoneos-arm | ||||
Maintainer: mac-user669 | Maintainer: mac-user669 | ||||
Depends: mobilesubstrate, preferenceloader, com.muirey03.zenith, ws.hbang.common (>= 1.14) | |||||
Depends: mobilesubstrate, preferenceloader, com.muirey03.zenith | |||||
Section: Tweaks | Section: Tweaks | ||||
Description: Changes Zeniths tabs to a dark blur | Description: Changes Zeniths tabs to a dark blur | ||||
Author: mac-user669 | Author: mac-user669 |
ZenithDarkPrefs_INSTALL_PATH = /Library/PreferenceBundles | ZenithDarkPrefs_INSTALL_PATH = /Library/PreferenceBundles | ||||
ZenithDarkPrefs_FRAMEWORKS = UIKit | ZenithDarkPrefs_FRAMEWORKS = UIKit | ||||
ZenithDarkPrefs_PRIVATE_FRAMEWORKS = Preferences | ZenithDarkPrefs_PRIVATE_FRAMEWORKS = Preferences | ||||
ZenithDarkPrefs_EXTRA_FRAMEWORKS += Cephei CepheiPrefs | |||||
include $(THEOS_MAKE_PATH)/bundle.mk | include $(THEOS_MAKE_PATH)/bundle.mk | ||||
<dict> | <dict> | ||||
<key>items</key> | <key>items</key> | ||||
<array> | <array> | ||||
<dict> | |||||
<key>cell</key> | |||||
<string>PSGroupCell</string> | |||||
<key>headerCellClass</key> | |||||
<string>HBPackageNameHeaderCell</string> | |||||
<key>packageIdentifier</key> | |||||
<string>com.mac-user669.zenithdark</string> | |||||
<key>backgroundGradientColors</key> | |||||
<array> | |||||
<string>#D0A400</string> | |||||
<string>#D0A400</string> | |||||
</array> | |||||
<key>titleColor</key> | |||||
<string>#111111</string> | |||||
<key>subtitleColor</key> | |||||
<string>#444444</string> | |||||
</dict> | |||||
<dict> | <dict> | ||||
<key>cell</key> | <key>cell</key> | ||||
<string>PSGroupCell</string> | <string>PSGroupCell</string> | ||||
<string>PSButtonCell</string> | <string>PSButtonCell</string> | ||||
<key>label</key> | <key>label</key> | ||||
<string>Respring</string> | <string>Respring</string> | ||||
<key>cellClass</key> | |||||
<string>HBTintedTableCell</string> | |||||
<key>action</key> | <key>action</key> | ||||
<string>doAFancyRespring</string> | <string>doAFancyRespring</string> | ||||
</dict> | </dict> | ||||
<string>Conceptualized by yours truly.</string> | <string>Conceptualized by yours truly.</string> | ||||
</dict> | </dict> | ||||
<dict> | <dict> | ||||
<key>cellClass</key> | |||||
<string>HBTwitterCell</string> | |||||
<key>label</key> | |||||
<string>mac-user669</string> | |||||
<key>user</key> | |||||
<string>mac_user669</string> | |||||
</dict> | |||||
<dict> | |||||
<key>cellClass</key> | |||||
<string>HBLinkTableCell</string> | |||||
<key>label</key> | |||||
<string>Donate</string> | |||||
<key>url</key> | |||||
<string>https://paypal.me/macuser669</string> | |||||
</dict> | |||||
<key>icon</key> | |||||
<string>mac-user669.png</string> | |||||
<key>cell</key> | |||||
<string>PSButtonCell</string> | |||||
<key>label</key> | |||||
<string>@mac_user669</string> | |||||
<key>action</key> | |||||
<string>followMe</string> | |||||
</dict> | |||||
<dict> | <dict> | ||||
<key>cell</key> | <key>cell</key> | ||||
<string>PSGroupCell</string> | <string>PSGroupCell</string> | ||||
<string>Coded most of the tweak.</string> | <string>Coded most of the tweak.</string> | ||||
</dict> | </dict> | ||||
<dict> | <dict> | ||||
<key>cellClass</key> | |||||
<string>HBTwitterCell</string> | |||||
<key>label</key> | |||||
<string>iKilledAppl3</string> | |||||
<key>user</key> | |||||
<string>iKilledAppl3</string> | |||||
</dict> | |||||
<dict> | |||||
<key>cellClass</key> | |||||
<string>HBLinkTableCell</string> | |||||
<key>label</key> | |||||
<string>Donate</string> | |||||
<key>url</key> | |||||
<string>https://paypal.me/iKilledAppl3</string> | |||||
</dict> | |||||
<key>icon</key> | |||||
<string>iKA.png</string> | |||||
<key>cell</key> | |||||
<string>PSButtonCell</string> | |||||
<key>label</key> | |||||
<string>@iKilledAppl3</string> | |||||
<key>action</key> | |||||
<string>followiKA</string> | |||||
</dict> | |||||
<dict> | <dict> | ||||
<key>cell</key> | <key>cell</key> | ||||
<string>PSGroupCell</string> | <string>PSGroupCell</string> | ||||
<string>Helped with some of our preferences code and amongst other things.</string> | <string>Helped with some of our preferences code and amongst other things.</string> | ||||
</dict> | </dict> | ||||
<dict> | <dict> | ||||
<key>cellClass</key> | |||||
<string>HBTwitterCell</string> | |||||
<key>label</key> | |||||
<string>Skittyblock</string> | |||||
<key>user</key> | |||||
<string>Skittyblock</string> | |||||
</dict> | |||||
<key>icon</key> | |||||
<string>skitty.png</string> | |||||
<key>cell</key> | |||||
<string>PSButtonCell</string> | |||||
<key>label</key> | |||||
<string>@Skittyblock</string> | |||||
<key>action</key> | |||||
<string>followSkitty</string> | |||||
</dict> | |||||
</array> | </array> | ||||
<key>title</key> | <key>title</key> | ||||
<string>ZenithDark</string> | <string>ZenithDark</string> |
#import <Preferences/PSListController.h> | #import <Preferences/PSListController.h> | ||||
#import <CepheiPrefs/HBRootListController.h> | |||||
@import UIKit; | @import UIKit; | ||||
// image for share button | // image for share button | ||||
#define kImagePath @"/Library/Application Support/ZenithDark/ZNDark.png" | #define kImagePath @"/Library/Application Support/ZenithDark/ZNDark.png" | ||||
// @interface ZNDarkPrefsRootListController : PSListController | |||||
@interface ZNDarkPrefsRootListController : HBRootListController | |||||
@interface ZNDarkPrefsRootListController : PSListController | |||||
@property (nonatomic, strong) UIBlurEffect *respringBlur; | @property (nonatomic, strong) UIBlurEffect *respringBlur; | ||||
@property (nonatomic, strong) UIVisualEffectView *respringEffectView; | @property (nonatomic, strong) UIVisualEffectView *respringEffectView; | ||||
@property (nonatomic, strong) UIWindow *mainAppRootWindow; | @property (nonatomic, strong) UIWindow *mainAppRootWindow; | ||||
- (bool)suspend; | - (bool)suspend; | ||||
- (void)terminate; | - (void)terminate; | ||||
@end | @end | ||||
#import "ZNDarkPrefsRootListController.h" | #import "ZNDarkPrefsRootListController.h" | ||||
#import <CepheiPrefs/HBAppearanceSettings.h> | |||||
#define THEME_COLOR \ | |||||
[UIColor colorWithRed:0.82 \ | |||||
green:0.64 \ | |||||
blue:0.00 \ | |||||
alpha:1.0]; | |||||
@implementation ZNDarkPrefsRootListController | @implementation ZNDarkPrefsRootListController | ||||
+ (UIColor *)hb_tintColor { | |||||
return THEME_COLOR; | |||||
} | |||||
-(void)viewWillAppear:(BOOL)animated { | -(void)viewWillAppear:(BOOL)animated { | ||||
[super viewWillAppear:animated]; | [super viewWillAppear:animated]; | ||||
// share button for our tweak :P | // share button for our tweak :P | ||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(shareTapped)]; | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(shareTapped)]; | ||||
} | |||||
- (void)viewDidLoad { | |||||
[super viewDidLoad]; | |||||
if (@available(iOS 11, *)) { | |||||
self.navigationController.navigationBar.prefersLargeTitles = false; | |||||
self.navigationController.navigationItem.largeTitleDisplayMode = | |||||
UINavigationItemLargeTitleDisplayModeNever; | |||||
} | |||||
} | |||||
- (void)viewDidAppear:(BOOL)animated { | |||||
[super viewDidAppear:animated]; | |||||
if (@available(iOS 11, *)) { | |||||
self.navigationController.navigationBar.prefersLargeTitles = false; | |||||
self.navigationController.navigationItem.largeTitleDisplayMode = | |||||
UINavigationItemLargeTitleDisplayModeNever; | |||||
} | |||||
} | } | ||||
return _specifiers; | return _specifiers; | ||||
} | } | ||||
-(void)followMe { | |||||
NSURL *twitter = [NSURL URLWithString:@"https://twitter.com/mac_user669"]; | |||||
[[UIApplication sharedApplication] openURL:twitter options:@{} completionHandler:nil]; | |||||
} | |||||
-(void)followiKA { | |||||
NSURL *twitter = [NSURL URLWithString:@"https://twitter.com/iKilledAppl3"]; | |||||
[[UIApplication sharedApplication] openURL:twitter options:@{} completionHandler:nil]; | |||||
} | |||||
-(void)followSkitty { | |||||
NSURL *twitter = [NSURL URLWithString:@"https://twitter.com/SkittyBlock"]; | |||||
[[UIApplication sharedApplication] openURL:twitter options:@{} completionHandler:nil]; | |||||
} | |||||
-(void)respring { | -(void)respring { | ||||
NSTask *task = [[[NSTask alloc] init] autorelease]; | NSTask *task = [[[NSTask alloc] init] autorelease]; | ||||
[task setLaunchPath:@"/usr/bin/killall"]; | [task setLaunchPath:@"/usr/bin/killall"]; | ||||
UIAlertController *confirmRespringAlert = [UIAlertController alertControllerWithTitle:@"Apply Settings?" message:@"This will respring your device." preferredStyle:UIAlertControllerStyleActionSheet]; | UIAlertController *confirmRespringAlert = [UIAlertController alertControllerWithTitle:@"Apply Settings?" message:@"This will respring your device." preferredStyle:UIAlertControllerStyleActionSheet]; | ||||
UIAlertAction *confirm = [UIAlertAction actionWithTitle:@"Respring" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) { | UIAlertAction *confirm = [UIAlertAction actionWithTitle:@"Respring" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) { | ||||
[self performSelector:@selector(respring) withObject:nil afterDelay:0.0]; | |||||
// blur then respring our device! | |||||
self.mainAppRootWindow = [UIApplication sharedApplication].keyWindow; | |||||
self.respringBlur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; | |||||
self.respringEffectView = [[UIVisualEffectView alloc] initWithEffect:self.respringBlur]; | |||||
self.respringEffectView.frame = [[UIScreen mainScreen] bounds]; | |||||
[self.mainAppRootWindow addSubview:self.respringEffectView]; | |||||
[UIView beginAnimations:nil context:NULL]; | |||||
[UIView setAnimationDuration:5.0]; | |||||
[self.respringEffectView setAlpha:0]; | |||||
[UIView commitAnimations]; | |||||
[self performSelector:@selector(respring) withObject:nil afterDelay:3.0]; | |||||
}]; | }]; | ||||