Skip to content

lukasjuhas/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

129 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Lukas's dotfiles

CI status for macOS

Personal macOS dotfiles. Bash-first, plugin-light, designed for a fast one-shot setup on a fresh machine. For machine-specific overrides see the *.local files.

Inspired by and structurally based on @alrra/dotfiles.

Table of Contents

Setup

To set up the dotfiles run the appropriate snippet in the terminal:

⚠️ DO NOT run the setup script if you do not fully understand what it does. Seriously, DON'T!

OS Snippet
macOS bash -c "$(curl -LsS https://raw.github.com/lukasjuhas/dotfiles/main/src/os/setup.sh)"

That's it. ✨

The setup process will:

  • Download the dotfiles to your computer (suggests ~/projects/dotfiles by default).
  • Symlink the Git, shell, tmux, and Vim related files into $HOME.
  • Symlink the shared VS Code / Cursor settings.json, keybindings.json, and snippets/ into both editors' user directories.
  • Prompt for Full Disk Access if missing (required on modern macOS for many defaults write calls to take effect; see init.sh).
  • Apply the Brewfile (brew bundle) β€” installs every formula, cask, and Mac App Store app in one declarative pass. Browser variants, dead taps, and unused apps have all been pruned; this list contains only what is actually used.
  • Set custom macOS defaults (Finder, Dock, trackpad, keyboard, screenshots, Stage Manager off, etc.).

Apple Silicon. Tahoe (macOS 26) or newer.

What's inside

.
β”œβ”€β”€ Brewfile                                 ← every formula, cask, MAS app (declarative)
β”œβ”€β”€ justfile                                 ← shortcut recipes (see below)
β”œβ”€β”€ renovate.json                            ← dependency updates
β”œβ”€β”€ scripts/                                 ← lint + link-check (CI)
└── src/
    β”œβ”€β”€ bin/                                 ← personal scripts (tile-dual, tile-quad, …)
    β”œβ”€β”€ git/                                 ← gitconfig, gitignore, gitattributes
    β”œβ”€β”€ shell/                               ← bash_aliases, bash_exports, bash_prompt, …
    β”œβ”€β”€ tmux/                                ← tmux.conf
    β”œβ”€β”€ vim/                                 ← minimal plugin-free vimrc
    β”œβ”€β”€ vscode/                              ← shared VS Code + Cursor config
    └── os/
        β”œβ”€β”€ setup.sh                         ← entry point
        β”œβ”€β”€ create_symbolic_links.sh         ← bash/git/tmux/vim symlinks
        β”œβ”€β”€ link_vscode_configs.sh           ← VS Code + Cursor symlinks
        β”œβ”€β”€ installs/
        β”‚   β”œβ”€β”€ composer.sh                  ← Laravel Valet wiring
        β”‚   β”œβ”€β”€ npm.sh                       ← global npm updates
        β”‚   β”œβ”€β”€ nvm.sh                       ← Node Version Manager (not on Homebrew)
        β”‚   └── macos/
        β”‚       β”œβ”€β”€ bash.sh                  ← chsh to Homebrew bash
        β”‚       β”œβ”€β”€ brewfile.sh              ← apply the root Brewfile
        β”‚       β”œβ”€β”€ homebrew.sh              ← install brew, wire /opt/homebrew into PATH
        β”‚       └── xcode.sh                 ← Xcode CLT + licence accept
        └── preferences/macos/
            β”œβ”€β”€ init.sh                      ← Full Disk Access check
            β”œβ”€β”€ dock.sh / finder.sh / …
            └── ui_and_ux.sh                 ← Stage Manager off, .DS_Store control, …

Customize

Local Settings

The dotfiles can be extended for machine-specific needs via three local files (sourced or included automatically):

~/.bash.local

Sourced after every other Bash file, so it can override aliases, exports, and PATH. This is the right place for secrets and host-specific tweaks (e.g. API tokens).

#!/bin/bash

# Add personal scripts to PATH.
PATH="$HOME/projects/dotfiles/src/bin:$PATH"
export PATH

# Local secrets β€” never commit.
export SOME_API_TOKEN="…"
export OPENAI_API_KEY="…"

πŸ’‘ For tokens with broader scope (per-project), consider direnv with an .envrc file inside the project β€” both direnv and the bash hook are installed by these dotfiles.

~/.gitconfig.local

Included after ~/.gitconfig, so it overrides or adds to the configurations. Use it for your identity and signing key β€” these are deliberately NOT tracked in this repo.

[user]

    name = Your Name
    email = you@example.com
    signingKey = XXXXXXXX

[commit]

    # https://docs.github.com/en/authentication/managing-commit-signature-verification
    gpgSign = true

~/.vimrc.local

Sourced at the end of ~/.vimrc (see src/vim/vimrc last block). The shared vim config is intentionally minimal (~140 lines, zero plugins) since day-to-day editing happens in Cursor/VS Code.

" Example: disable arrow keys in insert and normal mode.

inoremap <Down>  <ESC>:echoe "Use j"<CR>
inoremap <Left>  <ESC>:echoe "Use h"<CR>
inoremap <Right> <ESC>:echoe "Use l"<CR>
inoremap <Up>    <ESC>:echoe "Use k"<CR>

Common commands

just (installed via the Brewfile) provides shortcut recipes:

just                # list recipes
just setup          # full one-shot setup
just install        # only run installers (Homebrew, casks, CLI)
just bundle         # apply the Brewfile (formulae + casks + MAS)
just bundle-check   # what's missing vs. the Brewfile?
just bundle-dump    # rewrite the Brewfile from currently-installed packages
just prefs          # only apply macOS defaults
just link           # (re)create the bash/git/tmux/vim symlinks
just link-editors   # (re)symlink VS Code + Cursor configs
just update         # softwareupdate + brew + mas + npm + pnpm
just lint           # shellcheck + markdownlint
just check          # lint + broken-link check

The Brewfile is the single source of truth for everything installable via Homebrew (formulae, casks) and mas (Mac App Store). To add a tool: edit the Brewfile, then just bundle. To audit drift between this repo and your machine: just bundle-check.

Editor configs (VS Code + Cursor)

src/vscode/ holds a single shared settings.json, keybindings.json, and snippets/ directory. src/os/link_vscode_configs.sh symlinks them into both editors:

~/Library/Application Support/Code/User/   ┐
                                           β”œβ”€β†’ src/vscode/
~/Library/Application Support/Cursor/User/ β”˜

Cursor is a VS Code fork and reads the same format. Unknown keys (e.g. cursor.* in VS Code, claudeCode.* in Cursor) are silently ignored by the editor that doesn't know them, so a single shared file just works. Pre-existing local files are backed up to <file>.backup.<timestamp> before the symlink is created.

Update

To pull the latest dotfiles and re-run setup:

just setup

To bring the system up to date (without re-running setup):

just update

To re-run only one piece:

just install        # apps + CLI tools only
just prefs          # macOS defaults only
just link           # rebuild symlinks only

License

The code is available under the MIT License.


Inspired by and based on @alrra/dotfiles. Thanks!

About

Dotfiles and set up of a new environment (for more specific local needs I use the *.local files).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors