testing, don't compile for usage

This commit is contained in:
MPG13 2018-07-05 00:57:08 -06:00
parent 27954644d7
commit a762b5eb29
70 changed files with 71 additions and 667 deletions

View file

@ -1,12 +0,0 @@
Package: com.mpg13.undertime
Name: UnderTime
Depends: mobilesubstrate
Architecture: iphoneos-arm
Description: Customizable date under time in iX StatusBar.
Homepage: https://mpg13.github.io
Depiction: https://mpg13.github.io/repo/depicts/undertime.html
Maintainer: MPG13 <micahplacido@gmail.com>
Author: MPG13 <micahplacido@gmail.com>
Section: Tweaks
Version: 1.3.1-1+debug
Installed-Size: 192

View file

@ -1,5 +0,0 @@
{
Filter = {
Classes = ( "_UIStatusBarStringView", "_UIStatusBarTimeItem", "_UIStatusBarNavigationItem" );
};
}

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>UnderTime</string>
<key>CFBundleIdentifier</key>
<string>com.mpg13.undertime</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSPrincipalClass</key>
<string>udtRootListController</string>
</dict>
</plist>

View file

@ -1,173 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>cell</key>
<string>PSStaticTextCell</string>
<key>height</key>
<string>45</string>
<key>label</key>
<string>UnderTime</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<true/>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>Enable</string>
<key>label</key>
<string>Enable tweak</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>First Line</string>
<key>height</key>
<string>10</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>lineOneEnable</string>
<key>label</key>
<string>Custom First Line</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>lineOneStandard</string>
<key>label</key>
<string>First Line Standard String</string>
</dict>
<dict>
<key>cell</key>
<string>PSEditTextCell</string>
<key>default</key>
<string>h:m</string>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>lineOne</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>replaceTime</string>
<key>label</key>
<string>First Line Only</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Second Line</string>
<key>height</key>
<string>10</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>lineTwoStandard</string>
<key>label</key>
<string>Second Line Standard String</string>
</dict>
<dict>
<key>cell</key>
<string>PSEditTextCell</string>
<key>default</key>
<string>d/M</string>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>lineTwo</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Use nsdateformatter.com to help you format your date!</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Font Size</string>
<key>height</key>
<string>10</string>
</dict>
<dict>
<key>cell</key>
<string>PSSliderCell</string>
<key>default</key>
<integer>12</integer>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>sizeOfFont</string>
<key>max</key>
<real>18</real>
<key>min</key>
<real>6</real>
<key>showValue</key>
<true/>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string> </string>
<key>height</key>
<string>10</string>
</dict>
<dict>
<key>action</key>
<string>respring</string>
<key>height</key>
<string>30</string>
<key>cell</key>
<string>PSButtonCell</string>
<key>label</key>
<string>Respring</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Developed partially by MPG13 | Forked from NeinZedd's "DateUnderTimeX"</string>
</dict>
</array>
<key>title</key>
<string>UnderTime</string>
</dict>
</plist>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 B

View file

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>entry</key>
<dict>
<key>bundle</key>
<string>UnderTime</string>
<key>cell</key>
<string>PSLinkCell</string>
<key>detail</key>
<string>udtRootListController</string>
<key>icon</key>
<string>icon.png</string>
<key>isController</key>
<true/>
<key>label</key>
<string>UnderTime</string>
</dict>
</dict>
</plist>

View file

@ -1 +1 @@
./packages/com.mpg13.undertime_1.3.1-1+debug_iphoneos-arm.deb
./packages/com.mpg13.undertime_1.4-32+debug_iphoneos-arm.deb

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>UnderTime</string>
<key>CFBundleIdentifier</key>
<string>com.mpg13.undertime</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSPrincipalClass</key>
<string>udtRootListController</string>
</dict>
</plist>

View file

