Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
261f30a
chore: remove dotbot
marromlam Mar 12, 2026
77f6e90
feat: replace dotbot with plain bash install scripts
marromlam Mar 12, 2026
9652ddd
feat: rewrite symlinks.sh to use GNU Stow
marromlam Mar 12, 2026
f246728
fix: recover missing dotbot behaviours
marromlam Mar 12, 2026
4cb5956
feat: update bash rc file
marromlam Mar 12, 2026
6564ba1
chore: wire Makefile to extra/symlinks.sh and extra/setup.sh
marromlam Mar 12, 2026
51d3819
fix: ensure stow/brew available before symlinking
marromlam Mar 12, 2026
9514e50
feat: add ci
marromlam Mar 12, 2026
e2b63f7
fix: update
marromlam Mar 12, 2026
3a20b8d
fix: try to fix ci
marromlam Mar 12, 2026
505c127
fix: relink some files
marromlam Mar 13, 2026
9ff7135
fix: update lua lint
marromlam Mar 13, 2026
1e52074
feat: add make update
marromlam Mar 13, 2026
4de9ab6
feat: clean colorscheme
marromlam Mar 13, 2026
415a9f5
feat: remove unneded files
marromlam Mar 13, 2026
f494929
feat: use amberglow theme
marromlam Mar 13, 2026
6be5abf
feat: update some plugin config
marromlam Mar 13, 2026
dbf6771
feat: some updates
marromlam Mar 13, 2026
f30d407
feat(nvim): Auto-install all LSP tools via Mason
marromlam Mar 13, 2026
0e3f026
feat: toggle tree-sitter context
marromlam Mar 16, 2026
a5f7f94
fix: add nvim tests
marromlam Mar 16, 2026
6aa76f7
style: format files
marromlam Mar 16, 2026
485baa1
feat: update plugins
marromlam Mar 19, 2026
f8ba4f2
feat: better git
marromlam Mar 26, 2026
c8e1893
ci: fix globals
marromlam Mar 26, 2026
eb7de7f
fix: missing brew
marromlam Mar 27, 2026
4f37235
ci: fix asserts
marromlam Mar 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 140 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: CI

on:
push:
branches: [main, optim]
pull_request:
branches: [main]

jobs:
install:
name: Install (Ubuntu)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false

- name: Set up machine identifier
run: echo "x64-linux" > "$HOME/.machine"

- name: install_dependencies.sh (Homebrew + packages)
run: bash install/install_dependencies.sh

- name: Persist Homebrew environment
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
{
echo "PATH=$PATH"
echo "HOMEBREW_PREFIX=$HOMEBREW_PREFIX"
echo "HOMEBREW_CELLAR=$HOMEBREW_CELLAR"
echo "HOMEBREW_REPOSITORY=$HOMEBREW_REPOSITORY"
} >> "$GITHUB_ENV"

- name: make install (symlinks)
run: |
command -v brew
command -v stow
mkdir -p "$HOME/Projects/personal"
ln -sfn "$PWD" "$HOME/Projects/personal/dotfiles"
ln -sfn "$PWD" "$HOME/.dotfiles"
make install

- name: Assert key symlinks exist
run: |
assert_link() {
if [[ ! -L "$1" ]]; then
echo "FAIL: expected symlink at $1"
ls -la "$(dirname "$1")" || true
exit 1
fi
echo "OK: $1 -> $(readlink "$1")"
}
assert_link "$HOME/.zshrc"
assert_link "$HOME/.zshenv"
assert_link "$HOME/.zprofile"
assert_link "$HOME/.gitconfig"
assert_link "$HOME/.bashrc"
assert_link "$HOME/.dotfiles"

assert_dir_or_link() {
if [[ ! -d "$1" && ! -L "$1" ]]; then
echo "FAIL: expected directory or symlink at $1"
ls -la "$(dirname "$1")" || true
exit 1
fi
if [[ -L "$1" ]]; then
echo "OK: $1 -> $(readlink "$1")"
else
echo "OK: $1 is a directory"
fi
}
assert_dir_or_link "$HOME/.config"

