Last active
December 7, 2023 08:13
-
-
Save thomaswitt/c5efaa6635356edfa0b204f05b260893 to your computer and use it in GitHub Desktop.
Revisions
-
thomaswitt revised this gist
Dec 7, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ process_agents() { shopt -s nullglob for plist in "$directory"/{LaunchAgents,LaunchDaemons,PrivilegedHelperTools}/*; do if ! echo "$plist" | egrep -q "$pattern"; then if [[ $directory = /Library* ]]; then echo "sudo launchctl unload -w \"$plist\"" echo -e "sudo rm -f \"$plist\"\n" else -
thomaswitt revised this gist
Nov 23, 2023 . 1 changed file with 0 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,20 +20,14 @@ process_agents() { global_agents=( at.obdev.littlesnitch # Little Snitch com.docker # Docker com.haystacksoftware # ARQ Backup ) process_agents "/Library" "${global_agents[@]}" local_agents=( com.DigiDNA.iMazing # iMazing Backup com.docker # Docker ) process_agents "$HOME/Library" "${local_agents[@]}" -
thomaswitt created this gist
Nov 23, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ # Remove unwanted helpers process_agents() { local directory=$1 shift local agents=("$@") local pattern=$(IFS=\|; echo "${agents[*]}") shopt -s nullglob for plist in "$directory"/{LaunchAgents,LaunchDaemons,PrivilegedHelperTools}/*; do if ! echo "$plist" | egrep -q "$pattern"; then if [[ $directory = /* ]]; then echo "sudo launchctl unload -w \"$plist\"" echo -e "sudo rm -f \"$plist\"\n" else echo "launchctl unload -w \"$plist\"" echo -e "rm -f \"$plist\"\n" fi fi done } global_agents=( at.obdev.littlesnitch # Little Snitch com.adobe # Adobe com.audinate.dante # Dante Audio com.docker # Docker com.haystacksoftware # ARQ Backup com.native-instruments # Native Instruments com.wacom # Wacom Tablet ) process_agents "/Library" "${global_agents[@]}" local_agents=( com.DigiDNA.iMazing # iMazing Backup com.docker # Docker com.loupedeck.loupedeck2 # Loupedeck jp.plentycom.boa.SteerMouse # SteerMouse ) process_agents "$HOME/Library" "${local_agents[@]}" alias show_background_tasks='sudo sfltool dumpbtm|egrep "^\W+(#\d+|Disposition:|Identifier:)"|cut -c -80'