fix: align setup with Pop!_OS toolchain
This commit is contained in:
parent
995af1df20
commit
394a9af367
9 changed files with 44 additions and 116 deletions
|
|
@ -49,13 +49,8 @@ return {
|
|||
dependencies = 'mason.nvim',
|
||||
cmd = { 'DapInstall', 'DapUninstall' },
|
||||
opts = {
|
||||
automatic_installation = true,
|
||||
automatic_installation = false,
|
||||
handlers = {},
|
||||
ensure_installed = {
|
||||
'python',
|
||||
'js',
|
||||
'codelldb',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ return {
|
|||
{
|
||||
'mason-org/mason-lspconfig.nvim',
|
||||
opts = {
|
||||
ensure_installed = lsp_servers,
|
||||
-- Only auto-enable the LSP servers we explicitly manage in this config.
|
||||
-- This avoids accidental multi-server attaches (e.g. ts_ls + vtsls),
|
||||
-- which can produce duplicate Telescope definition results.
|
||||
|
|
@ -88,8 +87,11 @@ return {
|
|||
opts = {
|
||||
ensure_installed = tool_installer_list,
|
||||
integrations = {
|
||||
-- keep mapping enabled so lspconfig names (e.g. ts_ls) resolve to Mason packages
|
||||
-- Keep mapping enabled so lspconfig names (e.g. ts_ls) resolve to Mason packages.
|
||||
-- This is the sole installer to avoid racing mason-lspconfig and mason-nvim-dap.
|
||||
['mason-lspconfig'] = true,
|
||||
['mason-null-ls'] = false,
|
||||
['mason-nvim-dap'] = false,
|
||||
},
|
||||
run_on_start = true,
|
||||
start_delay = 0,
|
||||
|
|
|
|||
35
.zshrc
35
.zshrc
|
|
@ -7,10 +7,10 @@ fi
|
|||
# ===================== User-tunable environment ========================
|
||||
# Single place to control the look of the whole stack. Everything below
|
||||
# (and the wezterm env.lua writer further down) derives from these.
|
||||
export KANAGAWA_THEME="${KANAGAWA_THEME:-wave}" # wave | dragon
|
||||
export WEZTERM_FONT_SIZE="${WEZTERM_FONT_SIZE:-16}"
|
||||
export WEZTERM_WINDOW_OPACITY="${WEZTERM_WINDOW_OPACITY:-0.80}"
|
||||
export WEZTERM_TEXT_OPACITY="${WEZTERM_TEXT_OPACITY:-1.0}"
|
||||
export KANAGAWA_THEME="wave" # wave | dragon
|
||||
export WEZTERM_FONT_SIZE="13"
|
||||
export WEZTERM_WINDOW_OPACITY="0.80"
|
||||
export WEZTERM_TEXT_OPACITY="1.0"
|
||||
# ========================================================================
|
||||
|
||||
# Theme (kanagawa variants: dragon|wave)
|
||||
|
|
@ -67,10 +67,10 @@ if command -v zoxide >/dev/null 2>&1; then
|
|||
eval "$(zoxide init zsh)"
|
||||
fi
|
||||
|
||||
# Syntax highlighting (try Debian/Ubuntu path first, then Arch)
|
||||
# Syntax highlighting
|
||||
for _p in \
|
||||
/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \
|
||||
/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
"$HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" \
|
||||
/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
do
|
||||
[ -f "$_p" ] && source "$_p" && break
|
||||
done
|
||||
|
|
@ -82,8 +82,8 @@ ZSH_HIGHLIGHT_STYLES[path_prefix]=none
|
|||
|
||||
# Autosuggestions
|
||||
for _p in \
|
||||
/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh \
|
||||
/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
"$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh" \
|
||||
/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
do
|
||||
[ -f "$_p" ] && source "$_p" && break
|
||||
done
|
||||
|
|
@ -98,19 +98,10 @@ export FZF_CTRL_T_OPTS="--preview 'bat --color=always -n --line-range :500 {}'"
|
|||
export FZF_ALT_C_OPTS="--preview 'eza --icons=always --tree --color=always {} | head -200'"
|
||||
export FZF_TMUX_OPTS=" -p90%,70% "
|
||||
|
||||
# fzf key bindings and completion (apt uses /usr/share/doc/fzf/examples)
|
||||
for _p in \
|
||||
/usr/share/doc/fzf/examples/key-bindings.zsh \
|
||||
/usr/share/fzf/key-bindings.zsh
|
||||
do
|
||||
[ -f "$_p" ] && source "$_p" && break
|
||||
done
|
||||
for _p in \
|
||||
/usr/share/doc/fzf/examples/completion.zsh \
|
||||
/usr/share/fzf/completion.zsh
|
||||
do
|
||||
[ -f "$_p" ] && source "$_p" && break
|
||||
done
|
||||
# fzf key bindings and completion
|
||||
if command -v fzf >/dev/null 2>&1; then
|
||||
source <(fzf --zsh)
|
||||
fi
|
||||
unset _p
|
||||
# -----------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
# dotfiles
|
||||
|
||||
Linux dotfiles oriented around **Pop!_OS 24.04** (Cosmic DE). Plain Debian
|
||||
package paths in `.zshrc` with a fallback for Arch, so they also work on Arch
|
||||
machines if you ever switch back.
|
||||
Linux dotfiles oriented around **Pop!_OS 24.04** (Cosmic DE).
|
||||
|
||||
## Quick Setup
|
||||
|
||||
|
|
@ -46,4 +44,3 @@ Set in shell:
|
|||
```bash
|
||||
export KANAGAWA_THEME="wave" # or "dragon"
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
# Omarchy Install Script — AI Prompt
|
||||
|
||||
This is a ready-to-paste prompt for any capable AI to generate a customized
|
||||
Omarchy-derived install script that integrates these dotfiles.
|
||||
|
||||
---
|
||||
|
||||
You are going to create a Linux install shell script derived from **Omarchy** (DHH's opinionated Arch + Hyprland setup — https://omarchy.org, https://github.com/basecamp/omarchy). Target: single-user Arch-based Hyprland desktop.
|
||||
|
||||
Produce a clean, idempotent `install.sh` (`bash`, `set -euo pipefail`) plus supporting files, structured into small sourced functions so each step is auditable. Do not leave stubs, dead menu entries, or commented-out code. If a removal empties a parent menu, remove the parent too.
|
||||
|
||||
## 1. Packages to remove from the install
|
||||
|
||||
- **Shell tools:** `try`
|
||||
- **TUIs:** Lazydocker, Clamp (match Omarchy's spelling — `cliamp`/`climp`)
|
||||
- **GUIs:** Obsidian, Pinta, Signal, OBS Studio, Kdenlive
|
||||
- **Commercial apps:** remove every entry in Omarchy's "Commercial apps" install group **and** the "Commercial apps" menu/submenu itself.
|
||||
- **Default web apps (frameless PWA wrappers):** remove all of them — the install hook, every generated `.desktop` file, and shipped icons.
|
||||
|
||||
## 2. Browser swap
|
||||
|
||||
- Do **not** install Chromium.
|
||||
- Install **Brave Beta** (https://brave.com/origin/linux/beta/) and wire it as default everywhere Omarchy referenced Chromium: `xdg-mime` defaults, `$BROWSER`, Hyprland keybinds, walker/wofi entries, any remaining PWA launcher.
|
||||
- Prefer an official scriptable Arch install path for the Beta channel; if no Beta AUR package exists, fall back to the Beta artifact from the URL above via a documented method. Do **not** silently substitute stable Brave.
|
||||
|
||||
## 3. Terminal swap — Alacritty → WezTerm, themed by Omarchy
|
||||
|
||||
- Replace Alacritty with **WezTerm** everywhere Omarchy sets the default terminal: `$TERMINAL`, Hyprland `Super+Return` (and any terminal keybind), walker/wofi, `xdg` terminal handling, and any scripts that call `alacritty` (e.g. Omarchy's `omarchy-launch-*` helpers).
|
||||
- Make WezTerm follow Omarchy's live theme. Omarchy switches themes by symlinking the active theme into `~/.config/omarchy/current/theme/` and each theme ships an `alacritty.toml`. Implement this:
|
||||
1. Add a generator (`omarchy-wezterm-theme` or similar) that converts the current theme's `alacritty.toml` color table into a WezTerm color table written to `~/.config/omarchy/current/theme/wezterm.lua` (returning a Lua table of `foreground/background/cursor/ansi/brights/selection`).
|
||||
2. Run the generator during install and **hook it into `omarchy-theme-set`** so it regenerates on every theme switch, then signals WezTerm to reload (WezTerm auto-reloads config; ensure `automatically_reload_config = true`).
|
||||
3. Ship a WezTerm config that loads it: `local ok, theme = pcall(dofile, wezterm.home_dir .. "/.config/omarchy/current/theme/wezterm.lua"); if ok then config.colors = theme end`, with a safe fallback if the file is absent.
|
||||
- Confirm every Omarchy theme that previously had `alacritty.toml` now yields a working WezTerm palette.
|
||||
|
||||
## 4. Integrating these dotfiles (repo: brianpooe/dotfiles)
|
||||
|
||||
These dotfiles are the source of truth for editor/shell/terminal config. Integrate them into the install **without breaking Omarchy's theme switcher**. Read the repo first; key facts:
|
||||
|
||||
- **Theming is env-var-driven (Kanagawa).** `.zshrc` reads `KANAGAWA_THEME` (`wave`|`dragon`) and exports `NVIM_THEME / TMUX_THEME / STARSHIP_THEME / WEZTERM_THEME / STARSHIP_CONFIG`, and writes `~/.config/tmux/current-theme.conf`. `wezterm.lua`, `tmux.conf`, `theme.lua` (kanagawa.nvim) and starship all consume these.
|
||||
- **This conflicts with Omarchy's per-app theme switching.** Resolve it explicitly — pick one and implement consistently, do not half-wire both:
|
||||
- **Option A (recommended):** WezTerm follows Omarchy's live theme (section 3); the editor/shell stack (nvim, tmux, starship) stays Kanagawa via the dotfiles' `KANAGAWA_THEME` env chain, independent of Omarchy. Document that terminal colors and editor colors are decoupled by design. To avoid a clash, drop the dotfiles' hardcoded Kanagawa palette from `wezterm.lua` and replace it with the Omarchy-theme loader from section 3.
|
||||
- **Option B:** Make nvim/tmux/starship also follow Omarchy themes by having `omarchy-theme-set` set `KANAGAWA_THEME`/regenerate the selector files — only viable for Omarchy themes that have a Kanagawa-equivalent; state the limitation.
|
||||
- **Deploy via symlinks (GNU stow or `ln -sfn`), idempotently**, mirroring the repo's own README mapping: `nvim, tmux, starship, lazygit, wezterm, zed → ~/.config/...`; `.config/.ideavimrc → ~/.ideavimrc`; `.zshrc`, `.gitconfig → ~`. Back up any pre-existing target before symlinking. Clone the repo to `~/dotfiles` (or accept a path arg) and link from there so `git pull` keeps things live.
|
||||
- **Distro: the dotfiles are Arch-native — no dnf/Fedora cleanup needed.** Just install their dependencies via Omarchy's package step (pacman/yay): `zsh, zsh-syntax-highlighting, zsh-autosuggestions, fzf, fd, bat, eza, zoxide, tmux, lazygit, neovim, starship`. The `.zshrc` already sources zsh plugins from `/usr/share/zsh/plugins/...` and fzf from `/usr/share/fzf/`, and its `update` alias already uses `pacman -Syu`. Install `nvm` per the dotfiles' note and tpm (`~/.tmux/plugins/tpm`) so tmux works on first launch.
|
||||
- **WezTerm config reconciliation:** the repo's `wezterm.lua` is already Linux-only (no macOS/Windows branches). Use it as the base, but swap its Kanagawa-by-env palette for the Omarchy-theme loader (section 3) so the chosen option above holds.
|
||||
- Set **zsh** as the login shell if the dotfiles assume it (they do — `.zshrc` auto-attaches tmux).
|
||||
|
||||
## 5. Menu changes — `Super + Alt + Space` launcher
|
||||
|
||||
Remove these submenus and all their entries:
|
||||
|
||||
- **Setup menu:** System Sleep, DNS, Security
|
||||
- **Install menu:** Web App, Services, TUI, Development, Editor, Terminal, Browser, AI, Gaming, Windows
|
||||
|
||||
If "Setup" or "Install" has no children left, remove the parent. Update keybind hints/docs referencing removed menus.
|
||||
|
||||
## 6. Deliverables
|
||||
|
||||
1. `install.sh` — idempotent entry point, safe to re-run.
|
||||
2. Sourced modules (e.g. `lib/packages.sh`, `lib/menus.sh`, `lib/browser.sh`, `lib/terminal.sh`, `lib/dotfiles.sh`).
|
||||
3. Modified launcher menu config (match Omarchy's walker/wofi/rofi).
|
||||
4. The WezTerm theme generator + the `omarchy-theme-set` hook.
|
||||
5. `README.md`: prerequisites, what was removed vs upstream Omarchy, the terminal/browser swaps, how dotfiles are linked, and the theming decision (Option A/B) you made and why.
|
||||
6. A diff-style summary listing every removal, both swaps, and each dotfile integration point, so a reviewer can verify nothing was missed.
|
||||
|
||||
## Constraints
|
||||
|
||||
- Linux/Arch only. No macOS/Windows/WSL branches (the dotfiles are already stripped of these — keep them that way).
|
||||
- Don't invent package or Omarchy script names — if unsure what Omarchy calls something, say so and ask rather than guess.
|
||||
- shellcheck-clean. No `curl | bash` from untrusted sources. Pin versions where Omarchy does.
|
||||
- Begin by listing the files you plan to produce, then output each in full.
|
||||
|
|
@ -7,9 +7,9 @@ Ubuntu 24.04 / Debian-derivative) to the state these dotfiles assume.
|
|||
|
||||
| Source | What lives there | Why |
|
||||
|--------|------------------|-----|
|
||||
| **apt** | `zsh`, `git`, `curl`, `build-essential`, `wl-clipboard`, `wezterm`, `brave-browser-beta` | System base + GUI vendor apps. Vendor apt repos auto-update Brave/WezTerm with `apt upgrade`. |
|
||||
| **apt** | `zsh`, `git`, `curl`, `build-essential`, `python3`, `python3-pip`, `python3-venv`, `luarocks`, `wl-clipboard`, `wezterm`, `brave-browser-beta` | System base, Mason prerequisites, and GUI vendor apps. Vendor apt repos auto-update Brave/WezTerm with `apt upgrade`. |
|
||||
| **Homebrew** | `fzf` `fd` `bat` `eza` `zoxide` `ripgrep` `tmux` `neovim` `lazygit` `starship` `gh` `zsh-syntax-highlighting` `zsh-autosuggestions` | CLI toolchain. Ubuntu 24.04's apt versions are frozen at April 2024; brew always has latest. One `brew upgrade` updates all of them. |
|
||||
| **nvm** | Node.js runtime | The standard nvm one-liner — `.zshrc` already sources `~/.nvm/nvm.sh`. |
|
||||
| **nvm** | Node.js runtime | Installs the latest LTS release and sets it as the default; `.zshrc` sources `~/.nvm/nvm.sh`. |
|
||||
| **tpm** | tmux plugin manager | Clone of `tmux-plugins/tpm` so the bundled `tmux.conf` works on first launch. |
|
||||
|
||||
GitHub-release-binary downloads (the previous approach for nvim/lazygit/
|
||||
|
|
@ -69,11 +69,11 @@ install/
|
|||
## What the installer does, in order
|
||||
|
||||
1. **preflight** — verify apt + not-root + sudo + curl.
|
||||
2. **apt base** — `zsh git curl wget ca-certificates gnupg build-essential procps file unzip xz-utils wl-clipboard`.
|
||||
2. **apt base** — system packages plus Mason's Python venv/pip and LuaRocks prerequisites.
|
||||
3. **WezTerm apt repo** → `apt install wezterm`.
|
||||
4. **Brave Beta apt repo** → `apt install brave-browser-beta`.
|
||||
5. **Homebrew install** (NONINTERACTIVE) + `brew bundle` against `Brewfile`.
|
||||
6. **nvm** (pinned `$NVM_VERSION`, default `v0.40.1`).
|
||||
6. **nvm** (pinned `$NVM_VERSION`, default `v0.40.1`) + latest LTS Node.js.
|
||||
7. **tpm** clone to `~/.tmux/plugins/tpm`.
|
||||
8. **Symlink** `nvim tmux starship lazygit wezterm zed → ~/.config/...`;
|
||||
`.config/.ideavimrc → ~/.ideavimrc`; `.zshrc`, `.gitconfig → ~`.
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
# Pop!_OS / Ubuntu installer for these dotfiles.
|
||||
#
|
||||
# What it does (idempotent — safe to re-run):
|
||||
# 1. apt: system base (zsh, git, curl, build-essential, wl-clipboard).
|
||||
# 1. apt: system base + Mason prerequisites (Python venv/pip, LuaRocks).
|
||||
# 2. Vendor apt repos: WezTerm, Brave Beta (GUI apps stay on apt).
|
||||
# 3. Homebrew + Brewfile: fzf, fd, bat, eza, zoxide, ripgrep, tmux,
|
||||
# neovim, lazygit, starship, gh, zsh plugins — always latest,
|
||||
# updated later with a single `brew upgrade`.
|
||||
# 4. nvm + tmux plugin manager (tpm).
|
||||
# 4. nvm + latest LTS Node.js + tmux plugin manager (tpm).
|
||||
# 5. Symlinks dotfiles into ~ and ~/.config.
|
||||
# 6. Switches login shell to zsh.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -6,12 +6,20 @@ NVM_VERSION="${NVM_VERSION:-v0.40.1}"
|
|||
install_nvm() {
|
||||
if [[ -s $HOME/.nvm/nvm.sh ]]; then
|
||||
info "nvm already installed"
|
||||
return
|
||||
fi
|
||||
else
|
||||
info "Installing nvm ($NVM_VERSION)..."
|
||||
PROFILE=/dev/null bash -c \
|
||||
"curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/$NVM_VERSION/install.sh | bash" ||
|
||||
warn "nvm install failed (install manually if you need Node)"
|
||||
fi
|
||||
|
||||
if [[ -s $HOME/.nvm/nvm.sh ]]; then
|
||||
# Mason needs npm for its Node-backed language servers and tools.
|
||||
# Keep Node owned by nvm rather than installing the distro nodejs package.
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
nvm install --lts
|
||||
nvm alias default 'lts/*'
|
||||
fi
|
||||
}
|
||||
|
||||
install_tpm() {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@ APT_PACKAGES=(
|
|||
unzip
|
||||
xz-utils
|
||||
|
||||
# Mason prerequisites for Python and Lua packages
|
||||
python3
|
||||
python3-pip
|
||||
python3-venv
|
||||
luarocks
|
||||
|
||||
# Wayland clipboard (Pop!_OS Cosmic is Wayland-native)
|
||||
wl-clipboard
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue