|
| 1 | +## Dotfiles (macOS) – Yabai + skhd + Sketchybar + Kitty + Starship + Neovim |
| 2 | + |
| 3 | +Modern, Hyprland-inspired macOS setup with a tiling WM, menu bar, fast terminal, themed prompt, and a batteries-included Neovim config. |
| 4 | + |
| 5 | +### What’s included |
| 6 | + |
| 7 | +- **Window manager**: [yabai](https://github.com/koekeishiya/yabai) + [skhd](https://github.com/koekeishiya/skhd) |
| 8 | +- **Bar**: [sketchybar](https://github.com/FelixKratz/SketchyBar) (spaces with Greek icons, app title, wifi/volume/battery/clock) |
| 9 | +- **Terminal**: [Kitty](https://sw.kovidgoyal.net/kitty/) (Catppuccin theme, Nerd Font) |
| 10 | +- **Prompt**: [Starship](https://starship.rs/) (Catppuccin colors) |
| 11 | +- **Editor**: [Neovim](https://neovim.io/) with lazy.nvim, LSP, Treesitter, Telescope, gitsigns, lualine |
| 12 | + |
| 13 | +### Quick start |
| 14 | + |
| 15 | +1) Install Xcode Command Line Tools (the script will prompt if missing) and Homebrew. |
| 16 | +2) Clone this repo, then: |
| 17 | + |
| 18 | +```bash |
| 19 | +bash ./install.sh |
| 20 | +``` |
| 21 | + |
| 22 | +Dry-run to preview actions: |
| 23 | + |
| 24 | +```bash |
| 25 | +./install.sh --dry-run |
| 26 | +``` |
| 27 | + |
| 28 | +Notes: |
| 29 | +- Approve Accessibility for `yabai`, `skhd`, and `sketchybar` in System Settings → Privacy & Security → Accessibility. |
| 30 | +- Set your terminal font to “JetBrainsMono Nerd Font”. |
| 31 | +- If you want full yabai features, follow the SIP guidance in the official docs: [Disabling System Integrity Protection](https://github.com/koekeishiya/yabai/wiki/Disabling-System-Integrity-Protection). |
| 32 | + |
| 33 | +### Keybindings (skhd) |
| 34 | + |
| 35 | +- Focus windows: Alt+H/J/K/L |
| 36 | +- Swap windows: Shift+Alt+H/J/K/L |
| 37 | +- Move window to prev/next space (and follow): Ctrl+Alt+H/L |
| 38 | +- Focus space 1..9: Cmd+Alt+1..9 |
| 39 | +- Send window to space 1..9 (and follow): Shift+Cmd+1..9 |
| 40 | +- Focus displays: Ctrl+Alt+P/N |
| 41 | +- Send window to other display: Ctrl+Cmd+P/N |
| 42 | +- Toggle split orientation: Alt+Space |
| 43 | +- Float/unfloat and center: Alt+T |
| 44 | +- Fullscreen: Alt+F |
| 45 | +- Launch Kitty: Alt+Return |
| 46 | +- Launch VS Code: Alt+E |
| 47 | +- Raycast: Alt+R |
| 48 | +- Lock screen: Ctrl+Cmd+L |
| 49 | + |
| 50 | +### Bar (sketchybar) |
| 51 | + |
| 52 | +- Spaces labeled with Greek icons: α β γ δ ε ζ η θ ι |
| 53 | +- Active space highlighted (white icon) |
| 54 | +- Front app next to spaces with additional padding |
| 55 | +- Right-side modules: wifi (icon-only), volume (event-driven, mute-aware), battery (charging bolt, low-battery red), clock |
| 56 | + |
| 57 | +Files: |
| 58 | +- `~/.config/sketchybar/sketchybarrc` |
| 59 | +- `~/.config/sketchybar/scripts/*.sh` |
| 60 | + |
| 61 | +### Terminal (Kitty) + Prompt (Starship) |
| 62 | + |
| 63 | +- Kitty config: `~/.config/kitty/kitty.conf` (Catppuccin colors, Nerd Font) |
| 64 | +- Starship prompt: `~/.config/starship.toml` (enabled from `~/.zshrc`) |
| 65 | + |
| 66 | +Kitty shortcuts: |
| 67 | +- Tabs: Ctrl+J/K (left/right) |
| 68 | +- Splits focus: Ctrl+Shift+H/J/K/L |
| 69 | +- Create split: Ctrl+Shift+\ (horizontal), Ctrl+Shift+- (vertical) |
| 70 | +- Move split: Ctrl+Shift+Alt+H/J/K/L |
| 71 | +- Close split: Ctrl+Shift+W |
| 72 | +- Rename tab: Ctrl+Shift+R |
| 73 | + |
| 74 | +### Neovim |
| 75 | + |
| 76 | +- Config: `~/.config/nvim/init.lua` (lazy.nvim, LSP, Treesitter, Telescope, gitsigns, lualine, Catppuccin) |
| 77 | +- Common keys: |
| 78 | + - Space+ff: find files |
| 79 | + - Space+fg: live grep |
| 80 | + - Space+fb: buffers |
| 81 | + - Space+fh: help |
| 82 | + |
| 83 | +### CI and local checks |
| 84 | + |
| 85 | +- GitHub Actions workflow: `.github/workflows/ci.yml` |
| 86 | + - Lints shell scripts (shellcheck, shfmt) |
| 87 | + - Validates Karabiner JSON (jq) |
| 88 | + - Checks Neovim Lua format (stylua) |
| 89 | + - Installer dry-run |
| 90 | + |
| 91 | +- Run locally: |
| 92 | + |
| 93 | +```bash |
| 94 | +bash scripts/check.sh |
| 95 | +``` |
| 96 | + |
| 97 | +### Troubleshooting |
| 98 | + |
| 99 | +- Repeated Accessibility prompts for `skhd`/`yabai`: |
| 100 | + 1) Stop service: `skhd --stop-service` (and/or `yabai --stop-service`) |
| 101 | + 2) Kill lingering process: `pkill -x skhd` / `pkill -x yabai` |
| 102 | + 3) Remove and re-add in System Settings → Accessibility (add `/opt/homebrew/bin/skhd` and `/opt/homebrew/bin/yabai`) |
| 103 | + 4) Start service: `skhd --start-service`, `yabai --start-service` |
| 104 | + |
| 105 | +- Space icons not updating: ensure `yabai` is running (`yabai --start-service`) and has Accessibility. Switching spaces should trigger updates. |
| 106 | + |
| 107 | +- Volume not updating: the background watcher `volume_watcher.sh` triggers `volume_change` events. If needed, restart sketchybar: `sketchybar --reload`. |
| 108 | + |
| 109 | +### Layout and files |
| 110 | + |
| 111 | +Tracked highlights: |
| 112 | +- `~/.yabairc`, `~/.skhdrc`, `~/.zshrc`, `~/.gitconfig`, `~/.ghci` |
| 113 | +- `~/.config/sketchybar/**`, `~/.config/kitty/kitty.conf`, `~/.config/starship.toml`, `~/.config/karabiner/karabiner.json`, `~/.config/nvim/**` |
| 114 | +- `Brewfile`, `install.sh`, `.github/**`, `scripts/check.sh` |
| 115 | + |
| 116 | +Ignored by default: noisy/sensitive app data under `~/.config/**` (Raycast, Joplin, gh, Copilot, etc.). |
| 117 | + |
| 118 | + |
0 commit comments