assert_path() {
if [[ ! -e "$1" ]]; then
echo "FAIL: expected path at $1"
ls -la "$(dirname "$1")" || true
exit 1
fi
echo "OK: $1"
}
assert_path "$HOME/.config/nvim"
assert_path "$HOME/.config/zsh"
assert_path "$HOME/.config/tmux"
assert_path "$HOME/.config/git"

- name: Assert zshenv sets ZDOTDIR
run: |
result=$(bash -c 'source "$HOME/.zshenv" 2>/dev/null; echo "$ZDOTDIR"')
[[ "$result" == "$HOME/.config/zsh" ]] \
&& echo "OK: ZDOTDIR=$result" \
|| { echo "FAIL: ZDOTDIR='$result'"; exit 1; }

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false

- name: Install shellcheck
run: sudo apt-get install -y shellcheck

- name: ShellCheck
run: |
# Only lint actively maintained scripts; exclude legacy extra/, zsh configs, and submodules
find install/ extra/setup.sh extra/symlinks.sh install.sh \
-name '*.sh' \
| xargs shellcheck -x

- name: Bash syntax
run: |
find install/ extra/setup.sh extra/symlinks.sh install.sh \
-name '*.sh' \
| xargs -I{} bash -n {}

lua-lint:
name: Lua Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false

- name: Install luacheck
run: sudo apt-get install -y luarocks && sudo luarocks install luacheck

- name: Install stylua
run: |
curl -sL "https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-linux-x86_64.zip" -o stylua.zip
unzip -q stylua.zip -d /usr/local/bin/
chmod +x /usr/local/bin/stylua

- name: luacheck
run: luacheck files/.config/nvim --config .luacheckrc

- name: stylua --check
run: stylua --check files/.config/nvim
continue-on-error: true
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ files/.hammerspoon/

files/.config/kitty/kittens/neighboring_window.py
files/.config/kitty/kittens/pass_keys.py
files/.config/kitty/kittens/termpdf.py
files/.config/spotifyd/rustlang.spotifyd.plist
files/.config/lazygit/state.yml

Expand Down
5 changes: 0 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
[submodule "dotbot"]
path = dotbot
url = https://github.com/anishathalye/dotbot
ignore = dirty

[submodule "files/.config/tmux/plugins/tpm"]
path = files/.config/tmux/plugins/tpm
url = https://github.com/tmux-plugins/tpm
Expand Down
22 changes: 22 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
globals = {
"vim",
"mrl",
"map",
"MiniTest",
"Stl",
"Stlcol",
}

-- Ignore: unused variables/arguments, line too long, shadowing, value overwritten
ignore = {
"211", -- unused variable
"212", -- unused argument
"213", -- unused loop variable
"311", -- value assigned to variable is overwritten
"312", -- value of field is overwritten
"314", -- value assigned to field is overwritten before use
"411", -- redefining a local variable
"412", -- redefining an argument
"421", -- shadowing a local variable
"422", -- shadowing an argument
"431", -- shadowing an upvalue
"432", -- shadowing an upvalue argument
"631", -- line is too long
}
2 changes: 2 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shell=bash
severity=warning
34 changes: 29 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FC=${HOME}/.dotfiles
TMUX_SHARE=${HOME}/.local/share/tmux

all: brew macos kitty nvim vim tmux fzf-marks private zsh-plugins
all: brew install setup

test:
${HOME}/.dotfiles/tests/zsh/sanity.sh
Expand All @@ -16,16 +16,28 @@ macos:
# now we change the keymaps
bash extra/keyboard.sh

update:
brew update && brew upgrade && brew update && brew upgrade && brew cleanup

homebrew:
@command -v brew >/dev/null || /bin/bash -c "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

install:
stow --ignore ".DS_Store" --target="${HOME}" --dir="${FC}" files
rm -rf ~/Downloads; ln -sf "${HOME}/Library/Mobile Documents/com~apple~CloudDocs/Downloads" ~/Downloads
bash ${FC}/extra/symlinks.sh
@if [[ "$$(uname)" == "Darwin" ]]; then \
rm -rf ~/Downloads; \
ln -sf "${HOME}/Library/Mobile Documents/com~apple~CloudDocs/Downloads" ~/Downloads; \
fi

setup:
bash ${FC}/extra/setup.sh

projects:
mkdir -p "${HOME}/Projects/icloud"
stow --ignore ".DS_Store" --target="${HOME}/Projects/icloud" --dir="${HOME}/Library/Mobile Documents/com~apple~CloudDocs/" Projects

brew:
brew bundle --file="${FC}/homebrew/Brewfile"
bash ${FC}/install/install_dependencies.sh
python3 -m pip install pynvim neovim-remote mcphub[all] --upgrade
npm install -g mcp-hub@latest

Expand Down Expand Up @@ -98,4 +110,16 @@ zsh-plugins:
ln -sf ${HOMEBREW_PREFIX}/Cellar/alias-tips/alias-tips.plugin.zsh ${HOMEBREW_PREFIX}/share/zsh-alias-tips


.PHONY: all install brew macos kitty nvim vim tmux fzf-marks private zsh-plugins test
MASON := $(HOME)/.local/share/nvim/mason/bin

fmt:
git diff --name-only --diff-filter=d | grep '\.lua$$' | xargs -r $(MASON)/stylua --
git diff --name-only --diff-filter=d | grep '\.sh$$' | xargs -r $(MASON)/shfmt -w
git diff --name-only --diff-filter=d | grep '\.py$$' | xargs -r $(MASON)/isort --
git diff --name-only --diff-filter=d | grep '\.py$$' | xargs -r $(MASON)/black --

commit: fmt
git add -u
git commit

.PHONY: all homebrew install setup brew macos kitty nvim vim tmux fzf-marks private zsh-plugins test fmt commit
110 changes: 51 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,93 +2,85 @@

<div align=center>
<a href="../../commits/main">
<img alt="Last commit" src="https://img.shields.io/github/last-commit/KevinNitroG/dotfiles?style=for-the-badge&color=f2cdcd&labelColor=363a4f"/>
<img alt="Last commit" src="https://img.shields.io/github/last-commit/marromlam/dotfiles?style=for-the-badge&color=f2cdcd&labelColor=363a4f"/>
</a>
<img alt="Repo size" src="https://img.shields.io/github/repo-size/KevinNitroG/dotfiles?style=for-the-badge&color=eba0ac&labelColor=363a4f"/>
<img alt="Repo size" src="https://img.shields.io/github/repo-size/marromlam/dotfiles?style=for-the-badge&color=eba0ac&labelColor=363a4f"/>
</div>

<div align=center>
<img alt="macOS" src="https://img.shields.io/badge/MacOS-f0f0f0?logo=apple&logoColor=black&style=for-the-badge"/>
<img alt="Windows" src="https://img.shields.io/badge/Windows-74c7ec?style=for-the-badge&logo=windows&logoColor=white"/>
<img alt="Linux" src="https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black"/>
</div>

## Introduction

Most of my machine configuration is handled with my fictional couscous!
Most of my machine configuration lives here.

<img width="1680" alt="Screenshot 2023-11-07 at 10 55 09" src="https://github.com/marromlam/dotfiles/assets/41004396/7686b940-8004-42b6-bb28-92c5173882b6">
<img width="1680" alt="Screenshot 2023-11-07 at 11 01 43" src="https://github.com/marromlam/dotfiles/assets/41004396/feb8d9c7-2fbb-4a75-8b5c-a934fbb293ba">

I use different machines for different purposes, and I have set a
identificator for each of them. This identificator is based on the
architecture of the machine, and the OS. The following are the
identificators I use:
Each machine is identified by a string stored in `~/.machine`:

- `arm64-darwin`: for my M1 mac
- `arm64-linux`: for my Raspberry Pi 4
- `x64-darwin`: for my Intel mac
- `x64-linux`: for my linux machines
- `x64-nodos`: for IGFAE/CERN machines
- `x64-codespaces`: used for all my codespaces
- `x64-wsl`: used for my WSL2 setup
- `x32-linux`: mainly used for iSH app
| Identifier | Machine |
| ---------------- | -------------------------- |
| `arm64-darwin` | M-series Mac |
| `x64-darwin` | Intel Mac |
| `x64-linux` | Linux |
| `x64-wsl` | WSL2 |
| `x64-nodos` | IGFAE/CERN machines |
| `x64-codespaces` | GitHub Codespaces |
| `arm64-linux` | Raspberry Pi 4 |
| `x32-linux` | iSH app |

This information **must** be set in the `~/.machine` file. This file is
automatically created by the `install.sh` script, but you can create it
manually if you want. The file should contain only the identificator of the
machine, and nothing else.
The install script creates this file automatically, or you can write it manually.

## Core ideas
## Core tools

Neovim is my main editor, and everything is circling around it. Here is a list
of the tools I use:
Neovim is the primary editor; everything else orbits it.

| Dependency | Description |
| ------------------ | ------------------------------------------- |
| Neovim | Best editor on Earth |
| Nerd font | Currently I use Fira Code |
| Fuzzy Finder (fzf) | Search utility |
| ripgrep | Search |
| tmux | Terminal multiplexer |
| wezterm | The terminal emulator that works everywhere |
| Tool | Role |
| ------------------ | ------------------------------- |
| Neovim | Editor |
| Nerd Font | Currently Fira Code |
| fzf | Fuzzy finder |
| ripgrep | Search |
| tmux | Terminal multiplexer |
| kitty / wezterm | Terminal emulators |

I was mostly a Unix user till very recencly where I was forced to use Windows
and WSL. I used to use kitty as my main terminal, but I swiched to Wezterm
because it is the only one available on all platforms.
## Installation

## Makefile

It still exists a Makefile to install this configuration, but I am currently
using dotbot to manage my dotfiles.

```
```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/marromlam/dotfiles/main/install.sh)" -f -f
```

In WSL you need to run the following commands first:
On WSL, run these first:

```bash
sudo sed -i -E 's/nameserver [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/nameserver 8.8.8.8/' /etc/resolv.conf
sudo apt update && sudo apt install curl -y
```

The installer:
1. Bootstraps Homebrew (or uses `apk` on iSH)
2. Installs packages via `install/install_dependencies.sh`
3. Clones this repo to `~/Projects/personal/dotfiles`
4. Creates symlinks via GNU Stow (`make install`)

After the initial install, individual steps can be re-run with `make`:

```
make brew # reinstall/update Homebrew packages
make install # re-apply symlinks
make setup # run post-install setup
```

## macOS window manager (Amethyst + Hammerspoon)

- Install apps from the Brewfile (`amethyst`, `hammerspoon`).
- Dotbot links:
- `~/.amethyst.yml` -> `files/.amethyst.yml`
- `~/.hammerspoon` -> `files/.hammerspoon`
- Required macOS permissions:
- `System Settings > Privacy & Security > Accessibility`
- Enable both `Amethyst` and `Hammerspoon`
- Suggested if you switch from other tilers:
- disable `yabai`/`skhd` services to avoid conflicts
- keep only one tiler active at a time

## Contributions

This files should be used as a template to create your own configuration. I do
not recommend you to make install all my dotfiles since you will not leverage
the most part of them. Instead, try to copy what you need and create your own
repo. But, if you find there is some plugin or configuration that I could take
advantage of, please do not hesitate to create a pull request!
- Installed via Brewfile (`amethyst`, `hammerspoon`)
- Configs are symlinked: `~/.amethyst.yml` and `~/.hammerspoon/`
- Required: `System Settings > Privacy & Security > Accessibility` — enable both apps
- If switching from another tiler (yabai/skhd), disable the old one first

## Contributing

Use this as a template — don't install it wholesale. Pick what's useful and build your own config. If you spot something worth sharing back, pull requests are welcome.
Loading
Loading