Skip to content

Instantly share code, notes, and snippets.

View LacertosusRepo's full-sized avatar
🏂
Working hard (kinda)

LacertosusDeus LacertosusRepo

🏂
Working hard (kinda)
View GitHub Profile
@LacertosusRepo
LacertosusRepo / notifications.m
Last active March 11, 2021 06:53 — forked from cppforlife/gist:3731520
Log local notifications.
void printNotification(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) {
if([(__bridge NSString *)name containsString:@"UIViewAnimation"]) {
return;
}
os_log(OS_LOG_DEFAULT, "name: %@\ninfo: %@\ncenter: %@", name, userInfo, center);
}
%ctor {
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), NULL, printNotification, NULL, NULL, CFNotificationSuspensionBehaviorDeliverImmediately);
@LacertosusRepo
LacertosusRepo / CustomTemplate.md
Last active September 18, 2021 21:10
Creating your own Thoes NIC template
  1. Get the desired existing NIC template from $THEOS/vendor/templates, for example iphone_tweak.nic.tar

  2. Unpack the files from the template into a different folder such as ~/custom_tweak_template

  3. Make any modifications to the existing files or add new ones, you can use different variables that will be replaced with info entered in the NIC prompt:

Variable Description
@@USER@@ Author
//then in your .plist file you need to add some properties to your PSSwitchCell and don't forget to add the XXXSwitchCell.m file to your makefile
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>cellClass</key> #Add the key cellClass and set it to your custom switch subclass
<string>XXXSwitchCell</string>
<key>switchColor</key> #Add the key switchColor and set your wanted hex color, defaults to #FFFFFF
<string>#800080</string>
<key>switchColorAlpha</key> #Add the key switchColorAlpha and set your wanted alpha for the color, defaults to 1.0
<real>1.0</real>
@interface UITableViewLabel : UILabel
@end
%hook SettingsTableViewCell
-(id)textLabel {
UITableViewLabel *label = %orig;
if([label.text isEqualToString:@"Your Account"]) {
label.text = @"Custom Text Here";
}
@LacertosusRepo
LacertosusRepo / HiddenClockTweak.xm
Last active May 1, 2019 23:59
Hide the clock/subtitle on the lockscreen and notification center
@interface SBFLockScreenDateView : UIView
@property (assign,getter=isSubtitleHidden,nonatomic) BOOL subtitleHidden;
@end
%hook SBFLockScreenDateView
-(void)_updateLabels {
%orig;
//Hides just the subtitle
self.subtitleHidden = YES;
//Hides everything