1
0
mirror of https://github.com/Burrit0z/kai synced 2025-07-01 04:46:47 +00:00

done for today

This commit is contained in:
Burrit0z
2020-05-20 19:09:09 -04:00
parent b461e525f5
commit 1be4720daa
4 changed files with 20 additions and 20 deletions

2
Kai.h
View File

@ -49,6 +49,7 @@ BOOL hidePercent;
BOOL showAll;
BOOL belowMusic;
BOOL hideDeviceLabel;
BOOL hideChargingAnimation;
NSInteger bannerStyle;
NSInteger bannerAlign;
double spacing;
@ -120,6 +121,7 @@ static void preferencesChanged()
bannerAlign = numberForValue(@"bannerAlign", 2);
horizontalOffset = numberForValue(@"horizontalOffset", 0);
belowMusic = boolValueForKey(@"belowMusic", NO);
hideChargingAnimation = boolValueForKey(@"hideChargingAnimation", YES);
if(disableGlyphs) {
glyphSize = 0;

24
Kai.xm
View File

@ -103,26 +103,12 @@
}
%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

View File

@ -70,7 +70,7 @@ NSBundle *tweakBundle;
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.burritoz.kaiprefs/reload"), nil, nil, true);
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];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"Amazing!" style:UIAlertActionStyleDefault

View File

@ -24,6 +24,18 @@
<key>label</key>
<string>Enable</string>
</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>
<key>cell</key>
<string>PSGroupCell</string>