mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2026-10-22 04:45:34 +00:00
Compare commits
7
Commits
6ec72b77c7
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
897746b703 | ||
|
|
b94863cef8 | ||
|
|
87312f9099 | ||
|
|
aacee17255 | ||
|
|
e71962c89f | ||
|
|
bbc7509810 | ||
|
|
a601ceb4de |
@@ -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
|
||||
install [Homebrew](https://brew.sh/) and follow its `brew shellenv`
|
||||
instructions. Its default prefix is `/opt/homebrew` on Apple Silicon and
|
||||
`/usr/local` on Intel Macs.
|
||||
instructions.
|
||||
|
||||
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)"
|
||||
```
|
||||
|
||||
The Brewfile includes chezmoi, Git, Emacs, Python, jq, pass, GnuPG, Brave Browser,
|
||||
Alacritty, Inconsolata, and AutoRaise. FFmpeg and Ollama are optional; install them separately
|
||||
if needed.
|
||||
|
||||
3. Restore your password store to `~/.password-store` and import its GPG private
|
||||
key from a secure backup before applying the dotfiles:
|
||||
|
||||
@@ -54,9 +49,7 @@ chezmoi init --apply git@github.com:AquaMorph/dotfiles.git
|
||||
chezmoi apply
|
||||
```
|
||||
|
||||
The generated `~/.config/settings.conf` is private (mode `0600`) and its
|
||||
values are shell-quoted. Linux-only configuration and scripts are ignored on
|
||||
macOS; shared shell, Git, and terminal configuration remains managed.
|
||||
Linux-only configuration and scripts are automatically ignored on macOS.
|
||||
|
||||
To install newly added macOS dependencies later:
|
||||
|
||||
@@ -64,10 +57,29 @@ To install newly added macOS dependencies later:
|
||||
brew bundle --file="$(chezmoi source-path ~/.brewfile)"
|
||||
```
|
||||
|
||||
### Hover window focus on macOS
|
||||
### System preferences
|
||||
|
||||
AutoRaise focuses and brings a window to the front on hover without an intentional delay or
|
||||
moving the cursor. Its settings are managed in `~/.config/AutoRaise/config`.
|
||||
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:
|
||||
|
||||
|
||||
@@ -49,9 +49,13 @@ bin/video/cr3todng.sh
|
||||
{{ else -}}
|
||||
# Homebrew dependencies are only managed on macOS.
|
||||
.brewfile
|
||||
|
||||
# macOS OrcaSlicer uses a symlink to the shared Linux-style profile directory.
|
||||
Library/Application Support/OrcaSlicer
|
||||
{{ end -}}
|
||||
|
||||
{{ if ne .chezmoi.os "darwin" -}}
|
||||
.config/karabiner
|
||||
.config/AutoRaise
|
||||
bin/setup-macos.sh
|
||||
{{ end -}}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{{ .chezmoi.homeDir }}/.config/OrcaSlicer/user/default
|
||||
@@ -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
|
||||
@@ -12,6 +12,18 @@ brew "gnupg"
|
||||
# Web 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
|
||||
cask "alacritty"
|
||||
cask "font-inconsolata"
|
||||
|
||||
Reference in New Issue
Block a user