Notes for people who want to work on Moonrice itself.
install.sh # the installer (plan table + generators)
bin/moonrice # post-install management CLI
bin/palettes.json # palette variants (moon / main / dawn)
scripts/lint.sh # local + CI lint
config/ # mirrors ~/.config
hypr/ # hyprland.lua, keymap.lua, modules, scripts, lock/idle
hyprland/colors.conf # window borders + hyprbars (themed)
caelestia/
config.json # → ~/.config/illogical-impulse/config.json
generated/ # pinned material palette (colors.json, scss, sequences)
wallpapers/ # pack → ~/.local/share/moonrice/wallpapers/
kitty/ swaync/ btop/ rofi/ nvim/ starship.toml fastfetch/ fontconfig/
cmus/ lazygit/ yazi/ fetchx/
home/ # $HOME root files (.zshrc, .tmux.conf)
docs/ # the wiki (mkdocs)
detect_monitors()reads the live layout via hyprctl →MONITORS.generate_monitor_config()writesmonitors.conf+custom/rules.conf(workspace pinning) — falls back to shipped defaults without a session.sync_keybinds()builds the final keybinds: staged file →adapt_keybinds(comment out missing tools) → monitor-focus block → compare → install.patch_home_paths()rewrites the author's/home/swadhinto$HOME; the PLAN loop compares normalized content so re-runs are clean.- Theme files are written to
~/.local/state/quickshell/user/generated/(Caelestia hot-reloads them). - Cursor build (
Bibata-Material-Rose-Pine) and TPM clone are one-shot, skip-safe steps.
moonrice palette set <variant>:
- regenerates the Caelestia material theme from
bin/palettes.json(same role mapping the installer's generator uses), - re-hexes every file in the CLI's
targetsset via a variant-wide old-hex→new-hex map, - swaps the
vividtheme name in.zshrcfor LS_COLORS.
Adding a variant: extend bin/palettes.json (roles + ansi + vivid name).
Derived roles (darker/low/high/*Dim/*Container) must be present for the
material generation.
HOME=/tmp/fakehome bash install.sh --apply --skip-cursor # full run
HOME=/tmp/fakehome bash install.sh --apply --skip-cursor # again: expect 0 written
HOME=/tmp/fakehome bash install.sh --rollback <stamp>
HOME=/tmp/fakehome bash bin/moonrice doctor
bash scripts/lint.shThe CI runs the same smoke test in an archlinux container.
set -euo pipefail— a failing[ x ] && cmdat the end of a function kills the script; useifblocks there.- The wallpaper is always installed as
moonrice.jpg; the stagedconfig.jsonpoints at/home/swadhin/Pictures/Wallpapers/moonrice.jpgand gets rewritten to$HOMEat install. - Monitor names are machine-specific — never hardcode them; the generator owns them.