Repository navigation
Local Tweaks
Runs tweaks you keep in a folder of your own, next to the ones DiaTweaks ships. Drop in a .m file, a folder of sources, a GitHub pull request .patch or link, a .zip or a prebuilt .dylib, and it gets a switch in Settings like any other tweak. Optional tweaks that DiaTweaks keeps outside the built-in set, like Peek, install in one click.
A tweak you wrote, or one from a pull request that isn't merged yet, normally means patching and building DiaTweaks yourself. Here you drop the file in a folder instead. DiaTweaks rebuilds it for you after every Dia and DiaTweaks update, so it keeps working.
- Handy if you write your own tweaks, or want to try a pull request before it ships.
- Skip it if you only use the tweaks that come with DiaTweaks. It does nothing until you add a file.
It's on by default. To change it, open Dia → Settings → Patches → App and use the Local Tweaks switch, then relaunch Dia when it asks. Or run:
diatweaks enable localTweaksTurned off, no local code loads at all. Your files stay where they are.
The folder is:
~/Library/Application Support/DiaPatches/local/
Open it from Dia → Settings → Patches → App → Local Tweaks → Open Folder, or run diatweaks local open.
| Drop in | What happens |
|---|---|
MyTweak.m |
It's compiled and loaded. This is the usual case. |
MyTweak/ |
A folder of .m and .h files that compile together. |
pr-123.patch or .diff
|
A GitHub pull request diff. Its new .m and .h files are built. |
MyTweak.zip |
A folder of sources, unpacked and built. |
MyTweak.dylib |
A prebuilt tweak, loaded as it is. |
You can also click Add Tweak… on the Local Tweaks page, or run:
diatweaks local add ~/Downloads/MyTweak.mdiatweaks local add also takes a GitHub pull request address, such as https://github.com/JaceThings/DiaTweaks/pull/557, and downloads and builds it.
New code only runs after Dia reopens. Relaunch Dia and the tweak's switch appears in a Local section of Settings, unless the file names a section of its own.
Some tweaks aren't built in but are kept for anyone who wants them, like Peek on Shift-Click, which Dia 1.59's own Peek replaced. They're listed under Available on the Local Tweaks page. Click Install to download and build one, then relaunch Dia. Or run:
diatweaks local install PeekAnyone who had a tweak on before it moved sees it first in Available, marked Previously on.
The Local Tweaks page lists every file in the folder with its kind and whether it loaded, then the Available optional tweaks, then these buttons:
- Add Tweak… copies files or folders in, builds them and offers to relaunch Dia.
- New Starter Tweak… writes a working example into the folder and shows it in Finder.
- Open Folder shows the folder in Finder.
- Rebuild All compiles everything again now.
- Relaunch Dia reopens Dia so new code runs.
- Remove, beside each file, moves it to the Trash.
| Command | What it does |
|---|---|
diatweaks local or diatweaks local list
|
Lists the local tweaks and whether each built. |
diatweaks local add <path> |
Copies a .m, folder, .patch, .zip or .dylib, or downloads a GitHub pull request address, into the folder and builds it. |
diatweaks local available |
Lists the optional tweaks you can install, such as Peek. |
diatweaks local install <name…> |
Downloads an optional tweak from Available, such as Peek, and builds it. |
diatweaks local build [name…] |
Compiles the local tweaks now. |
diatweaks local remove <name> |
Moves a local tweak to the Trash. |
diatweaks local open |
Shows the folder in Finder. |
diatweaks local export <name> |
Zips a local tweak to your Desktop so you can share it. |
diatweaks local doctor |
Checks the compiler, the SDK, the folder and every local tweak. |
diatweaks list and diatweaks status include local tweaks, marked (local). diatweaks enable and diatweaks disable work on them like any other tweak.
A local tweak is built against the headers inside the installed DiaTweaks, not a copy on disk. When Dia or DiaTweaks updates, the next launch rebuilds it from source. There's nothing to reinstall.
A prebuilt .dylib can't be rebuilt. If an update changes what it was built against, it's skipped with "Built for an older DiaTweaks ABI — recompile from source" instead of crashing Dia.
diatweaks local add ~/Downloads/pr-557.patch builds the new files a pull request adds. A pull request that changes an existing tweak can't run this way, because the installed copy is already built. It's refused with a message saying so, and needs a full DiaTweaks build.
Building .m files needs Apple's developer tools. Install them with xcode-select --install. A prebuilt .dylib needs nothing.
Safe Mode steps local tweaks down first. If Dia crashes twice right after launch with local tweaks loaded, the next launch turns off only the local tweaks and leaves every other tweak on. Settings then shows Turn Local Tweaks Back On. If Dia still crashes, Safe Mode turns off the other tweaks too.
Pausing tweaks also stops local tweaks from loading.
What if my tweak doesn't build?
It never stops Dia from opening. Its row on the Local Tweaks page says what went wrong, such as the compiler's message with the file and line. A .dylib with a missing symbol, the wrong architecture or an old ABI is skipped with the reason. Run diatweaks local doctor for a full check.
Do local tweaks survive uninstalling?
Yes. They stay in the folder through Dia updates, DiaTweaks updates and diapatch uninstall --purge.
How do I share one?
Run diatweaks local export MyTweak. It zips the tweak to your Desktop. Whoever gets it runs diatweaks local add ~/Downloads/MyTweak.zip.
- Page
- Toolbar
- Sidebar & Tab Bar
- Profiles
- Tabs
- Command Bar
- New Tab Page
- AI
- Window
- App
- Passwords
- Links
- Network
- Help
- Making tweaks