@ -1,173 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>cell</key>
<string>PSStaticTextCell</string>
<key>height</key>
<string>45</string>
<key>label</key>
<string>UnderTime</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<true/>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>Enable</string>
<key>label</key>
<string>Enable tweak</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>First Line</string>
<key>height</key>
<string>10</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>lineOneEnable</string>
<key>label</key>
<string>Custom First Line</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>lineOneStandard</string>
<key>label</key>
<string>First Line Standard String</string>
</dict>
<dict>
<key>cell</key>
<string>PSEditTextCell</string>
<key>default</key>
<string>h:m</string>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>lineOne</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>replaceTime</string>
<key>label</key>
<string>First Line Only</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Second Line</string>
<key>height</key>
<string>10</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>lineTwoStandard</string>
<key>label</key>
<string>Second Line Standard String</string>
</dict>
<dict>
<key>cell</key>
<string>PSEditTextCell</string>
<key>default</key>
<string>d/M</string>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>lineTwo</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Use nsdateformatter.com to help you format your date!</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Font Size</string>
<key>height</key>
<string>10</string>
</dict>
<dict>
<key>cell</key>
<string>PSSliderCell</string>
<key>default</key>
<integer>12</integer>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>sizeOfFont</string>
<key>max</key>
<real>18</real>
<key>min</key>
<real>6</real>
<key>showValue</key>
<true/>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string> </string>
<key>height</key>
<string>10</string>
</dict>
<dict>
<key>action</key>
<string>respring</string>
<key>height</key>
<string>30</string>
<key>cell</key>
<string>PSButtonCell</string>
<key>label</key>
<string>Respring</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Developed partially by MPG13 | Forked from NeinZedd's "DateUnderTimeX"</string>
</dict>
</array>
<key>title</key>
<string>UnderTime</string>
</dict>
</plist>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

View file

@ -1,17 +0,0 @@
/home/mpg13/DateUnderTimeX/.theos/obj/debug/arm64/Tweak.xm.c666351f.o: \
/home/mpg13/DateUnderTimeX/.theos/obj/debug/arm64/Tweak.xm.mm \
/home/mpg13/theos/Prefix.pch \
/home/mpg13/theos/vendor/include/_Prefix/BackwardsCompat.h \
/home/mpg13/theos/vendor/include/_Prefix/IOSMacros.h \
/home/mpg13/DateUnderTimeX/important.h \
/home/mpg13/theos/vendor/include/substrate.h
/home/mpg13/theos/Prefix.pch:
/home/mpg13/theos/vendor/include/_Prefix/BackwardsCompat.h:
/home/mpg13/theos/vendor/include/_Prefix/IOSMacros.h:
/home/mpg13/DateUnderTimeX/important.h:
/home/mpg13/theos/vendor/include/substrate.h:

View file

@ -1,122 +0,0 @@
#line 1 "Tweak.xm"
#import "important.h"
#import <spawn.h>
@interface _UIStatusBarStringView : UIView
@property (copy) NSString *text;
@property NSInteger numberOfLines;
@property (copy) UIFont *font;
@property NSInteger textAlignment;
@end
int sizeOfFont = GetPrefInt(@"sizeOfFont");
#include <substrate.h>
#if defined(__clang__)
#if __has_feature(objc_arc)
#define _LOGOS_SELF_TYPE_NORMAL __unsafe_unretained
#define _LOGOS_SELF_TYPE_INIT __attribute__((ns_consumed))
#define _LOGOS_SELF_CONST const
#define _LOGOS_RETURN_RETAINED __attribute__((ns_returns_retained))
#else
#define _LOGOS_SELF_TYPE_NORMAL
#define _LOGOS_SELF_TYPE_INIT
#define _LOGOS_SELF_CONST
#define _LOGOS_RETURN_RETAINED
#endif
#else
#define _LOGOS_SELF_TYPE_NORMAL
#define _LOGOS_SELF_TYPE_INIT
#define _LOGOS_SELF_CONST
#define _LOGOS_RETURN_RETAINED
#endif
@class _UIStatusBarTimeItem; @class _UIStatusBarStringView; @class _UIStatusBarBackgroundActivityView;
static void (*_logos_orig$_ungrouped$_UIStatusBarStringView$setText$)(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarStringView* _LOGOS_SELF_CONST, SEL, NSString *); static void _logos_method$_ungrouped$_UIStatusBarStringView$setText$(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarStringView* _LOGOS_SELF_CONST, SEL, NSString *); static id (*_logos_orig$_ungrouped$_UIStatusBarTimeItem$applyUpdate$toDisplayItem$)(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarTimeItem* _LOGOS_SELF_CONST, SEL, id, id); static id _logos_method$_ungrouped$_UIStatusBarTimeItem$applyUpdate$toDisplayItem$(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarTimeItem* _LOGOS_SELF_CONST, SEL, id, id); static void (*_logos_orig$_ungrouped$_UIStatusBarBackgroundActivityView$setCenter$)(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarBackgroundActivityView* _LOGOS_SELF_CONST, SEL, CGPoint); static void _logos_method$_ungrouped$_UIStatusBarBackgroundActivityView$setCenter$(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarBackgroundActivityView* _LOGOS_SELF_CONST, SEL, CGPoint);
#line 13 "Tweak.xm"
static void _logos_method$_ungrouped$_UIStatusBarStringView$setText$(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarStringView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, NSString * text) {
if(GetPrefBool(@"Enable") && ![text containsString:@"%"] && ![text containsString:@"1x"] && ![text containsString:@"LTE"] && ![text containsString:@"4G"] && ![text containsString:@"3G"] && ![text containsString:@"2G"]) {
NSString *lineTwo = GetPrefString(@"lineTwo");
NSString *lineOne = GetPrefString(@"lineOne");
NSString *timeLineTwo = lineTwo;
NSString *timeLineOne = lineOne;
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
NSDate *now = [NSDate date];
if(!GetPrefBool(@"lineTwoStandard")){
[dateFormatter setDateFormat:lineTwo];
timeLineTwo = [dateFormatter stringFromDate:now];
timeLineTwo = [timeLineTwo substringToIndex:[timeLineTwo length]];
}
if(!GetPrefBool(@"lineOneStandard")){
[dateFormatter setDateFormat:lineOne];
timeLineOne = [dateFormatter stringFromDate:now];
timeLineOne = [timeLineOne substringToIndex:[timeLineOne length]];
}
NSString *newString;
if(GetPrefBool(@"lineOneEnable")){
newString = [NSString stringWithFormat:@"%@\n%@", timeLineOne, timeLineTwo];
}
else{
newString = [NSString stringWithFormat:@"%@\n%@", text, timeLineTwo];
}
[self setFont: [self.font fontWithSize:sizeOfFont]];
if(GetPrefBool(@"replaceTime")){
_logos_orig$_ungrouped$_UIStatusBarStringView$setText$(self, _cmd, timeLineOne);
}
else{
self.textAlignment = 1;
self.numberOfLines = 2;
_logos_orig$_ungrouped$_UIStatusBarStringView$setText$(self, _cmd, newString);
}
}
else {
_logos_orig$_ungrouped$_UIStatusBarStringView$setText$(self, _cmd, text);
}
}
@interface _UIStatusBarTimeItem
@property (copy) _UIStatusBarStringView *shortTimeView;
@property (copy) _UIStatusBarStringView *pillTimeView;
@end
static id _logos_method$_ungrouped$_UIStatusBarTimeItem$applyUpdate$toDisplayItem$(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarTimeItem* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, id arg1, id arg2) {
id returnThis = _logos_orig$_ungrouped$_UIStatusBarTimeItem$applyUpdate$toDisplayItem$(self, _cmd, arg1, arg2);
if(GetPrefBool(@"Enable")) {
[self.shortTimeView setFont: [self.shortTimeView.font fontWithSize:sizeOfFont]];
[self.pillTimeView setFont: [self.pillTimeView.font fontWithSize:sizeOfFont]];
}
return returnThis;
}
@interface _UIStatusBarBackgroundActivityView : UIView
@property (copy) CALayer *pulseLayer;
@end
static void _logos_method$_ungrouped$_UIStatusBarBackgroundActivityView$setCenter$(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarBackgroundActivityView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, CGPoint point) {
if(GetPrefBool(@"Enable") && !GetPrefBool(@"replaceTime")){
point.y = 11;
self.frame = CGRectMake(0, 0, self.frame.size.width, 31);
self.pulseLayer.frame = CGRectMake(0, 0, self.frame.size.width, 31);
_logos_orig$_ungrouped$_UIStatusBarBackgroundActivityView$setCenter$(self, _cmd, point);
}
}
static __attribute__((constructor)) void _logosLocalInit() {
{Class _logos_class$_ungrouped$_UIStatusBarStringView = objc_getClass("_UIStatusBarStringView"); MSHookMessageEx(_logos_class$_ungrouped$_UIStatusBarStringView, @selector(setText:), (IMP)&_logos_method$_ungrouped$_UIStatusBarStringView$setText$, (IMP*)&_logos_orig$_ungrouped$_UIStatusBarStringView$setText$);Class _logos_class$_ungrouped$_UIStatusBarTimeItem = objc_getClass("_UIStatusBarTimeItem"); MSHookMessageEx(_logos_class$_ungrouped$_UIStatusBarTimeItem, @selector(applyUpdate:toDisplayItem:), (IMP)&_logos_method$_ungrouped$_UIStatusBarTimeItem$applyUpdate$toDisplayItem$, (IMP*)&_logos_orig$_ungrouped$_UIStatusBarTimeItem$applyUpdate$toDisplayItem$);Class _logos_class$_ungrouped$_UIStatusBarBackgroundActivityView = objc_getClass("_UIStatusBarBackgroundActivityView"); MSHookMessageEx(_logos_class$_ungrouped$_UIStatusBarBackgroundActivityView, @selector(setCenter:), (IMP)&_logos_method$_ungrouped$_UIStatusBarBackgroundActivityView$setCenter$, (IMP*)&_logos_orig$_ungrouped$_UIStatusBarBackgroundActivityView$setCenter$);} }
#line 94 "Tweak.xm"

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.UnderTime</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.UnderTime.dylib</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View file

@ -1,19 +0,0 @@
/home/mpg13/DateUnderTimeX/.theos/obj/debug/arm64/UnderTimeRootListController.m.adc5d2ae.o: \
UnderTimeRootListController.m /home/mpg13/theos/Prefix.pch \
/home/mpg13/theos/vendor/include/_Prefix/BackwardsCompat.h \
/home/mpg13/theos/vendor/include/_Prefix/IOSMacros.h \
UnderTimeRootListController.h \
/home/mpg13/theos/vendor/include/Preferences/PSListController.h \
/home/mpg13/theos/vendor/include/Preferences/PSViewController.h
/home/mpg13/theos/Prefix.pch:
/home/mpg13/theos/vendor/include/_Prefix/BackwardsCompat.h:
/home/mpg13/theos/vendor/include/_Prefix/IOSMacros.h:
UnderTimeRootListController.h:
/home/mpg13/theos/vendor/include/Preferences/PSListController.h:
/home/mpg13/theos/vendor/include/Preferences/PSViewController.h:

View file

@ -1,19 +0,0 @@
/home/mpg13/UnderTime/.theos/obj/debug/arm64/udtRootListController.m.b4efe98b.o: \
udtRootListController.m /home/mpg13/theos/Prefix.pch \
/home/mpg13/theos/vendor/include/_Prefix/BackwardsCompat.h \
/home/mpg13/theos/vendor/include/_Prefix/IOSMacros.h \
udtRootListController.h \
/home/mpg13/theos/vendor/include/Preferences/PSListController.h \
/home/mpg13/theos/vendor/include/Preferences/PSViewController.h
/home/mpg13/theos/Prefix.pch:
/home/mpg13/theos/vendor/include/_Prefix/BackwardsCompat.h:
/home/mpg13/theos/vendor/include/_Prefix/IOSMacros.h:
udtRootListController.h:
/home/mpg13/theos/vendor/include/Preferences/PSListController.h:
/home/mpg13/theos/vendor/include/Preferences/PSViewController.h:

View file

@ -1 +1 @@
1
4

View file

@ -0,0 +1 @@
32

View file

@ -5,6 +5,7 @@ include $(THEOS)/makefiles/common.mk
TWEAK_NAME = UnderTime
UnderTime_FILES = Tweak.xm
UnderTime_FRAMEWORKS = UIKit
include $(THEOS_MAKE_PATH)/tweak.mk

View file

@ -9,17 +9,20 @@
@end
int sizeOfFont = GetPrefInt(@"sizeOfFont");
NSString *lineTwo = GetPrefString(@"lineTwo");
NSString *lineOne = GetPrefString(@"lineOne");
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
%hook _UIStatusBarStringView
- (void)setText:(NSString *)text {
if(GetPrefBool(@"Enable") && ![text containsString:@"%"] && ![text containsString:@"1x"] && ![text containsString:@"LTE"] && ![text containsString:@"4G"] && ![text containsString:@"3G"] && ![text containsString:@"2G"]) {
NSString *lineTwo = GetPrefString(@"lineTwo");
NSString *lineOne = GetPrefString(@"lineOne");
if(GetPrefBool(@"Enable") && ![text containsString:@"%"] && ![text containsString:@"1x"] && ![text containsString:@"LTE"] && ![text containsString:@"4G"] && ![text containsString:@"3G"] && ![text containsString:@"2G"] && ![text containsString:@"EDGE"]) {
NSString *timeLineTwo = lineTwo;
NSString *timeLineOne = lineOne;
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
NSDate *now = [NSDate date];
if(!GetPrefBool(@"lineTwoStandard")){
[dateFormatter setDateFormat:lineTwo];
@ -56,23 +59,38 @@ int sizeOfFont = GetPrefInt(@"sizeOfFont");
%end
@interface _UIStatusBarTimeItem
@interface _UIStatusBarTimeItem : UIView
@property (copy) _UIStatusBarStringView *shortTimeView;
@property (copy) _UIStatusBarStringView *pillTimeView;
@property (nonatomic, retain) NSTimer *nz9_seconds_timer;
@end
%hook _UIStatusBarTimeItem
%property (nonatomic, retain) NSTimer *nz9_seconds_timer;
- (instancetype)init {
%orig;
if(GetPrefBool(@"Enable") && ((!GetPrefBool(@"lineTwoStandard") && [lineTwo containsString:@"s"]) || (!GetPrefBool(@"lineOneStandard") && [lineOne containsString:@"s"]))) {
self.nz9_seconds_timer = [NSTimer scheduledTimerWithTimeInterval:1.0 repeats:YES block:^(NSTimer *timer) {
self.shortTimeView.text = @":";
self.pillTimeView.text = @":";
[self.shortTimeView setFont: [self.shortTimeView.font fontWithSize:sizeOfFont]];
[self.pillTimeView setFont: [self.pillTimeView.font fontWithSize:sizeOfFont]];
}];
}
return self;
}
- (id)applyUpdate:(id)arg1 toDisplayItem:(id)arg2 {
id returnThis = %orig;
if(GetPrefBool(@"Enable")) {
[self.shortTimeView setFont: [self.shortTimeView.font fontWithSize:sizeOfFont]];
[self.pillTimeView setFont: [self.pillTimeView.font fontWithSize:sizeOfFont]];
}
[self.shortTimeView setFont: [self.shortTimeView.font fontWithSize:sizeOfFont]];
[self.pillTimeView setFont: [self.pillTimeView.font fontWithSize:sizeOfFont]];
return returnThis;
}
%end
@interface _UIStatusBarBackgroundActivityView : UIView
@property (copy) CALayer *pulseLayer;
@end
@ -88,6 +106,20 @@ int sizeOfFont = GetPrefInt(@"sizeOfFont");
}
}
%end
%hook _UIStatusBarIndicatorLocationItem
- (id)applyUpdate:(id)arg1 toDisplayItem:(id)arg2 {
return nil;
}
%end
%ctor {
dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.dateStyle = NSDateFormatterNoStyle;
dateFormatter.timeStyle = NSDateFormatterMediumStyle;
dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
%init;
}

View file

@ -1,5 +1,6 @@
{
Filter = {
Classes = ( "_UIStatusBarStringView", "_UIStatusBarTimeItem", "_UIStatusBarNavigationItem" );
};
Filter = {
Classes = ( "_UIStatusBarStringView", "_UIStatusBarTimeItem", "_UIStatusBarNavigationItem" );
Bundles = ( "com.apple.UIKit" );
};
}

View file

@ -1,7 +1,7 @@
Package: com.mpg13.undertime
Name: UnderTime
Depends: mobilesubstrate
Version: 1.3.1
Version: 1.4
Architecture: iphoneos-arm
Description: Customizable date under time in iX StatusBar.
Homepage: https://mpg13.github.io

View file

@ -24,6 +24,18 @@
<key>label</key>
<string>Enable tweak</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<true/>
<key>defaults</key>
<string>com.mpg13.undertime</string>
<key>key</key>
<string>hideLocInd</string>
<key>label</key>
<string>Hide Location Indicator</string>
</dict>
<dict>
<key>cell</key>
@ -116,6 +128,12 @@
<key>label</key>
<string>Use nsdateformatter.com to help you format your date!</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Seconds will not update on the lockscreen!</string>
</dict>
<dict>
<key>cell</key>
@ -164,7 +182,7 @@
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Developed partially by MPG13 | Forked from NeinZedd's "DateUnderTimeX"</string>
<string>Developed partially by MPG13 | Forked from NeinZedd's "DateUnderTimeX" and "SecondsInTimeX". Thanks NZ9!</string>
</dict>
</array>
<key>title</key>