[Release] DarkModeToggle - enable/disable specific tweaks when toggling dark mode
v1.2 - I always update all of my posts with the latest information from any subsequent updates to this tweak. Last update was on February 25, 2020
Compatible with iOS 11.0+
Repo: https://captinc.github.io
Price: Free!
Source code: https://github.com/captinc/DarkModeToggle
Screenshots
- Configure preferences in Settings after installing
- Some tweaks/preferences can be toggled instantly, but others require a respring or killing all apps
Features
- Customize exactly which tweaks you want enabled/disabled in dark/light mode
- Change preferences of other tweaks when toggling dark mode
- Toggle Noctis12 instantly
- Change SnowBoard themes with dark mode
- Works with the stock iOS 13 dark mode Control Center module
- Provides a custom Control Center module for iOS 12 and older (you can still use the custom module on iOS 13)
- Optionally run a shell script as root when toggling
- Compatible with WallpaperChanger
Main uses
- Toggle app-specific dark mode tweaks with iOS 13's dark mode
- Change the appearance of other tweaks with iOS 13's dark mode
- On iOS 12, you can have a single toggle that turns all dark modes on/off
- When combined with WallpaperChanger and the "Run scripts" option, you can have custom appearance-aware wallpapers
Supported tweaks for changing preferences
- BetterAlerts
- CallBarXS
- Complications
- Grupi
- Mot
- Noctis12
- PencilChargingIndicator
- PullOver Pro
- Ringer13
- SelectionPlus
- Sileo
- SnowBoard
- Tacitus
- Ultrasound
- XIIIHUD-Mute
- Support for more tweaks can be added if you leave a comment or PM me
Donation links if you would like :)
Posted Jan 27, 2020, 4:29 AM UTC · edited
I got two questions: Why does it need root access to run scripts(which im not sure are really needed)? Is there really a need to hook dlopen since that's very low level?
Disabling tweak injection for a specific dylib can be done in 2 ways:
Change the file extension from .dylib to .disabled in /Library/MobileSubstrate/DynamicLibraries. You can do that, but renaming files can cause issues elsewhere (other processes might look for a specific filename, dpkg will not delete any .disabled dylibs when removing tweaks, etc)
Hook dlopen and return null when trying to load a dylib that u don’t want. This doesn’t mess with filenames and any changes I make do not persist into safe mode/persist after reboot. Choicy uses this method
Root access:
Maybe I should add a toggle for running as root? Idk
Makes sense to hook dlopen instead of trying to deal with each tweak preference file. 👍