All checks were successful
Build and publish packages / build-and-publish (push) Successful in 11s
229 lines
6.6 KiB
Bash
229 lines
6.6 KiB
Bash
# ABOUTME: PKGBUILD for Moonarch — desktop environment defaults for Niri + Catppuccin Mocha.
|
|
# ABOUTME: Deploys XDG configs, helper scripts, zsh defaults, wallpaper and moonarch-update.
|
|
|
|
# Maintainer: Dominik Kressler
|
|
|
|
pkgname=moonarch-git
|
|
pkgver=r116.d5c1b8a
|
|
pkgrel=10
|
|
pkgdesc="Moonarch desktop environment defaults — Niri, Waybar, Catppuccin Mocha"
|
|
arch=('any')
|
|
url="https://gitea.moonarch.de/nevaforget/moonarch"
|
|
license=('MIT')
|
|
install=moonarch.install
|
|
|
|
depends=(
|
|
# Moonarch ecosystem (own registry)
|
|
'moongreet-git'
|
|
'moonlock-git'
|
|
'moonset-git'
|
|
|
|
# Compositor & session
|
|
'niri'
|
|
'xwayland-satellite'
|
|
'greetd'
|
|
|
|
# Bar & notifications
|
|
'waybar'
|
|
'swaync'
|
|
'libnotify'
|
|
|
|
# Terminal
|
|
'foot'
|
|
'foot-terminfo'
|
|
|
|
# Clipboard
|
|
'cliphist'
|
|
'wl-clipboard'
|
|
|
|
# Display
|
|
'kanshi'
|
|
'wlsunset'
|
|
'nwg-look'
|
|
'brightnessctl'
|
|
|
|
# Wallpaper
|
|
'awww'
|
|
|
|
# Audio
|
|
'pipewire'
|
|
'pipewire-alsa'
|
|
'pipewire-jack'
|
|
'pipewire-pulse'
|
|
'wireplumber'
|
|
'libpulse'
|
|
'alsa-utils'
|
|
'pavucontrol'
|
|
'gst-plugin-pipewire'
|
|
|
|
# Network
|
|
'networkmanager'
|
|
'network-manager-applet'
|
|
'networkmanager-openvpn'
|
|
'openvpn'
|
|
|
|
# Bluetooth
|
|
'bluez'
|
|
'bluez-utils'
|
|
|
|
# File manager & portals
|
|
'gvfs'
|
|
'gvfs-dnssd'
|
|
'gvfs-mtp'
|
|
'gvfs-smb'
|
|
'udisks2'
|
|
'ntfs-3g'
|
|
'xdg-desktop-portal-gnome'
|
|
'xdg-desktop-portal-gtk'
|
|
'qt6-5compat'
|
|
|
|
# Theming & fonts
|
|
'ttf-ubuntusans-nerd'
|
|
|
|
# Shell
|
|
'zsh'
|
|
'zsh-autosuggestions'
|
|
'zsh-syntax-highlighting'
|
|
|
|
# CLI tools (referenced by zshrc + helper scripts)
|
|
'bat'
|
|
'btop'
|
|
'eza'
|
|
'fastfetch'
|
|
'fd'
|
|
'fzf'
|
|
'jq'
|
|
'lazygit'
|
|
'ripgrep'
|
|
|
|
# Editor & VCS
|
|
'neovim'
|
|
'git'
|
|
|
|
# System
|
|
'fwupd'
|
|
'ufw'
|
|
'polkit-gnome'
|
|
'upower'
|
|
)
|
|
|
|
optdepends=(
|
|
'docker: container runtime'
|
|
'docker-compose: multi-container orchestration'
|
|
'rustup: Rust toolchain manager (development)'
|
|
'waterfox-bin: web browser'
|
|
)
|
|
|
|
makedepends=('git')
|
|
provides=('moonarch')
|
|
conflicts=('moonarch')
|
|
source=("git+${url}.git")
|
|
sha256sums=('SKIP')
|
|
|
|
pkgver() {
|
|
cd "$srcdir/moonarch"
|
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/moonarch"
|
|
|
|
# --- XDG configs -> /etc/xdg/ ---
|
|
# walker/config.toml is excluded (owned by walker package).
|
|
# Our override is installed to /usr/share/moonarch/ and deployed
|
|
# to /etc/skel/ + existing user homes via the .install hook.
|
|
local _xdg_src="defaults/xdg"
|
|
while IFS= read -r -d '' file; do
|
|
local _rel="${file#"$_xdg_src/"}"
|
|
[[ "$_rel" == "walker/config.toml" ]] && continue
|
|
[[ "$_rel" == "foot/foot.ini" ]] && continue
|
|
[[ "$_rel" == "waybar/style.css" ]] && continue
|
|
[[ "$_rel" == "swaync/config.json" ]] && continue
|
|
[[ "$_rel" == "swaync/style.css" ]] && continue
|
|
if [[ "$file" == *.sh ]]; then
|
|
install -Dm755 "$file" "$pkgdir/etc/xdg/$_rel"
|
|
else
|
|
install -Dm644 "$file" "$pkgdir/etc/xdg/$_rel"
|
|
fi
|
|
done < <(find "$_xdg_src" -type f -print0)
|
|
|
|
# GTK4 theme symlinks (override settings.ini already installed above)
|
|
ln -sf /usr/share/themes/Colloid-Grey-Dark-Catppuccin/gtk-4.0/gtk-dark.css \
|
|
"$pkgdir/etc/xdg/gtk-4.0/gtk.css"
|
|
ln -sf /usr/share/themes/Colloid-Grey-Dark-Catppuccin/gtk-4.0/gtk-dark.css \
|
|
"$pkgdir/etc/xdg/gtk-4.0/gtk-dark.css"
|
|
ln -sf /usr/share/themes/Colloid-Grey-Dark-Catppuccin/gtk-4.0/assets \
|
|
"$pkgdir/etc/xdg/gtk-4.0/assets"
|
|
|
|
# --- Helper scripts -> /usr/bin/ ---
|
|
install -Dm755 defaults/bin/moonarch-* -t "$pkgdir/usr/bin/"
|
|
|
|
# moonarch-update + shorthand alias
|
|
install -Dm755 scripts/moonarch-update "$pkgdir/usr/bin/moonarch-update"
|
|
ln -s moonarch-update "$pkgdir/usr/bin/moonup"
|
|
|
|
# moonarch-doctor + shorthand alias
|
|
install -Dm755 scripts/moonarch-doctor "$pkgdir/usr/bin/moonarch-doctor"
|
|
ln -s moonarch-doctor "$pkgdir/usr/bin/moondoc"
|
|
|
|
# awww compatibility symlinks (waypaper calls swww)
|
|
ln -sf /usr/bin/awww "$pkgdir/usr/bin/swww"
|
|
ln -sf /usr/bin/awww-daemon "$pkgdir/usr/bin/swww-daemon"
|
|
|
|
# --- Zsh config ---
|
|
install -Dm644 defaults/shell/zshrc "$pkgdir/etc/zsh/zshrc.moonarch"
|
|
|
|
# --- Wallpaper ---
|
|
install -Dm644 defaults/backgrounds/wallpaper.jpg \
|
|
"$pkgdir/usr/share/moonarch/wallpaper.jpg"
|
|
|
|
# --- Package lists (data files for moonarch-update) ---
|
|
install -Dm644 packages/official.txt "$pkgdir/usr/share/moonarch/official.txt"
|
|
install -Dm644 packages/aur.txt "$pkgdir/usr/share/moonarch/aur.txt"
|
|
|
|
# --- Walker config override (deployed to user homes by .install) ---
|
|
install -Dm644 defaults/xdg/walker/config.toml \
|
|
"$pkgdir/usr/share/moonarch/walker-config.toml"
|
|
|
|
# --- Configs owned by other packages (deployed by .install, not owned here) ---
|
|
install -Dm644 defaults/xdg/foot/foot.ini \
|
|
"$pkgdir/usr/share/moonarch/foot/foot.ini"
|
|
install -Dm644 defaults/xdg/waybar/style.css \
|
|
"$pkgdir/usr/share/moonarch/waybar/style.css"
|
|
install -Dm644 defaults/xdg/swaync/config.json \
|
|
"$pkgdir/usr/share/moonarch/swaync/config.json"
|
|
install -Dm644 defaults/xdg/swaync/style.css \
|
|
"$pkgdir/usr/share/moonarch/swaync/style.css"
|
|
|
|
# --- Reference configs for greetd/moongreet (deployed by .install, not owned) ---
|
|
install -Dm644 defaults/etc/greetd/config.toml \
|
|
"$pkgdir/usr/share/moonarch/greetd/config.toml"
|
|
install -Dm644 defaults/etc/greetd/niri-greeter.kdl \
|
|
"$pkgdir/usr/share/moonarch/greetd/niri-greeter.kdl"
|
|
install -Dm644 defaults/etc/moongreet/moongreet.toml \
|
|
"$pkgdir/usr/share/moonarch/moongreet/moongreet.toml"
|
|
|
|
# --- Systemd user services -> /etc/systemd/user/ ---
|
|
install -Dm644 defaults/etc/systemd/user/*.service -t "$pkgdir/etc/systemd/user/"
|
|
|
|
# Enable services by creating the WantedBy symlinks directly
|
|
install -dm755 "$pkgdir/etc/systemd/user/graphical-session.target.wants"
|
|
for svc in defaults/etc/systemd/user/*.service; do
|
|
ln -sf "../$(basename "$svc")" \
|
|
"$pkgdir/etc/systemd/user/graphical-session.target.wants/$(basename "$svc")"
|
|
done
|
|
|
|
# --- udev rules -> /usr/lib/udev/rules.d/ ---
|
|
install -Dm644 defaults/etc/udev/rules.d/90-moonarch-battery.rules \
|
|
"$pkgdir/usr/lib/udev/rules.d/90-moonarch-battery.rules"
|
|
|
|
# --- Systemd system service (battery conservation restore) -> /usr/lib/systemd/system/ ---
|
|
install -Dm644 defaults/etc/systemd/system/moonarch-batsaver.service \
|
|
"$pkgdir/usr/lib/systemd/system/moonarch-batsaver.service"
|
|
|
|
}
|
|
|
|
backup=(
|
|
'etc/zsh/zshrc.moonarch'
|
|
)
|