Update V2.0

This commit is contained in:
exoticswingset
2020-01-03 00:18:09 -05:00
committed by GitHub
parent 01a469ff49
commit 2449378a84
9 changed files with 210 additions and 4 deletions

View File

@ -0,0 +1,15 @@
include ~/theos/makefiles/common.mk
ARCHS = arm64e arm64 armv7 armv7s
BUNDLE_NAME = TruthfulDockPrefs
TruthfulDockPrefs_FILES = TDPRootListController.m
TruthfulDockPrefs_INSTALL_PATH = /Library/PreferenceBundles
TruthfulDockPrefs_FRAMEWORKS = UIKit
TruthfulDockPrefs_PRIVATE_FRAMEWORKS = Preferences
TruthfulDockPrefs_CFLAGS = -fobjc-arc
include ~/theos/makefiles/bundle.mk
internal-stage::
$(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END)
$(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/TruthfulDockPrefs.plist$(ECHO_END)

View File

@ -0,0 +1,24 @@
<?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>TruthfulDockPrefs</string>
<key>CFBundleIdentifier</key>
<string>com.exoticswingset.truthfuldockprefs</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>TDPRootListController</string>
</dict>
</plist>

View File

@ -0,0 +1,93 @@
<?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>PSGroupCell</string>
<key>label</key>
<string>General</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<true/>
<key>defaults</key>
<string>com.exoticswingset.truthfuldockprefs</string>
<key>key</key>
<string>isTweakEnabled</string>
<key>label</key>
<string>Enabled</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Classic Dock (for notched devices)</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.exoticswingset.truthfuldockprefs</string>
<key>key</key>
<string>classicDockEnabled</string>
<key>label</key>
<string>Enabled</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Custom Dock Opacity</string>
</dict>
<dict>
<key>cell</key>
<string>PSSliderCell</string>
<key>default</key>
<real>0</real>
<key>defaults</key>
<string>com.exoticswingset.truthfuldockprefs</string>
<key>key</key>
<string>alphaValue</string>
<key>min</key>
<real>0</real>
<key>max></key>
<real>1</real>
<key>showValue</key>
<true/>
<key>label</key>
<string>Set Dock Opacity</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Save Settings</string>
</dict>
<dict>
<key>cell</key>
<string>PSButtonCell</string>
<key>label</key>
<string>Respring</string>
<key>action</key>
<string>respring</string>
</dict>
</array>
<key>title</key>
<string>TruthfulDock</string>
</dict>
</plist>

View File

@ -0,0 +1,5 @@
#import <Preferences/PSListController.h>
@interface TDPRootListController : PSListController
@end

View File

@ -0,0 +1,23 @@
#include "TDPRootListController.h"
#import <spawn.h>
@implementation TDPRootListController
- (NSArray *)specifiers {
if (!_specifiers) {
_specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self];
}
return _specifiers;
}
- (void)respring
{
pid_t pid;
int status;
const char* args[] = {"killall", "-9", "backboardd", NULL};
posix_spawn(&pid, "/usr/bin/killall", NULL, NULL, (char* const*)args, NULL);
waitpid(pid, &status, WEXITED);
}
@end

View File

@ -0,0 +1,21 @@
<?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>TruthfulDockPrefs</string>
<key>cell</key>
<string>PSLinkCell</string>
<key>detail</key>
<string>TDPRootListController</string>
<key>icon</key>
<string>icon.png</string>
<key>isController</key>
<true/>
<key>label</key>
<string>TruthfulDockPrefs</string>
</dict>
</dict>
</plist>