BOOL showAll; | BOOL showAll; | ||||
BOOL belowMusic; | BOOL belowMusic; | ||||
BOOL hideDeviceLabel; | BOOL hideDeviceLabel; | ||||
BOOL hideChargingAnimation; | |||||
NSInteger bannerStyle; | NSInteger bannerStyle; | ||||
NSInteger bannerAlign; | NSInteger bannerAlign; | ||||
double spacing; | double spacing; | ||||
bannerAlign = numberForValue(@"bannerAlign", 2); | bannerAlign = numberForValue(@"bannerAlign", 2); | ||||
horizontalOffset = numberForValue(@"horizontalOffset", 0); | horizontalOffset = numberForValue(@"horizontalOffset", 0); | ||||
belowMusic = boolValueForKey(@"belowMusic", NO); | belowMusic = boolValueForKey(@"belowMusic", NO); | ||||
hideChargingAnimation = boolValueForKey(@"hideChargingAnimation", YES); | |||||
if(disableGlyphs) { | if(disableGlyphs) { | ||||
glyphSize = 0; | glyphSize = 0; |
} | } | ||||
%end | %end | ||||
%hook CSBatteryChargingView | |||||
%hook CSCoverSheetViewController | |||||
+(id)batteryChargingViewWithSingleBattery { | |||||
NSLog(@"kai: here bro: %@", [NSThread callStackSymbols]); | |||||
[UIPasteboard generalPasteboard].string = [NSString stringWithFormat:@"kai: here bro: %@", [NSThread callStackSymbols]]; | |||||
return nil; | |||||
} | |||||
+(id)batteryChargingViewWithDoubleBattery { | |||||
NSLog(@"kai: here bro: %@", [NSThread callStackSymbols]); | |||||
[UIPasteboard generalPasteboard].string = [NSString stringWithFormat:@"kai: here bro: %@", [NSThread callStackSymbols]]; | |||||
return nil; | |||||
} | |||||
-(CGFloat)desiredVisibilityDuration { | |||||
return 0; | |||||
} | |||||
-(void)setBatteryVisible:(BOOL)arg1 { | |||||
%orig(NO); | |||||
-(void)_transitionChargingViewToVisible:(BOOL)arg1 showBattery:(BOOL)arg2 animated:(BOOL)arg3 { | |||||
if(hideChargingAnimation) { | |||||
%orig(NO,NO,NO); | |||||
} | |||||
} | } | ||||
%end | %end |
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.burritoz.kaiprefs/reload"), nil, nil, true); | CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.burritoz.kaiprefs/reload"), nil, nil, true); | ||||
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Kai" | UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Kai" | ||||
message:@"Your settings have been applied. You can now go back to your lockscreen (CoverSheet) to see the changes. \n Note the option to put kai below music requires a respring." | |||||
message:@"Your settings have been applied. You can now go back to your lockscreen (CoverSheet) to see the changes. \n Note the option to put kai below music requires a respring, as well as option to hide CoverSheet charge animations." | |||||
preferredStyle:UIAlertControllerStyleAlert]; | preferredStyle:UIAlertControllerStyleAlert]; | ||||
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"Amazing!" style:UIAlertActionStyleDefault | UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"Amazing!" style:UIAlertActionStyleDefault |
<key>label</key> | <key>label</key> | ||||
<string>Enable</string> | <string>Enable</string> | ||||
</dict> | </dict> | ||||
<dict> | |||||
<key>cell</key> | |||||
<string>PSSwitchCell</string> | |||||
<key>default</key> | |||||
<true/> | |||||
<key>defaults</key> | |||||
<string>com.burritoz.kaiprefs</string> | |||||
<key>key</key> | |||||
<string>hideChargingAnimation</string> | |||||
<key>label</key> | |||||
<string>Hide CoverSheet Charging Animations</string> | |||||
</dict> | |||||
<dict> | <dict> | ||||
<key>cell</key> | <key>cell</key> | ||||
<string>PSGroupCell</string> | <string>PSGroupCell</string> |