Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
18 changes: 18 additions & 0 deletions .github/workflows/test-init.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test setup
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: macos-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- name: Install shell linter
run: brew install shellcheck
- run: bash -n scripts/bootstrap.sh && shellcheck scripts/bootstrap.sh
- name: Test real setup and reruns in a disposable home
run: python3 tests/integration.py
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ pi/.pi/agent/*
!pi/.pi/agent/settings.json
!pi/.pi/agent/themes
pi/.pi/agent/extensions/node_modules/

# Python setup-test bytecode
__pycache__/
24 changes: 2 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,7 @@ This is where I tweak config files till 4am like a goblin. It's pretty cozy in h
- **[yazi](https://yazi-rs.github.io/)**

## Setup

```bash
brew install just
just init
bash scripts/bootstrap.sh
```

### GitHub dashboard

`just init` installs gh-dash and gh-stack and links the dashboard configuration. On an existing machine, run
`just init-gh-extensions` and `just stow`, then restart Fish and Neovim.
Authenticate with `gh auth login` if needed.

Open the dashboard with `gh dash` (or `ghd` in Fish), or press `<Space>gd` in
Neovim for a floating terminal. Press `q` to quit and `?` for dashboard help.
The shared config includes your open PRs, review requests, and assigned issues.
Update the extension with `gh extension upgrade dash`.
The stacking extension is available as `gh stack`; update it with `gh extension upgrade stack`.

### Insomnia

On macOS, `just init` installs Insomnia in the menu bar and starts SwiftBar at login.
Run `just init-insomnia` to set up only Insomnia on an existing machine.
Click **Keep Mac Awake** in the eye menu, or press Control–Command–I.
The eye is outlined when off and filled when on.
Insomnia keeps the display and Mac awake until you turn it off. Its state resets after a reboot.
10 changes: 10 additions & 0 deletions fish/.config/fish/conf.d/00-homebrew.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if command -q brew
brew shellenv fish | source
else
for brew_path in /opt/homebrew/bin/brew /usr/local/bin/brew /home/linuxbrew/.linuxbrew/bin/brew
if test -x $brew_path
$brew_path shellenv fish | source
break
end
end
end
4 changes: 3 additions & 1 deletion fish/.config/fish/conf.d/fnm.fish
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
fnm env --use-on-cd --shell fish | source
if command -q fnm
fnm env --use-on-cd --shell fish | source
end
8 changes: 6 additions & 2 deletions fish/.config/fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ end

source ~/.orbstack/shell/init.fish 2>/dev/null || :

zoxide init fish | source
if command -q zoxide
zoxide init fish | source
end
alias j="z"

source ~/.orbstack/shell/init2.fish 2>/dev/null || :
Expand All @@ -128,7 +130,9 @@ end
yes | fish_config theme save None

function fnm_clean_up --on-event fish_exit
rm -r $FNM_MULTISHELL_PATH
if set -q FNM_MULTISHELL_PATH; and test -d "$FNM_MULTISHELL_PATH"
rm -r -- "$FNM_MULTISHELL_PATH"
end
end

function __source_local_config --on-variable PWD --description 'Source config.local.fish if present in current directory'
Expand Down
22 changes: 12 additions & 10 deletions homebrew/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ brew "aqua"
brew "oven-sh/bun/bun"
brew "cloudflared"
brew "cmake"
brew "codex"
brew "d2"
brew "eza"
brew "fd"
Expand Down Expand Up @@ -35,12 +34,15 @@ brew "yazi"
brew "yt-dlp"
brew "zoxide"

cask "audacity"
cask "claude-code@latest"
cask "handy"
cask "orbstack"
cask "raycast"
cask "swiftbar"
cask "tamnd/tap/kage"
cask "vlc"
cask "wezterm@nightly"
if OS.mac?
cask "audacity"
cask "claude-code@latest"
cask "codex"
cask "handy"
cask "orbstack"
cask "raycast"
cask "swiftbar"
cask "tamnd/tap/kage"
cask "vlc"
cask "wezterm@nightly"
end
82 changes: 5 additions & 77 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,79 +1,7 @@
brew_prefix := if os() == "macos" { "/opt/homebrew" } else { "/home/linuxbrew/.linuxbrew" }
set positional-arguments

brew:
brew bundle install --file=homebrew/Brewfile
bootstrap target="all":
@bash scripts/bootstrap.sh "$1"

init: brew init-gh-extensions init-pi-extensions init-fish init-insomnia
@echo "✓ Initialization complete!"

init-gh-extensions:
#!/usr/bin/env bash
set -euo pipefail
extensions=$(gh extension list)
for extension in dlvhdr/gh-dash github/gh-stack; do
if ! printf '%s\n' "$extensions" | grep -qE "(^|[[:space:]])${extension}([[:space:]]|$)"; then
gh extension install "$extension"
fi
done
stow -t "$HOME" gh-dash

init-insomnia:
#!/usr/bin/env bash
set -euo pipefail
if [ "$(uname -s)" != Darwin ]; then echo "skip: macOS only"; exit 0; fi
if ! brew list --cask swiftbar >/dev/null 2>&1; then brew install --cask swiftbar; fi
stow -t "$HOME" swiftbar
defaults write com.ameba.SwiftBar PluginDirectory -string "$HOME/.config/swiftbar/plugins"
pkill -x SwiftBar 2>/dev/null || true
launchctl bootout "gui/$UID" "$HOME/Library/LaunchAgents/com.wu-json.swiftbar-login.plist" 2>/dev/null || true
launchctl bootstrap "gui/$UID" "$HOME/Library/LaunchAgents/com.wu-json.swiftbar-login.plist"

init-fish:
grep -qxF "{{brew_prefix}}/bin/fish" /etc/shells || echo "{{brew_prefix}}/bin/fish" | sudo tee -a /etc/shells
chsh -s {{brew_prefix}}/bin/fish

init-obscura:
#!/usr/bin/env bash
set -euo pipefail
obscura_version="0.1.8"
case "$(uname -s)" in
Darwin) os=macos ;;
Linux) os=linux ;;
*) echo "unsupported OS: $(uname -s)"; exit 1 ;;
esac
case "$(uname -m)" in
arm64|aarch64) arch=aarch64 ;;
x86_64) arch=x86_64 ;;
*) echo "unsupported arch: $(uname -m)"; exit 1 ;;
esac
asset="obscura-${arch}-${os}.tar.gz"
url="https://github.com/h4ckf0r0day/obscura/releases/download/v${obscura_version}/${asset}"
mkdir -p ~/.local/bin
tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXIT
echo "downloading $asset ..."
curl -fsL "$url" -o "$tmp/o.tar.gz"
tar xzf "$tmp/o.tar.gz" -C ~/.local/bin obscura obscura-worker
chmod +x ~/.local/bin/obscura ~/.local/bin/obscura-worker
# Strip Gatekeeper quarantine on macOS so the binary runs without a prompt.
[ "$os" = macos ] && xattr -d com.apple.quarantine ~/.local/bin/obscura ~/.local/bin/obscura-worker 2>/dev/null || true
echo "✓ installed $(~/.local/bin/obscura --version)"

init-pi-extensions: stow
npm ci --prefix pi/.pi/agent/extensions

init-tailscale-cli:
#!/usr/bin/env bash
set -euo pipefail
if [ "$(uname -s)" != Darwin ]; then echo "skip: macOS only"; exit 0; fi
if [ ! -x /Applications/Tailscale.app/Contents/MacOS/Tailscale ]; then echo "Tailscale.app not found"; exit 1; fi
sudo rm -f /usr/local/bin/tailscale
fish -c 'fish_add_path -U /Applications/Tailscale.app/Contents/MacOS'
echo "✓ Tailscale MacOS dir added to fish's universal PATH"

stow:
stow -t ~ fish
stow -t ~ gh-dash
stow -t ~ nvim
stow -t ~ pi
stow -t ~ wezterm
stow -t ~ yazi
test:
@python3 tests/integration.py
Loading