diff --git a/README.md b/README.md index 7002de3..c303f01 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,206 @@ # Moonarch -Reproducible Arch Linux setup with Niri (Wayland compositor), greetd/moongreet, Catppuccin Mocha theming and full automation. +Reproducible Arch Linux desktop environment — fully automated from bare metal to a +configured Niri (scrollable tiling Wayland) system with Catppuccin Mocha theming. + +Moonarch combines archinstall for the base system with post-install automation that +handles packages, XDG defaults, system services, greeter, idle management, and a +suite of rofi-based helper tools. The result is a complete development/productivity +desktop that can be rebuilt from scratch in minutes. + +## Why These Choices + +| Component | Choice | Why | +|-----------|--------|-----| +| **Compositor** | [Niri](https://github.com/YaLTeR/niri) | Scrollable tiling — no fixed grid, infinite horizontal workspace. Purpose-built Wayland compositor, not an X11 port. | +| **Greeter** | [greetd](https://sr.ht/~kennylevinsen/greetd/) + [moongreet](https://gitea.moonarch.de/nevaforget/moongreet) | Minimal, Wayland-native login. moongreet provides GTK4 UI with fingerprint support, running inside its own Niri instance. | +| **Lock Screen** | [moonlock](https://gitea.moonarch.de/nevaforget/moonlock) | ext-session-lock-v1 protocol — compositor guarantees lock on crash. PAM + fprintd, GPU blur, multi-monitor. | +| **Power Menu** | [moonset](https://gitea.moonarch.de/nevaforget/moonset) | GTK4 Layer Shell overlay above Waybar. Lock, logout, hibernate, reboot, shutdown with confirmation. | +| **Idle Manager** | [stasis](https://aur.archlinux.org/packages/stasis) | Separate AC/battery power plans. Brightness dimming, DPMS, lock (via moonlock), and suspend on configurable timeouts. | +| **Bar** | [Waybar](https://github.com/Alexays/Waybar) | Wayland-native, highly customizable. Niri workspace/window modules via community plugins. | +| **Launcher** | [Rofi](https://github.com/lbonn/rofi) (lbonn Wayland fork) | Versatile dmenu replacement. Powers app launcher, clipboard, bluetooth, volume, VPN, CPU governor, and session menus. | +| **Terminal** | [Foot](https://codeberg.org/dnkl/foot) | Fast, minimal Wayland-native terminal. Server mode for instant window spawning. | +| **Shell** | Zsh | Programmable completion, FZF integration, syntax highlighting. | +| **Audio** | PipeWire | Drop-in replacement for PulseAudio/JACK with lower latency. RNNoise input denoising configured out of the box. | +| **Display Management** | [kanshi](https://sr.ht/~emersion/kanshi/) + [wdisplays](https://github.com/artizirk/wdisplays) | kanshi auto-switches output profiles on hotplug. wdisplays for manual GUI configuration. | +| **Notifications** | [dunst](https://dunst-project.org/) | Lightweight, scriptable. DND mode exposed as Waybar module. | +| **Clipboard** | [cliphist](https://github.com/sentriz/cliphist) + wl-clipboard | Text and image history. Rofi frontend for selection, wl-paste watches the clipboard. | +| **Theme** | Catppuccin Mocha | Consistent dark palette across GTK, terminal, bar, rofi, notifications, and lock screen. | +| **Icons** | Colloid-Grey-Catppuccin-Dark | Catppuccin-colored icon set matching the GTK theme. | +| **Cursor** | Sweet-cursors | Visible on dark backgrounds without clashing. | +| **Font** | UbuntuSans Nerd Font | Clean sans-serif with full Nerd Font glyph coverage for bar/terminal icons. | +| **Wallpaper** | [waypaper](https://github.com/anufrievroman/waypaper) + [swww](https://github.com/LGFae/swww) | waypaper provides GUI selection, swww handles animated transitions (60 FPS, 2s crossfade). | +| **Firewall** | UFW | Simple deny-incoming/allow-outgoing default. Sane baseline without iptables complexity. | +| **AUR Helper** | [paru](https://github.com/Morganamilo/paru) | Rust-based, pacman-compatible. Supports custom PKGBUILD repos for moongreet/moonlock/moonset. | ## Quick Start -### Option A: Download config in the live system +### Install -1. Flash the [Arch ISO](https://archlinux.org/download/) to USB and boot from it -2. In the live system: +1. Boot the [Arch ISO](https://archlinux.org/download/) and download the config: ```bash curl -O https://gitea.moonarch.de/nevaforget/moonarch/raw/branch/main/config/user_configuration.json archinstall --config user_configuration.json ``` -3. Choose disk + kernel interactively, the rest comes from the config - -### Option B: Place config on USB stick (Ventoy) - -1. Install [Ventoy](https://www.ventoy.net/) on USB -2. Copy the Arch ISO and `user_configuration.json` to the Ventoy partition -3. Boot from it, then: - ```bash - archinstall --config /run/media/ventoy/user_configuration.json - ``` - -### After archinstall - -1. Reboot — the repo is already in `/opt/moonarch` (via custom-commands) -2. Log in, then: +2. Choose disk and kernel interactively — everything else comes from the config. +3. Reboot, log in, then: ```bash /opt/moonarch/scripts/post-install.sh ``` -3. Reboot again — done +4. Reboot again — done. -## Structure +The archinstall config clones this repo to `/opt/moonarch` via custom-commands. +post-install.sh handles the remaining ~100 packages, all configs, themes, services, +and user setup. -``` -config/ archinstall configuration -packages/ Package lists (official.txt + aur.txt) -scripts/ Post-install, update, theme installer -defaults/ - bin/ moonarch-* helper scripts (/usr/local/bin/) - xdg/ XDG defaults (/etc/xdg/) - shell/ Zsh configuration - etc/ greetd + moongreet configuration - backgrounds/ Default wallpaper -``` - -## Update +### Update ```bash moonarch-update ``` -Updates repo, system packages, missing packages and defaults — all interactive with confirmations. +Interactive updater that syncs the repo, upgrades system/AUR packages, reconciles +package lists against what's installed, deploys changed XDG defaults, and cleans +orphaned packages. -## Stack +## Project Structure -- **Compositor:** Niri (Scrollable Tiling Wayland) -- **Greeter:** greetd + moongreet -- **Bar:** Waybar -- **Launcher:** Rofi (lbonn Wayland Fork) -- **Terminal:** Foot -- **Theme:** Catppuccin Mocha + Sweet Cursors + Newaita Icons -- **Shell:** Zsh +``` +config/ + user_configuration.json archinstall config (locale, audio, services, custom-commands) + +packages/ + official.txt Arch repo packages (~100), one per line + aur.txt AUR packages (~15), one per line + +scripts/ + post-install.sh Main automation (packages, configs, themes, services) + install-themes.sh Cursor theme installer (Sweet-cursors) + update.sh System updater (symlinked to moonarch-update) + +defaults/ + xdg/ System-wide XDG configs (deployed to /etc/xdg/) + niri/config.kdl Compositor: layout, keybinds, startup apps + waybar/config, style.css Bar: modules, layout, Catppuccin styling + rofi/config.rasi, themes/ Launcher: config + 8 applet themes + foot/foot.ini Terminal: font, colors, keybinds + dunst/dunstrc Notifications: geometry, colors, behavior + kanshi/config Display profiles (empty, user-configured) + gtklock/ Lock screen: config, UI layout, CSS + stasis/stasis.rune Idle manager: AC/battery power plans + pipewire/ Audio: RNNoise input denoising + waypaper/config.ini Wallpaper manager: backend, folder, transitions + fastfetch/config.jsonc System info display + gtk-3.0/, gtk-4.0/ GTK theme settings + + bin/ Helper scripts (deployed to /usr/local/bin/) + moonarch-launcher App launcher (rofi drun/run/filebrowser/window) + moonarch-clipboard Clipboard history browser (rofi + cliphist) + moonarch-bluetooth Bluetooth device manager (rofi + bluetoothctl) + moonarch-volume Volume control applet (rofi + amixer/pactl) + moonarch-sink-switcher Audio output switcher (rofi + pactl) + moonarch-vpn VPN connection manager (rofi + nmcli) + moonarch-cpugov CPU governor switcher (rofi + auto-cpufreq) + moonarch-session Session menu (rofi: lock/logout/suspend/reboot/shutdown) + moonarch-setmen Settings menu launcher (rofi script mode) + moonarch-dnd Dunst Do Not Disturb toggle (Waybar JSON output) + moonarch-btnote Bluetooth device battery monitor (upower + notify-send) + moonarch-capsnote Caps Lock toggle notification + moonarch-waybar-cpugov Waybar module: CPU governor status + moonarch-waybar-gpustat Waybar module: GPU utilization + moonarch-waybar-hidpp Waybar module: Logitech HID++ device battery + + shell/zshrc Zsh config: prompt, aliases, FZF, completion + etc/greetd/ greetd daemon + greeter Niri config + etc/moongreet/ moongreet configuration + user/waybar/ Per-user Waybar overrides (only copied if missing) + backgrounds/wallpaper.jpg Default wallpaper (shared by desktop, greeter, lock screen) +``` + +## Startup Sequence + +``` +greetd ─► niri (greeter instance) ─► moongreet ─► user authenticates + │ + ▼ + niri (user session) + │ + ┌─────────┬──────────┬────────┼────────┬──────────┐ + ▼ ▼ ▼ ▼ ▼ ▼ + kanshi waybar dunst foot waypaper cliphist + (outputs) (bar) (notify) (server) (wallpaper) (clipboard) +``` + +## Keybinds (Default) + +| Key | Action | +|-----|--------| +| `Super+Return` | Open terminal (foot) | +| `Super+Space` | App launcher (rofi) | +| `Super+Q` | Close window | +| `Super+O` / `Super+Tab` | Overview | +| `Super+F` | Maximize column | +| `Super+Shift+F` | Fullscreen window | +| `Super+V` | Toggle floating | +| `Super+H/J/K/L` | Focus left/down/up/right | +| `Super+Ctrl+H/J/K/L` | Move window | +| `Super+Shift+H/J/K/L` | Focus monitor | +| `Super+1-9` | Switch workspace | +| `Super+C` | Clipboard history | +| `Super+E` | File manager | +| `Super+A` | Volume control | +| `Super+T` | Settings menu | +| `Super+N` | VPN manager | +| `Super+Alt+L` | Session menu (wlogout) | +| `Print` | Screenshot | +| `Ctrl+Print` | Screenshot screen | +| `Alt+Print` | Screenshot window | + +## Customization + +All system configs live in `/etc/xdg/` and can be overridden per-user in `~/.config/`: + +| Component | System Default | User Override | +|-----------|---------------|---------------| +| Niri | `/etc/xdg/niri/config.kdl` | `~/.config/niri/config.kdl` | +| Waybar | `/etc/xdg/waybar/` | `~/.config/waybar/` | +| Rofi | `/etc/xdg/rofi/` | `~/.config/rofi/` | +| Foot | `/etc/xdg/foot/foot.ini` | `~/.config/foot/foot.ini` | +| Dunst | `/etc/xdg/dunst/dunstrc` | `~/.config/dunst/dunstrc` | +| kanshi | `/etc/xdg/kanshi/config` | `~/.config/kanshi/config` | +| PipeWire | `/etc/xdg/pipewire/` | `~/.config/pipewire/` | +| Zsh | `/etc/zsh/zshrc.moonarch` | `~/.zshrc` + `~/.zshrc.d/` | + +Helper scripts in `/usr/local/bin/moonarch-*` are not meant to be overridden — they +are part of the system and updated via `moonarch-update`. + +## System Services + +| Service | Purpose | +|---------|---------| +| greetd | Login greeter (runs moongreet inside Niri) | +| NetworkManager | Network management (WiFi, VPN, Ethernet) | +| bluetooth | Bluetooth stack (bluez) | +| docker | Container runtime | +| systemd-timesyncd | NTP time synchronization | +| ufw | Firewall (deny incoming, allow outgoing) | +| auto-cpufreq | CPU frequency scaling (AC: performance, battery: powersave) | + +## Moonarch Ecosystem + +Moonarch is the deployment and configuration layer. Three companion projects provide +the Wayland session UI — all built with Rust + gtk4-rs and sharing Catppuccin Mocha +theming: + +| Project | Role | Installed via | +|---------|------|---------------| +| [moongreet](https://gitea.moonarch.de/nevaforget/moongreet) | greetd greeter (GTK4 Layer Shell, fingerprint, i18n) | `paru -S moongreet-git` | +| [moonlock](https://gitea.moonarch.de/nevaforget/moonlock) | Wayland lock screen (ext-session-lock-v1, PAM, fprintd) | `paru -S moonlock-git` | +| [moonset](https://gitea.moonarch.de/nevaforget/moonset) | Power menu overlay (GTK4 Layer Shell) | `paru -S moonset-git` | + +These are built from a [custom paru package repository](https://gitea.moonarch.de/nevaforget/moonarch-pkgbuilds) +added during post-install. + +## License + +MIT diff --git a/defaults/bin/moonarch-btnote b/defaults/bin/moonarch-btnote index 2361f67..4839157 100755 --- a/defaults/bin/moonarch-btnote +++ b/defaults/bin/moonarch-btnote @@ -3,7 +3,7 @@ # ABOUTME: Can be run periodically via timer or cron. NOTIFY_AT_PERCENTAGE=70 -ICON="/usr/share/icons/Newaita-reborn/status/symbolic/battery-empty-symbolic.svg" +ICON="battery-empty" for d in $(upower -e); do DEVICE_DATA=$(upower -i "$d") diff --git a/defaults/xdg/gtk-3.0/settings.ini b/defaults/xdg/gtk-3.0/settings.ini index 03bfbef..ed20b1b 100644 --- a/defaults/xdg/gtk-3.0/settings.ini +++ b/defaults/xdg/gtk-3.0/settings.ini @@ -3,7 +3,7 @@ [Settings] gtk-theme-name=Colloid-Catppuccin -gtk-icon-theme-name=Newaita-reborn-gray-dark +gtk-icon-theme-name=Colloid-Grey-Catppuccin-Dark gtk-font-name=UbuntuSans Nerd Font 11 gtk-cursor-theme-name=Sweet-cursors gtk-cursor-theme-size=24