├── .gitignore ├── Makefile ├── README.md ├── Tweak.xm ├── Zen.plist ├── control ├── preview.jpg └── theos /.gitignore: -------------------------------------------------------------------------------- 1 | .theos 2 | _ 3 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TARGET=iphone:clang:8.4 2 | ARCHS = armv7 armv7s arm64 3 | 4 | include theos/makefiles/common.mk 5 | 6 | TWEAK_NAME = Zen 7 | Zen_FILES = Tweak.xm 8 | Zen_FRAMEWORKS = UIKit 9 | 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | 12 | after-install:: 13 | install.exec "killall -9 SpringBoard" 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Zen 2 | 3 | ## What it is 4 | A "theme tweak" for a minimal look of iOS 5 | 6 | ## Requirements 7 | 8 | This tweak is optimal 9 | - iOS 9.0.2 jailbroken 10 | - iPhone 5, 5s or SE (spacing on icons are optimised for this) 11 | 12 | Also confirmed to work on 7.0.2/5C and 8.4/5S. 13 | 14 | 15 | ## How it looks like 16 | Looks something like this, but better on the actual device. 17 | 18 | ![](preview.jpg) 19 | 20 | ## How to get it 21 | 22 | Either download this repo and compile with theos. Or add this repo in Cydia and install the package http://www.jontelang.com/repo 23 | -------------------------------------------------------------------------------- /Tweak.xm: -------------------------------------------------------------------------------- 1 | // 2 | // Just some headers 3 | // 4 | 5 | @interface SBApplication 6 | -(NSString*)bundleIdentifier; 7 | @end 8 | 9 | @interface SpringBoard 10 | +(id)sharedInstance; 11 | -(SBApplication*)_accessibilityFrontMostApplication; 12 | -(void)clearMenuButtonTimer; 13 | @end 14 | 15 | @interface SBLockScreenManager 16 | +(id)sharedInstance; 17 | -(BOOL)isUILocked; 18 | @end 19 | 20 | @interface UIStatusBar 21 | -(void)setForegroundColor:(UIColor *)arg1; 22 | @end 23 | 24 | @interface SBLockScreenView 25 | -(UIView*)cameraGrabberView; 26 | @end 27 | 28 | @interface SBIconListPageControl : UIView 29 | // Just so we can use self.hidden further down 30 | @end 31 | 32 | 33 | 34 | %hook UIStatusBar 35 | 36 | -(void)layoutSubviews{ 37 | // Do what you need 38 | %orig(); 39 | 40 | // Make sure we're running inside SpringBoard (not in some app). 41 | // Could use -- IS_SPRINGBOARD or BUNDLE CHECKS -- as well 42 | SpringBoard *c = (SpringBoard*)[objc_getClass("SpringBoard") sharedApplication]; 43 | if( c != nil ){ 44 | // Check if we're in an app or on springboard 45 | NSString *identifier = [[c _accessibilityFrontMostApplication] bundleIdentifier]; 46 | BOOL springboardIsTopMostApp = identifier == nil ? YES : NO; 47 | 48 | // Check if we're locked or not. Because if we locked while in an app, the status bar 49 | // from that app is still showing on the lock screen since lockscreen is only like 50 | // and SBAlert on top of the .... ios ... maybe? 51 | SBLockScreenManager *lsm = [objc_getClass("SBLockScreenManager") sharedInstance]; 52 | 53 | // Debug 54 | // NSLog(@"---"); 55 | // NSLog(@"In Springboard process - %@", c?@"YES":@"NO" ); 56 | // NSLog(@"Inside app - %@", springboardIsTopMostApp?@"NO":@"YES"); 57 | // NSLog(@"Inside home screen - %@", springboardIsTopMostApp?@"YES":@"NO"); 58 | // NSLog(@"Locked - %@", [lsm isUILocked]?@"YES":@"NO"); 59 | // NSLog(@"---"); 60 | 61 | // Do them checks 62 | if( springboardIsTopMostApp || [lsm isUILocked] ){ 63 | [self setForegroundColor:[UIColor clearColor]]; 64 | }else{ 65 | // Does orig. I.e. shows the status bar. 66 | } 67 | } 68 | 69 | else{ 70 | // If we're in some app, make the status bar its default state (does orig). 71 | } 72 | } 73 | 74 | %end 75 | 76 | 77 | %hook SBIconView 78 | 79 | // Gone. 80 | +(BOOL)canShowLabelAccessoryView{ 81 | return NO; 82 | } 83 | 84 | // Move the badge to the bottom center of the icon. 85 | // This affects the "beta" and "new" accesoryviews as well. But it's ok. Since above we disabled them. 86 | -(CGRect)_frameForAccessoryView{ 87 | CGRect orig = %orig(); 88 | orig.size.width = 6; 89 | orig.size.height = 6; 90 | orig.origin.y = orig.origin.x - 1.5f; 91 | orig.origin.x = (orig.origin.x / 2.0f) - (orig.size.width / 2.0f) - 2.0f; 92 | return orig; 93 | } 94 | 95 | %end 96 | 97 | 98 | %hook SBIconBadgeView 99 | 100 | // Makes the badge content empty 101 | +(id)_createImageForText:(id)arg1 highlighted:(_Bool)arg2{ 102 | return %orig(@" ",arg2); 103 | } 104 | 105 | %end 106 | 107 | 108 | %hook SBIconLabelView 109 | 110 | // Removes the label 111 | +(id)newIconLabelViewWithSettings:(id)arg1 imageParameters:(id)arg2{ 112 | return nil; 113 | } 114 | 115 | %end 116 | 117 | 118 | %hook SBDockView 119 | 120 | // Removes the dock background 121 | -(void)setBackgroundAlpha:(double)arg1{ 122 | %orig(0.0); 123 | } 124 | 125 | %end 126 | 127 | 128 | %hook SBFStaticWallpaperView 129 | 130 | // Makes the background black. 131 | -(id)_displayedImage{ 132 | return nil; 133 | } 134 | 135 | %end 136 | 137 | 138 | %hook SBLockScreenView 139 | 140 | -(id)_defaultSlideToUnlockText{ 141 | return nil; 142 | } 143 | 144 | -(void)_layoutSlideToUnlockView{ 145 | // Do nothing 146 | } 147 | 148 | -(void)_addGrabberViews{ 149 | // Do nothing. This doesn't seem to work. 150 | } 151 | 152 | -(void)_layoutCameraGrabberView{ 153 | %orig(); 154 | UIView *grabber = [self cameraGrabberView]; 155 | grabber.alpha = 0.011f; 156 | } 157 | 158 | -(UIView*)cameraGrabberView{ 159 | %log; 160 | UIView *grabber = %orig(); 161 | grabber.alpha = 0.011f; // Almost invisible, but over 0.01 will still render 162 | return grabber; 163 | } 164 | 165 | %end 166 | 167 | 168 | %hook SBFLockScreenDateView 169 | 170 | // Moves the time area down to center it 171 | -(double)timeBaselineOffsetFromOrigin{ 172 | return -80.0; 173 | } 174 | 175 | %end 176 | 177 | 178 | %hook SBLockScreenNotificationListView 179 | 180 | -(void)layoutSubviews{ 181 | %orig; 182 | 183 | // Move the notification view down to below the time 184 | UIView *containerView = MSHookIvar(self, "_containerView"); 185 | CGRect frame = containerView.frame; 186 | frame.origin.y = 330.0f; 187 | frame.size.height = 238.0f; // sum = 568 188 | [containerView setFrame:frame]; 189 | } 190 | 191 | %end 192 | 193 | 194 | %hook SBLockScreenViewController 195 | 196 | -(void)_addBatteryChargingViewAndShowBattery:(BOOL)arg1{ 197 | // Do nothing to prevent the battery charge level on the LS 198 | // when you unlock the device. I want to move it but.. meh 199 | } 200 | 201 | // Uncomment this to disable the timer on the LS. Good for dev. 202 | // -(BOOL)_disableIdleTimer:(BOOL)arg1{ 203 | // return %orig(YES); 204 | // } 205 | 206 | %end 207 | 208 | 209 | %hook SBIconListPageControl 210 | 211 | // Removes the dots 212 | -(void)layoutSubviews { 213 | self.hidden = YES; 214 | } 215 | 216 | %end 217 | 218 | 219 | %hook SBSearchBlurEffectView 220 | 221 | -(void)layoutSubviews{ 222 | // Removes some background on the spotligh thing. 223 | } 224 | 225 | %end 226 | 227 | 228 | %hook SBRootIconListView 229 | 230 | // 231 | // The following methods tightens up the spacing between icons on home screen 232 | // 233 | 234 | -(double)bottomIconInset{ 235 | return 60.0f; 236 | } 237 | 238 | -(double)topIconInset{ 239 | return 0.0f; 240 | } 241 | 242 | -(CGFloat)sideIconInset{ 243 | return 20.0f; 244 | } 245 | 246 | %end 247 | 248 | -------------------------------------------------------------------------------- /Zen.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard", "com.apple.UIKit" ); }; } 2 | -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.jontelang.zen 2 | Name: Zen 3 | Depends: mobilesubstrate 4 | Version: 0.0.1 5 | Architecture: iphoneos-arm 6 | Description: Its like a theme, I guess 7 | Maintainer: Jonathan Winger-lang 8 | Author: Jonathan Winger-lang 9 | Section: Tweaks 10 | -------------------------------------------------------------------------------- /preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontelang/Zen/8b1b7c2c09badd39d88d7fae151003ab574b7a82/preview.jpg -------------------------------------------------------------------------------- /theos: -------------------------------------------------------------------------------- 1 | /opt/theos --------------------------------------------------------------------------------