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.

Say that the switch for Terminal's windows is written while Terminal is open

Țugui Dragoș1bd30c4cb834
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 5a4c558d..f1edde2a 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -188,9 +188,11 @@ macOS asks the user to approve it once. It talks to the app over XPC.
built by `TerminalProfile` from Apple's Clear Dark, the profile Terminal opens with, and two keys in the Peel theme
in use (`TerminalOption`); for the "Last login" line it makes an empty `~/.hushlogin` (`HushLogin`), which turning
it off moves to the Trash. `TerminalThemeLedger` keeps what Terminal used before and the fingerprint of each profile
- Peel wrote, so Put Back takes away only a profile still as Peel wrote it. Peel writes only while Terminal is closed:
- an open Terminal does not read a change made outside it, and writes its own settings over it. The Shell and SSH tabs
- write only files of Peel's own in its folder, `Terminal/zshrc` (`ShellFile`, with the prompt from `Prompt`) and
+ Peel wrote, so Put Back takes away only a profile still as Peel wrote it. Peel writes these only while Terminal is
+ closed: an open Terminal does not read a change made outside it, and writes its own settings over it. The switch
+ that keeps Terminal from reopening its windows is a tweak (`TweakCatalog.terminalWindows`) and sets Terminal's
+ `NSQuitAlwaysKeepsWindows` at once, since Terminal reads it only when it quits. The Shell and SSH tabs write only
+ files of Peel's own in its folder, `Terminal/zshrc` (`ShellFile`, with the prompt from `Prompt`) and
`Terminal/ssh_config` (`SSHFile`), which zsh and ssh read through lines the person adds: Peel never edits `~/.zshrc`
or `~/.ssh/config`. The Git tab changes Git's settings only through `git config --global` (`GitConfig`), and
`GitLedger` keeps what each key held, so turning a setting off puts it back. A setting is offered only when the tool
diff --git a/SAFETY.md b/SAFETY.md
index 4655b906..ff47f4e9 100644
--- a/SAFETY.md
+++ b/SAFETY.md
@@ -336,11 +336,13 @@ among those: BlueWallet keeps its wallet in its container's caches.
## Terminal's settings
The Terminal page changes Terminal's own preferences and nothing else there: it adds Peel's themes as profiles of
-their own, named "Peel" and the theme's name, chooses the profile Terminal opens with, and sets Option as Meta and
-the bell in the Peel theme in use. It never changes or removes a profile it did not write, or one you changed since.
-Put Back gives Terminal the profiles it used before and takes away only Peel's own, still as Peel wrote them. Peel
-writes nothing while Terminal is open, since Terminal would not see the change and would write its own settings over
-it.
+their own, named "Peel" and the theme's name, chooses the profile Terminal opens with, sets Option as Meta and the
+bell in the Peel theme in use, and can keep Terminal from reopening its windows. It never changes or removes a
+profile it did not write, or one you changed since. Put Back gives Terminal the profiles it used before and takes
+away only Peel's own, still as Peel wrote them. Peel writes none of this while Terminal is open, since Terminal
+would not see the change and would write its own settings over it, but for the switch that keeps Terminal from
+reopening its windows: Terminal reads that one, `NSQuitAlwaysKeepsWindows`, only when it quits, so Peel sets it at
+once and it takes effect the next time Terminal quits.
Leaving out the "Last login" line makes an empty `~/.hushlogin`, the file `login` looks for, and turning it off again
moves that file to the Trash, recorded in History. Peel never edits your shell's files: to stop the shell from saving
diff --git a/TERMINAL.md b/TERMINAL.md
index 6c3a3741..2b215a43 100644
--- a/TERMINAL.md
+++ b/TERMINAL.md
@@ -22,7 +22,7 @@ each checked for contrast against its background.
The Terminal page starts turned off in Peel's sidebar: turn it on in Settings > General > Sidebar, or open it from
the View menu. Choose a theme there, and Terminal opens with it and uses it in every new window, and Put Back gives
Terminal the profile it had before and takes away Peel's own profiles that are still as Peel wrote them. Peel
-changes Terminal's settings only while Terminal is closed, and offers to quit it first.
+changes Terminal's profiles, and the one it opens with, only while Terminal is closed, and offers to quit it first.
The Terminal tab of the same page can also leave out the "Last login" line in new windows, keep Terminal from
reopening its windows when it would, make Option the Meta key and silence the bell in the theme you use when it
@@ -31,9 +31,10 @@ edits your shell's files.
What each writes: leaving out the "Last login" line makes an empty `~/.hushlogin`, the file `login` looks for, and
turning it off moves that file to the Trash; Option as Meta and the bell set `useOptionAsMetaKey` to true and `Bell` to
-false in the Peel profile in use; not reopening windows sets Terminal's `NSQuitAlwaysKeepsWindows` to false; and the
-line that stops zsh from saving its sessions, `SHELL_SESSIONS_DISABLE=1`, goes in `~/.zshenv`, for you to add (for bash,
-the command is `touch ~/.bash_sessions_disable`).
+false in the Peel profile in use; not reopening windows sets Terminal's `NSQuitAlwaysKeepsWindows` to false, at once
+even while Terminal is open, since Terminal reads it only when it quits; and the line that stops zsh from saving its
+sessions, `SHELL_SESSIONS_DISABLE=1`, goes in `~/.zshenv`, for you to add (for bash, the command is
+`touch ~/.bash_sessions_disable`).
### Without Peel