Compare commits

...
11 Commits
10 changed files with 164 additions and 10 deletions
+43 -9
View File
@@ -12,8 +12,7 @@ chezmoi init --apply git@github.com:AquaMorph/dotfiles.git
1. Install the Xcode Command Line Tools with `xcode-select --install`, then 1. Install the Xcode Command Line Tools with `xcode-select --install`, then
install [Homebrew](https://brew.sh/) and follow its `brew shellenv` install [Homebrew](https://brew.sh/) and follow its `brew shellenv`
instructions. Its default prefix is `/opt/homebrew` on Apple Silicon and instructions.
`/usr/local` on Intel Macs.
2. Download the dotfiles without applying them, then install dependencies: 2. Download the dotfiles without applying them, then install dependencies:
@@ -23,10 +22,6 @@ chezmoi init --apply git@github.com:AquaMorph/dotfiles.git
brew bundle --file="$(chezmoi source-path ~/.brewfile)" brew bundle --file="$(chezmoi source-path ~/.brewfile)"
``` ```
The Brewfile includes chezmoi, Git, Emacs, Python, jq, pass, GnuPG, Brave Browser,
Alacritty, and Inconsolata. FFmpeg and Ollama are optional; install them separately
if needed.
3. Restore your password store to `~/.password-store` and import its GPG private 3. Restore your password store to `~/.password-store` and import its GPG private
key from a secure backup before applying the dotfiles: key from a secure backup before applying the dotfiles:
@@ -54,12 +49,51 @@ chezmoi init --apply git@github.com:AquaMorph/dotfiles.git
chezmoi apply chezmoi apply
``` ```
The generated `~/.config/settings.conf` is private (mode `0600`) and its Linux-only configuration and scripts are automatically ignored on macOS.
values are shell-quoted. Linux-only configuration and scripts are ignored on
macOS; shared shell, Git, and terminal configuration remains managed.
To install newly added macOS dependencies later: To install newly added macOS dependencies later:
```bash ```bash
brew bundle --file="$(chezmoi source-path ~/.brewfile)" brew bundle --file="$(chezmoi source-path ~/.brewfile)"
``` ```
### System preferences
Close System Settings, then review and run the optional setup script as your
normal user (not with `sudo`):
```bash
~/bin/setup-macos.sh --dry-run
~/bin/setup-macos.sh
```
It enables dark mode and Dock auto-hide, disables natural scrolling and
swipe-to-navigate, and removes window-tiling margins (macOS Sequoia and later).
Animation settings and machine-specific state, such as Dock contents and
monitor/Spaces layouts, are left unchanged.
The script is safe to rerun but does not back up previous values or run
automatically during `chezmoi apply`. Log out and back in if changes are not
visible.
### Hover window focus
AutoRaise focuses and raises windows on hover. Its settings are managed in
`~/.config/AutoRaise/config`.
After installing dependencies and applying the dotfiles, enable it at login:
```bash
brew services start dimentium/autoraise/autoraise
```
Grant AutoRaise access in **System Settings → Privacy & Security → Accessibility**.
If it is not listed, use **+**, press **Cmd+Shift+G**, and enter the path printed by
`echo "$(brew --prefix autoraise)/bin/AutoRaise"`. Then restart it with
`brew services restart dimentium/autoraise/autoraise`.
Hold **Control** to temporarily suspend hover focus. To turn it off entirely:
```bash
brew services stop dimentium/autoraise/autoraise
```
+4
View File
@@ -0,0 +1,4 @@
encryption = "gpg"
[gpg]
recipient = "02C20A131365D6EF3CC4A023B9BDD0975CF5592D"
+5
View File
@@ -49,8 +49,13 @@ bin/video/cr3todng.sh
{{ else -}} {{ else -}}
# Homebrew dependencies are only managed on macOS. # Homebrew dependencies are only managed on macOS.
.brewfile .brewfile
# macOS OrcaSlicer uses a symlink to the shared Linux-style profile directory.
Library/Application Support/OrcaSlicer
{{ end -}} {{ end -}}
{{ if ne .chezmoi.os "darwin" -}} {{ if ne .chezmoi.os "darwin" -}}
.config/karabiner .config/karabiner
.config/AutoRaise
bin/setup-macos.sh
{{ end -}} {{ end -}}
@@ -0,0 +1 @@
{{ .chezmoi.homeDir }}/.config/OrcaSlicer/user/default
+58
View File
@@ -0,0 +1,58 @@
#!/bin/bash
# Apply curated macOS preferences without copying machine-specific state.
set -euo pipefail
function usage {
echo "Usage: ${0##*/} [--dry-run]"
echo "Apply macOS preferences for the current user. Do not run with sudo."
}
dry_run=false
case "${1:-}" in
--dry-run) dry_run=true ;;
--help|-h) usage; exit 0 ;;
"") ;;
*) usage >&2; exit 1 ;;
esac
if [[ $# -gt 1 ]]; then
usage >&2
exit 1
fi
if [[ "$(uname -s)" != "Darwin" ]]; then
echo "This script only supports macOS." >&2
exit 1
fi
if [[ "$EUID" -eq 0 ]]; then
echo "Run this script as your normal user, not with sudo." >&2
exit 1
fi
function write_preference {
if [[ "$dry_run" == true ]]; then
printf '%q ' defaults write "$@"
printf '\n'
elif ! defaults write "$@"; then
echo "Could not write preference: $1 $2" >&2
exit 1
fi
}
# Existing preferences observed on this Mac. This is not a full defaults export:
# macOS also stores stock values, histories, and hardware-specific state there.
# Use dark appearance and automatically hide the Dock.
write_preference NSGlobalDomain AppleInterfaceStyle -string Dark
write_preference com.apple.dock autohide -bool true
# Use traditional scrolling and disable swipe-based back/forward navigation.
write_preference NSGlobalDomain com.apple.swipescrolldirection -bool false
write_preference NSGlobalDomain AppleEnableSwipeNavigateWithScrolls -bool false
# Remove the gaps around tiled windows (macOS Sequoia and later).
write_preference com.apple.WindowManager EnableTiledWindowMargins -bool false
if [[ "$dry_run" == false ]]; then
echo "Preferences saved. Log out and back in if changes are not visible."
fi
+16
View File
@@ -12,10 +12,26 @@ brew "gnupg"
# Web browser # Web browser
cask "brave-browser" cask "brave-browser"
# Nextcloud file sync
cask "nextcloud"
# Gaming
cask "steam"
# 3D printing
cask "orcaslicer"
# Logitech mouse configuration
cask "logi-options+"
# Terminal and font used by the shared Alacritty configuration # Terminal and font used by the shared Alacritty configuration
cask "alacritty" cask "alacritty"
cask "font-inconsolata" cask "font-inconsolata"
# Focus and raise windows when hovering
tap "dimentium/autoraise"
brew "dimentium/autoraise/autoraise"
# Optional tools for audio conversion and local AI # Optional tools for audio conversion and local AI
# brew "ffmpeg" # brew "ffmpeg"
# brew "ollama" # brew "ollama"
+10
View File
@@ -0,0 +1,10 @@
# Focus and raise on hover without an intentional delay; never warp the cursor.
pollMillis=50
delay=1
requireMouseStop=true
warpX=0
warpY=0
# Hold Control to temporarily suspend hover focus.
disableKey=control
# Do not steal focus during authentication or screenshot selection.
stayFocusedBundleIds="com.apple.SecurityAgent,com.apple.screencaptureui"
+5
View File
@@ -12,3 +12,8 @@
sort = -committerdate sort = -committerdate
[push] [push]
autoSetupRemote = true autoSetupRemote = true
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
@@ -0,0 +1,19 @@
-----BEGIN PGP MESSAGE-----
hQGMA4qZwZB4gWrxAQv+IYT0PC4dEdl85V1geFnz+xd7nSSpOdyJ1/0QQQ23zOUw
c3sqMRNzzMcSQwHbBOk69QPbF2kW/2W3XsU7qCGnbownr/vaBSrnvx1UxDepd8E3
j1XO0n0o24xBXGZi3xnQBPIJCtjlgNvtREslFz3fgBT8M69gDGynuytn3ZlAM4ni
BmZjnZsz6JKZ76H+mNJ3n6jYZjCbqPVjKyWBiYDRkpVLHntz/OHQCcHfsHpr8CZ2
JgRlqMcwTJGtLVxxZx9eQ6KSkizQvPmy1weqC85NkKkuAENBCUCyh+IJSEpifSyF
ewvOljGDSZOjDL553x+POjVGbtK/U/n162La0kLBQQVJwDSRIIJyTu5/ZLWde12F
mZNObOq4JJzUBbKJtYqRFl51Po3hcWhcXxaDcay7i/MWEesEnsFaKnbCEhJ7FMUa
1+VUQySgU5j9ULxfeaqLYZ2LClA7AGatHt0q1J6UhFSHkBFcmZTjFrlQFjkL2XVu
qvptke90iaepRuMHqTUR0sBpAQT4/pqbDep1npJf11hOwf5ICOPRkJ2Y/iIjZKc7
+d8akX4RlCUfROqsXykZ+W5a+e8gWcsvLGAaeQxUHZ3goNAutrzux2ye9FcQRI3d
pTvu9m/PvoRpYRmx0YgB4VkWVX9Qd9ezderBZIfAcdBfWY8Z1BHPLFyOS/kYoqrv
U/yVkFsXGgOfxRAc+r8HhcCHfMLWXwCoLDmKCMYBPca4psl/oVec4KTkG3nNbaXf
sZ6zxnXv0WuazEIBZSRKSuaN8iQ50LUKh8oxoyzjqg0U/0LshYruanDVk28YXtnx
LTh3jlTAAx6s2VN/ZhJSbnyL2faLfnqwo50GeJQsAt1aI1PZmdbXSB5fthU+XTaW
RWjjMOZELZxkibUtlMchSnZP1gMYBP+rNuFy
=BfV6
-----END PGP MESSAGE-----
+2
View File
@@ -0,0 +1,2 @@
# Host entries are managed in a separately encrypted file.
Include ~/.ssh/config.private