Skip to content

Commit 2dd714a

Browse files
committed
fix(macos): 🐛 align sudo check and trackpad guidance
1 parent 9da6c9b commit 2dd714a

3 files changed

Lines changed: 6 additions & 13 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,13 @@ Other Linux distributions are not covered by the installer. You can adapt the sc
192192
* **`nvm` does not load:** Restart the shell or source `~/.bashrc` / `~/.zshrc`; if you need a one-off recovery, run `export NVM_DIR="$HOME/.nvm"; . "$NVM_DIR/nvm.sh"; nvm use --lts`.
193193
* **`swiftly` is missing on Linux:** Make sure `~/.local/share/swiftly/env.sh` exists and that `gnupg` is installed, because signature verification depends on `gpg`; a manual recovery is `test -f "$HOME/.local/share/swiftly/env.sh" && . "$HOME/.local/share/swiftly/env.sh" && swiftly install stable`.
194194
* **Xcode developer tools are missing on macOS:** The installer now checks `xcode-select -p` and `xcodebuild -version` before running the macOS package/bootstrap path. If either check fails, install Xcode from the App Store or run `xcode-select --install` and retry.
195+
* **Three-finger drag is not taking effect:** Set it manually in `System Settings > Accessibility > Pointer Control > Trackpad Options` and enable `Use trackpad for dragging`. macOS may not persist that toggle reliably through `defaults`.
195196
* **`fzf` bindings are missing:** Rerun the installer with `--all` or source the `fzf` keybindings and completion files manually from your shell rc.
196197
* **`bat` and `fd` look unfamiliar on Ubuntu:** `batcat` and `fdfind` are the packaged binary names; the installer creates `bat` and `fd` shims when it can write to `/usr/local/bin`.
197198
* **Prompt customization is not visible:** `oh-my-posh` only loads in interactive shells, so non-interactive sessions will not show the prompt theme.
198199
* **`winget` is missing on Windows:** Install App Installer from Microsoft, or continue with Scoop and Chocolatey while keeping winget for later.
199200
* **Chocolatey needs elevation:** The Windows installer relaunches with UAC when it needs admin rights; if you prefer `gsudo`, install it first and future iterations can use it as the elevation path.
200-
* **Touch ID for `sudo`:** On macOS, the installer can only check whether Touch ID is already enabled for `sudo` and print a manual recovery hint if it is missing. It does not patch `/etc/pam.d` for you.
201+
* **Touch ID for `sudo`:** On macOS, the installer can only check whether Touch ID is already enabled for `sudo` and print a manual recovery hint if it is missing. The file to edit is `/etc/pam.d/sudo`, and the line to add is `auth sufficient pam_tid.so`.
201202
* **Stats.app is blocked by Gatekeeper:** If Stats is installed via Homebrew but still refuses to open, run `sudo xattr -r -d com.apple.quarantine /Applications/Stats.app/`.
202203
* **Inventory sync:** The companion `list-macOS-apps` repo can help snapshot installed Mac apps before you expand or prune `macos/Brewfile`.
203204

install.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,22 +206,17 @@ ensure_local_bin_on_path() {
206206

207207
report_macos_sudo_touch_id_status() {
208208
local sudo_pam="/etc/pam.d/sudo"
209-
local sudo_local="/etc/pam.d/sudo_local"
209+
local sudo_tid_line='auth sufficient pam_tid.so'
210210

211-
if grep -Eq '^[[:space:]]*auth[[:space:]]+sufficient[[:space:]]+pam_tid\.so' "$sudo_pam" 2>/dev/null; then
211+
if grep -Fqx "$sudo_tid_line" "$sudo_pam" 2>/dev/null; then
212212
echo "✅ Touch ID is already enabled for sudo via $sudo_pam"
213213
return 0
214214
fi
215215

216-
if grep -Eq 'pam_tid\.so' "$sudo_local" 2>/dev/null; then
217-
echo "✅ Touch ID for sudo is configured in $sudo_local"
218-
return 0
219-
fi
220-
221216
echo "⚠️ Touch ID for sudo does not appear to be enabled."
222217
echo "ℹ️ Manual recovery path:"
223-
echo " 1. Create /etc/pam.d/sudo_local with: auth sufficient pam_tid.so"
224-
echo " 2. Save it with sudo"
218+
echo " 1. Edit /etc/pam.d/sudo with sudo"
219+
echo " 2. Ensure this exact line is present: $sudo_tid_line"
225220
echo " 3. Test with: sudo -k && sudo -v"
226221
}
227222

macos/defaults.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ run_cmd defaults write com.apple.dock largesize -int 93
9090
run_cmd defaults write com.apple.dock show-recents -bool false
9191
run_cmd defaults write com.apple.dock autohide -bool false
9292
write_trackpad_bool Clicking true
93-
write_trackpad_bool TrackpadThreeFingerDrag true
94-
write_trackpad_bool Dragging true
95-
write_trackpad_bool DragLock false
9693
run_cmd defaults write NSGlobalDomain com.apple.trackpad.forceClick -bool true
9794
run_cmd defaults write com.apple.screencapture location -string "$HOME/Pictures/Screenshots"
9895
run_cmd defaults write com.apple.screencapture type -string png

0 commit comments

Comments
 (0)