{"id":35324317,"url":"https://github.com/xajler/mac-dotfiles","last_synced_at":"2026-04-10T11:01:52.798Z","repository":{"id":326116213,"uuid":"1104033523","full_name":"xajler/mac-dotfiles","owner":"xajler","description":"Dotfiles with aerospace and sketchybar on MacOS","archived":false,"fork":false,"pushed_at":"2026-03-21T10:25:39.000Z","size":8729,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-22T01:56:57.304Z","etag":null,"topics":["aerospace","dotfiles","dotfiles-macos","dvorak-layout","fastfetch","ghostty","karabiner","macos","nvchad","nvim","p10k","raycast","sketchybar","tiling-window","wezterm","zellij","zsh"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xajler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-25T16:56:37.000Z","updated_at":"2026-03-21T10:25:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/xajler/mac-dotfiles","commit_stats":null,"previous_names":["xajler/mac-dotfiles"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xajler/mac-dotfiles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xajler%2Fmac-dotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xajler%2Fmac-dotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xajler%2Fmac-dotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xajler%2Fmac-dotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xajler","download_url":"https://codeload.github.com/xajler/mac-dotfiles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xajler%2Fmac-dotfiles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31639524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aerospace","dotfiles","dotfiles-macos","dvorak-layout","fastfetch","ghostty","karabiner","macos","nvchad","nvim","p10k","raycast","sketchybar","tiling-window","wezterm","zellij","zsh"],"created_at":"2025-12-31T01:03:09.691Z","updated_at":"2026-04-10T11:01:52.793Z","avatar_url":"https://github.com/xajler.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# macOS Dotfiles\n\nA collection of configuration files for my macOS setup, managed with Git.\n\n![Screenshot](screenshots/screenshot.png)\n\n## 🛠 Configuration Included\n\n### Window Management \u0026 Status Bar\n- **[AeroSpace](https://github.com/nikitabobko/AeroSpace)**: Alternative tiling WM configuration in [`.config/aerospace/`](.config/aerospace/).\n  - Kept as a supported fallback path.\n  - Auto-start is currently disabled, so it can be launched manually when needed.\n- **[`yabai`](https://github.com/koekeishiya/yabai) + [`skhd`](https://github.com/koekeishiya/skhd)**: Current native-Spaces WM stack in [`.config/yabai/`](.config/yabai/) and [`.config/skhd/`](.config/skhd/).\n  - 10 numbered workspaces.\n  - `skhd` hotkeys follow the same Dvorak-style movement pattern used in the older AeroSpace setup.\n  - App-specific helpers handle odd windows like ChatGPT Atlas and picker dialogs.\n- **WM glue scripts**: Shared helpers in [`.config/wm/`](.config/wm/) keep workspace actions and WM switching consistent.\n  - `focus-workspace` and `move-window-to-workspace` dispatch to the active WM.\n  - `set-window-manager` flips between `aerospace` and `yabai`.\n  - `toggle-movie-mode` handles IINA fullscreen behavior.\n- **[SketchyBar](https://github.com/FelixKratz/SketchyBar)**: Status bar configuration in [`.config/sketchybar/`](.config/sketchybar/).\n  - Custom Lua configuration.\n  - Loads AeroSpace or `yabai` workspace modules automatically based on the selected WM.\n  - Widgets: CPU, RAM, Battery, Volume, WiFi (with WAN IP), Brew updates.\n\n### Terminal \u0026 Shell\n- **Zsh**: Shell configuration (`.zshrc`, `.zprofile`, `.zshenv`).\n  - **Powerlevel10k**: Theme configuration (`.p10k.zsh`).\n  - **Modern CLI tools**: bat (cat), eza (ls), atuin (history), direnv (env management), zoxide (cd).\n- **[WezTerm](https://wezfurlong.org/wezterm/)**: Primary terminal emulator (`.config/wezterm/`).\n  - Zellij integration keybindings.\n- **[Ghostty](https://ghostty.org/)**: Alternative terminal emulator (`.config/ghostty/`).\n  - Custom shaders and themes.\n- **[Zellij](https://zellij.dev/)**: Terminal multiplexer (`.config/zellij/`).\n  - Session management with custom aliases (`zm`, `tml`, `tmk`).\n  - Locked mode by default for seamless shell usage.\n  - 3-tab project layout (shell, claude, nvim).\n- **Fastfetch**: System information fetch tool (`.config/fastfetch/`).\n- **Git**: Global git configuration (`.config/git/`).\n\n### Utilities\n- **Raycast**: Productivity tool extensions and scripts (`.config/raycast/`).\n- **[Karabiner-Elements](https://karabiner-elements.pqrs.org/)**: Keyboard customization (`.config/karabiner/`).\n  - Caps Lock → Escape.\n  - Built-in keyboard `Option+1..0` and `Option+Shift+1..0` route through shared WM scripts, so the same workspace keys work for AeroSpace and `yabai`.\n\n## ⌨️ Keybindings\n\nQuick access to keyboard shortcuts:\n- [Karabiner keybindings](.config/KEYBINDINGS.md#%EF%B8%8F-karabiner-elements-key-remapping) - Physical key remapping, modifier setup\n- [Shell (Zsh) keybindings](.config/KEYBINDINGS.md#-shell-zsh---emacs-mode) - Terminal navigation, history, editing\n- [AeroSpace keybindings](.config/KEYBINDINGS.md#-aerospace-window-manager) - Older workspace and layout reference\n- [`skhd` keybindings](.config/skhd/skhdrc) - Current `yabai` hotkeys for focus, moving, workspaces, and fullscreen\n- [WezTerm keybindings](.config/KEYBINDINGS.md#-wezterm-terminal-emulator) - Terminal emulator shortcuts\n- [Zellij keybindings](.config/KEYBINDINGS.md#-zellij-terminal-multiplexer) - Session management, tab/pane navigation\n- [NvChad keybindings](.config/KEYBINDINGS.md#-nvchad-neovim) - Neovim editor shortcuts\n\nFull reference: [.config/KEYBINDINGS.md](.config/KEYBINDINGS.md) plus the live [`skhd` config](.config/skhd/skhdrc).\n\n## 🚀 Setup\n\n1. **Clone the repository:**\n   ```bash\n   git clone git@github.com:xajler/mac-dotfiles.git ~/mac-dotfiles\n   # Or if you are cloning directly to home (be careful with existing files):\n   # git init\n   # git remote add origin ...\n   # git pull origin master\n   ```\n\n2. **Secrets Management:**\n\n\n   Create or copy `.zsh.env` file for private aliases and secrets (ignored by git):\n\n   Secrets are stored in macOS Keychain for security. See [Security](#-security) section below.\n\n   *Note: `.zsh.env` is gitignored to keep your private settings safe.*\n\n3. **Choose a window manager path:**\n\n   **AeroSpace**\n   ```bash\n   open -a AeroSpace\n   ~/.config/wm/set-window-manager aerospace\n   ```\n\n   **yabai + skhd**\n   - Install `yabai` and `skhd`.\n   - Grant Accessibility permissions to both binaries.\n   - If using the scripting addition features, follow the upstream `yabai` SIP instructions first.\n   - Then switch to it:\n\n   ```bash\n   ~/.config/wm/set-window-manager yabai\n   ```\n\n   SketchyBar will reload against the selected WM automatically.\n\n## 🔀 Window Manager Switching\n\nThe repo supports both AeroSpace and `yabai`/`skhd`.\n\n- Current WM selection is stored locally in `~/.local/state/wm/window-manager`.\n- Shared scripts in [`.config/wm/`](.config/wm/) use that state so workspace keybindings keep working across both stacks.\n- SketchyBar reads the same state and loads either [`.config/sketchybar/items/aerospace.lua`](.config/sketchybar/items/aerospace.lua) or [`.config/sketchybar/items/yabai_spaces.lua`](.config/sketchybar/items/yabai_spaces.lua).\n\nUseful commands:\n\n```bash\n~/.config/wm/current-window-manager\n~/.config/wm/set-window-manager yabai\n~/.config/wm/set-window-manager aerospace\n```\n\n## 📂 Structure\n\n- `.config/`: Application configurations.\n- `.config/wm/`: Shared helpers for WM switching, workspace routing, movie mode, Atlas sizing, and picker dialogs.\n- `.zshrc`: Main shell configuration with Keychain integration.\n- `.zsh.env`: Private aliases and settings (not tracked).\n- `.gitignore`: Custom ignore rules for dotfiles management.\n\n## 🔐 Security\n\nSensitive data (API tokens, credentials) is stored in macOS Keychain, not in plain text files. The `.zsh.env` file loads these secrets on shell startup.\n\n### Adding Secrets to Keychain\n\nTo store a new secret:\n```bash\nsecurity add-generic-password -U -a \"$USER\" -s \"SECRET_NAME\" -w \"your-secret-value\"\n```\n\nThen add to your `.zsh.env`:\n```bash\nexport SECRET_NAME=$(security find-generic-password -a \"$USER\" -s \"SECRET_NAME\" -w 2\u003e/dev/null)\n```\n\n**Benefits:**\n- Secrets encrypted by macOS Keychain\n- No plain text tokens in dotfiles\n- Safe to commit `.zshrc` to public repos\n- Private settings stay in gitignored `.zsh.env`\n\n## 🔑 SSH Keys\n\nSSH keys use macOS Keychain for passphrase storage and `.zprofile` for eager loading in login zsh sessions.\n\n### Setup (One-time)\n\n1. **Configure SSH to use Keychain** (already in `.ssh/config`):\n   ```\n   Host *\n     AddKeysToAgent yes\n     UseKeychain yes\n   ```\n\n   GitHub host aliases should also pin the intended key with `IdentitiesOnly yes`.\n\n2. **Add your SSH keys to Keychain once:**\n   ```bash\n   ssh-add --apple-use-keychain ~/.ssh/id_ed25519_metaintellect\n   ssh-add --apple-use-keychain ~/.ssh/id_ed25519_aenetworks\n   ssh-add --apple-use-keychain ~/.ssh/id_ed25519\n   ```\n\n   This stores the passphrases securely in macOS Keychain.\n\n3. **Verify a fresh login shell can load them:**\n   ```bash\n   ssh-add -l\n   zsh -lc 'ssh-add -l'\n   ```\n\n**How it works:**\n- Keychain stores the passphrases securely\n- `.zprofile` eagerly loads the three keys for login zsh sessions, including `zsh -lc`\n- This covers Terminal and Codex-style login shells without managing `SSH_AUTH_SOCK` manually\n- If keys must exist before any shell starts, use a macOS LaunchAgent instead of shell startup files\n\n## 🖥️ macOS System Settings\n\n### Night Shift - Force 24/7 Warm Display\n\nmacOS Night Shift UI can't be set to truly 24/7 (leaves a 1-minute gap at midnight). Force it always on:\n\n```bash\n# Enable Night Shift permanently\ndefaults write com.apple.CoreBrightness \"CBBlueReductionStatus\" -dict-add \"BlueReductionEnabled\" -bool YES \"BlueReductionMode\" -int 0 \"AutoBlueReductionEnabled\" -bool NO\n\n# Restart display service to apply\nkillall corebrightnessdiagnostics 2\u003e/dev/null || true\n```\n\n**System Settings UI**: Ignore the schedule settings - the command overrides them. You can still adjust the warmth slider.\n\n**To revert**: Toggle Night Shift off/on in System Settings → Displays → Night Shift.\n\n## 📝 License\n\n[GPLv3](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxajler%2Fmac-dotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxajler%2Fmac-dotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxajler%2Fmac-dotfiles/lists"}