-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·91 lines (84 loc) · 4.17 KB
/
Copy pathsetup
File metadata and controls
executable file
·91 lines (84 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/zsh
# zsh: plain zsh + standalone plugins, sourced directly from packages (no oh-my-zsh).
if command -v pacman &> /dev/null; then
# Arch: plugins are official packages, p10k lives in the AUR.
sudo pacman -S --needed --noconfirm zsh zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search
aur=$(command -v yay || command -v paru)
if [ -n "$aur" ]; then
"$aur" -S --needed --noconfirm zsh-theme-powerlevel10k
else
echo "No AUR helper (yay/paru) found — install 'zsh-theme-powerlevel10k' from the AUR for the prompt." >&2
fi
else
# macOS / Homebrew
brew install zsh powerlevel10k zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search
fi
ln -sfn ~/.dotfiles/p10k.zsh ~/.p10k.zsh
ln -sfn ~/.dotfiles/zsh ~/.zsh
ln -sfn ~/.dotfiles/zshrc ~/.zshrc
# dev
git submodule update --init --recursive
ln -sfn ~/.dotfiles/gitconfig ~/.gitconfig
ln -sfn ~/.dotfiles/gitignore_global ~/.gitignore_global
ln -sfn ~/.dotfiles/nvim ~/.config/nvim
# tmux (XDG layout): only the config is symlinked; TPM owns ~/.config/tmux/plugins.
mkdir -p ~/.config/tmux/plugins
ln -sfn ~/.dotfiles/tmux.conf ~/.config/tmux/tmux.conf
[ -d ~/.config/tmux/plugins/tpm ] || git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
~/.config/tmux/plugins/tpm/bin/install_plugins
ln -sfn ~/.dotfiles/gemrc ~/.gemrc
ln -sfn ~/.dotfiles/irbrc ~/.irbrc
ln -sfn ~/.dotfiles/lazygit ~/.config/lazygit
ln -sfn ~/.dotfiles/kitty ~/.config/kitty
ln -sfn ~/.dotfiles/opencode ~/.config/opencode
mkdir -p ~/.claude
ln -sfn ~/.dotfiles/claude/settings.json ~/.claude/settings.json
ln -sfn ~/.dotfiles/aerospace.toml ~/.aerospace.toml
ln -sfn ~/.dotfiles/ghostty ~/.config/ghostty
# packages
if command -v pacman &> /dev/null; then
# Arch
# npm depends on the virtual `nodejs` provider, so an existing nodejs-lts-* satisfies it
# without forcing a swap to the latest `nodejs`; fresh installs still pull nodejs in.
sudo pacman -S --needed --noconfirm neovim ripgrep lua luarocks go php composer npm jdk-openjdk julia rust ruby lazygit fd yazi mise postgresql ghostty opencode openai-codex
if [ -n "$aur" ]; then
"$aur" -S --needed --noconfirm claude-code
else
echo "No AUR helper (yay/paru) found — install 'claude-code' from the AUR manually." >&2
fi
else
# homebrew
if ! command -v brew &> /dev/null; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
brew install neovim ripgrep lua luarocks go php composer node openjdk julia rust ruby lazygit fd yazi mise postgresql opencode
brew link luarocks
brew install --cask nikitabobko/tap/aerospace mediosz/tap/swipeaerospace ghostty claude-code codex
fi
# styx (software KVM: share this machine's keyboard/mouse with another over LAN).
# Linux = sender (has the physical keyboard/mouse); macOS = receiver.
mkdir -p ~/.config/styx
if command -v pacman &> /dev/null; then
[ -x ~/.cargo/bin/styx-sender ] || cargo install --git https://github.com/ghreprimand/styx styx-sender
ln -sfn ~/.dotfiles/styx/sender.toml ~/.config/styx/config.toml
# stable path for the keyd virtual keyboard (styx captures it; see sender.toml)
sudo cp ~/.dotfiles/styx/99-keyd-virtual.rules /etc/udev/rules.d/99-keyd-virtual.rules
sudo udevadm control --reload-rules && sudo udevadm trigger
# auto-start the sender with the Wayland session (restart on crash, logs in journald)
mkdir -p ~/.config/systemd/user
ln -sfn ~/.dotfiles/styx/styx-sender.service ~/.config/systemd/user/styx-sender.service
systemctl --user daemon-reload
systemctl --user enable styx-sender.service
else
# macOS receiver also needs Accessibility permission granted after first run.
[ -x ~/.cargo/bin/styx-receiver ] || cargo install --git https://github.com/ghreprimand/styx styx-receiver
ln -sfn ~/.dotfiles/styx/receiver.toml ~/.config/styx/config.toml
fi
# make zsh the default login shell (interactive: prompts for your password, so keep it last)
zsh_path=$(command -v zsh)
if [ -n "$zsh_path" ] && [ "$SHELL" != "$zsh_path" ]; then
chsh -s "$zsh_path"
fi
# npm install -g neovim
# gem install neovim
# pip install neovim