Skip to content

Instantly share code, notes, and snippets.

@thoaster
Last active June 4, 2024 12:21
Show Gist options
  • Save thoaster/ca5b4fdb653b9cdb3930897045b78558 to your computer and use it in GitHub Desktop.
Save thoaster/ca5b4fdb653b9cdb3930897045b78558 to your computer and use it in GitHub Desktop.
Transmit 5 Trial Reset
#!/bin/sh
# Reset Transmit 5 Trial
# curl -fsSL https://gist.githubusercontent.com/thoaster/ca5b4fdb653b9cdb3930897045b78558/raw/reset.sh | bash
set +e
set -x
sudo rm -rf ~/Library/Caches/com.panic.Transmit
sudo rm -rf ~/Library/Application\ Support/com.panic.Transmit
sudo rm ~/Library/Preferences/com.panic.Transmit.plist
sudo killall cfprefsd
defaults write com.panic.Transmit SUSendProfileInfo -bool NO
defaults write com.panic.Transmit SUEnableAutomaticChecks -bool YES
defaults write com.panic.Transmit ShowHiddenFiles -bool YES
defaults write com.panic.Transmit DoubleClickAction -int 3
open -b com.panic.Transmit
@andriilive
Copy link

@thoaster the Transmit app seems should be stoped before running the clean script to make this work.

Could be something like

killall Transmit
set +e
# ....

Apple Shortcuts

New Shortcuts app seems to be a really cosy place to store and organise tweaks & code snippets like this keeping them easy to share with friends 😃

See the shortcut example 👉🏻 Transmit 5 Cleaner Shortcut.shortcut

Let me know by the way, if there is an any easier way to autolaunch shortcuts. The one i use for now:

2023-03-18 08 31 09

@ToniBarcia
Copy link

Hi,
I'd been trying to set up the shortcut with no success. If I execute line by line everything works. If I set the lines in a shortcut it doesn't.
Any ideas are welcome!
Thanks

@andriilive
Copy link

andriilive commented Mar 6, 2024

Hi, I'd been trying to set up the shortcut with no success. If I execute line by line everything works. If I set the lines in a shortcut it doesn't. Any ideas are welcome! Thanks

Shortcuts sharing is peace of sh*t, try https://www.icloud.com/shortcuts/b3ff2317787e4dc7ac38d781158a508e downloading the new one.

Check Shortcut preferences (privacy tab)

Create a new shortcut from scratch if mine is broken. HowTo Gif:

CleanShot 2024-03-06 at 08 17 22

Shortcut env

Relative paths, like ~/Library/Caches/com.panic.Transmit and some other common dotenv features don't work as expected in Shortcut shell scripts. So you can't just paste the reset.sh content there, you have to absolute the paths & use some tricks

Shortcut gist

The code above should download & launch the script from my fork-gist with shortcuts environment wrapper, check the Readme out:
👉🏻 https://gist.github.com/andriilive/eee0d63279347a55c15dd0442f6b3f12

Shortcut code:

#!/bin/bash

# Transmit 5 Trial Reset Script & Apple Shortcut
# Author: @andriilive
# Github: https://gist.github.com/andriilive/eee0d63279347a55c15dd0442f6b3f12

curl -fsSL https://gist.githubusercontent.com/andriilive/eee0d63279347a55c15dd0442f6b3f12/raw/reset.sh | sudo bash -s -- true false true true

⚠️ Shortcuts now require root approval: password (or Apple Watch click). This means the auto-launch agent method from original post will trigger a really annoying alert with a focus within!! on every system launch. 🤷🏻 It has annoyed me, so I'd recommend:

  1. Removing the shortcut from the Login Items (System Preferences -> General -> Login Items).
  2. Running the shortcut manually when needed (from the app drawer or menu bar).
  3. Bind the launch to app launch with Automator, launchd or any other way you prefer. Let me know if you find a good one. (I haven't tried it yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment