Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Keep iTerm2's scripts and dynamic profiles unselected

Țugui Dragoș152aa9a72897
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3ae6ec63..1da88bff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -85,6 +85,7 @@ its changes the way [Keep a Changelog](https://keepachangelog.com/) suggests.
and WebTorrent keep them, is listed and never selected: without it the app forgets every transfer.
- The user profile of LibreOffice and Apache OpenOffice, with your own templates, AutoText, dictionaries, and the
automatic backups of your documents, is listed and never selected.
+- iTerm2's folder in Application Support, with the scripts and dynamic profiles you wrote, is listed and never selected.
#### Space
diff --git a/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift b/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift
index 951029f1..8085202f 100644
--- a/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift
@@ -52,6 +52,9 @@ enum KeptOnlyHere {
// OBS Studio keeps its profiles and scene collections in `obs-studio/basic` in its configuration folder
// (`frontend/OBSApp.cpp`), and nowhere else.
("Library/Application Support/obs-studio", "basic", .holdsWorkMadeWithTheApp),
+ // iTerm2's "Dynamic Profiles" and "Running a Script": the profiles and the scripts the person wrote.
+ ("Library/Application Support/iTerm2", "Scripts", .holdsWorkMadeWithTheApp),
+ ("Library/Application Support/iTerm2", "DynamicProfiles", .holdsWorkMadeWithTheApp),
// The user profile of LibreOffice and Apache OpenOffice (`UserInstallation` in their sources, `<name>/4` here
// on a Mac). LibreOffice Help's "Paths": the person's own templates, AutoText, AutoCorrect texts and
// dictionaries, and the automatic backup copies of documents.
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift
index 19cbd761..c4bf8b82 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift
@@ -32,6 +32,9 @@ struct KeptOnlyHereTests {
("Library/Application Support/LibreOffice", .holdsWorkMadeWithTheApp),
("Library/Application Support/LibreOffice/4/user/basic/Standard/Module1.xba", .holdsWorkMadeWithTheApp),
("Library/Application Support/OpenOffice/4/user/template/Letter.ott", .holdsWorkMadeWithTheApp),
+ ("Library/Application Support/iTerm2", .holdsWorkMadeWithTheApp),
+ ("Library/Application Support/iTerm2/Scripts/AutoLaunch/hello.py", .holdsWorkMadeWithTheApp),
+ ("Library/Application Support/iTerm2/DynamicProfiles/Work.json", .holdsWorkMadeWithTheApp),
("Library/Application Support/Transmission", .holdsTorrents),
("Library/Application Support/Transmission/Transfers.plist", .holdsTorrents),
("Library/Application Support/qBittorrent", .holdsTorrents),
@@ -75,6 +78,7 @@ struct KeptOnlyHereTests {
"Library/Application Support/qBittorrent/logs", "Library/Caches/qBittorrent", ".config/deluge/plugins",
"Library/Application Support/Motrix/dht.dat", "Library/Application Support/WebTorrent/Posters",
"Library/Caches/LibreOffice", "Library/Application Support/LibreOffice Beta",
+ "Library/Application Support/iTerm2/version.txt", "Library/Caches/com.googlecode.iterm2",
]
for path in free {
#expect(KeptOnlyHere.reason(for: "\(home)/\(path)", home: home, root: "/") == nil, "\(path)")