123 lines
6.8 KiB
Shell
123 lines
6.8 KiB
Shell
#!/usr/bin/env bash
|
|
# What a niri desktop needs to be usable on its own, by group and by distro. niri is only a
|
|
# compositor: the portals, polkit agent, keyring, audio stack, fonts and icons come from here.
|
|
# Names for Fedora and Debian are best effort (several come from COPR/PPAs or are built from
|
|
# source there; the installer says so for any it cannot find).
|
|
# Each entry: "what it is for|package". Missing packages on a distro are listed as "-".
|
|
|
|
# --- Arch (and CachyOS, EndeavourOS, Manjaro, Artix) ---------------------------------
|
|
ARCH_BUILD=(
|
|
"building the shell|rust" "building the shell|base-devel" "wayland headers|pkgconf" "the lock's password check|pam"
|
|
)
|
|
ARCH_DESKTOP=(
|
|
"the compositor|niri" "X11 apps under niri|xwayland-satellite"
|
|
"portals (screen sharing, file pickers)|xdg-desktop-portal"
|
|
"portal fallback (settings, GTK)|xdg-desktop-portal-gtk" "polkit prompts|polkit-gnome" "secret-tool|libsecret"
|
|
"xdg user folders|xdg-user-dirs" "xdg-open|xdg-utils" "mime defaults|shared-mime-info"
|
|
"removable drives|udisks2" "desktop launchers and trash|glib2"
|
|
)
|
|
ARCH_SERVICES=(
|
|
"audio server, pw-play and pw-dump|pipewire" "pipewire pulse|pipewire-pulse" "pipewire alsa|pipewire-alsa" "session manager, wpctl|wireplumber"
|
|
"pactl|libpulse" "network|networkmanager" "bluetooth|bluez" "bluetoothctl|bluez-utils"
|
|
"power profiles|power-profiles-daemon" "brightness|brightnessctl" "pci info|pciutils"
|
|
)
|
|
ARCH_TOOLS=(
|
|
"colours from the wallpaper|matugen" "clipboard|wl-clipboard" "lock screen until the shell's own is proved|swaylock" "idle lock and sleep|swayidle"
|
|
"calculator|libqalculate" "screenshots|grim" "launcher emoji list|unicode-emoji"
|
|
"visualiser bars|libcava" "visualiser tempo|aubio" "drives on the Storage page (lsblk)|util-linux"
|
|
"notifications from scripts|libnotify"
|
|
"lyrics and weather|curl"
|
|
)
|
|
ARCH_THEME=(
|
|
"icon font|ttf-material-symbols-variable" "clock and workspace font|ttf-rubik-vf" "mono font|ttf-jetbrains-mono-nerd"
|
|
"text fonts|noto-fonts" "emoji|noto-fonts-emoji"
|
|
"app icons|papirus-icon-theme" "GTK theme|adw-gtk-theme"
|
|
)
|
|
|
|
# --- Fedora ---------------------------------------------------------------------------
|
|
FEDORA_BUILD=( "building the shell|rust" "building the shell|cargo" "building the shell|gcc" "headers|pkgconf-pkg-config" "the lock's password check|pam-devel" )
|
|
FEDORA_DESKTOP=(
|
|
"the compositor|niri" "X11 apps under niri|xwayland-satellite"
|
|
"portals|xdg-desktop-portal" "portal fallback|xdg-desktop-portal-gtk"
|
|
"polkit prompts|polkit-gnome" "secret-tool|libsecret"
|
|
"xdg user folders|xdg-user-dirs" "xdg-open|xdg-utils" "removable drives|udisks2" "desktop launchers and trash|glib2"
|
|
)
|
|
FEDORA_SERVICES=(
|
|
"audio server|pipewire" "pw-play and pw-dump|pipewire-utils" "pipewire pulse|pipewire-pulseaudio" "session manager|wireplumber" "pactl|pulseaudio-utils"
|
|
"network|NetworkManager" "bluetooth|bluez" "power profiles|power-profiles-daemon" "brightness|brightnessctl" "pci info|pciutils"
|
|
)
|
|
FEDORA_TOOLS=(
|
|
"colours from the wallpaper|matugen" "clipboard|wl-clipboard" "lock screen until the shell's own is proved|swaylock" "idle lock and sleep|swayidle"
|
|
"calculator|libqalculate" "screenshots|grim" "launcher emoji list|unicode-emoji" "notifications from scripts|libnotify" "lyrics and weather|curl"
|
|
"visualiser tempo|aubio" "drives on the Storage page (lsblk)|util-linux"
|
|
)
|
|
FEDORA_THEME=(
|
|
"icon font|google-material-symbols-fonts" "clock font|rubik-fonts" "mono font|jetbrains-mono-fonts"
|
|
"text fonts|google-noto-sans-fonts" "emoji|google-noto-emoji-fonts"
|
|
"app icons|papirus-icon-theme" "GTK theme|adw-gtk3-theme"
|
|
)
|
|
|
|
# --- Debian / Ubuntu ------------------------------------------------------------------
|
|
DEBIAN_BUILD=( "building the shell|cargo" "building the shell|build-essential" "headers|pkg-config" "the lock's password check|libpam0g-dev" )
|
|
DEBIAN_DESKTOP=(
|
|
"the compositor|niri" "X11 apps under niri|xwayland-satellite"
|
|
"portals|xdg-desktop-portal" "portal fallback|xdg-desktop-portal-gtk"
|
|
"polkit prompts|policykit-1-gnome" "secret-tool|libsecret-tools"
|
|
"xdg user folders|xdg-user-dirs" "xdg-open|xdg-utils" "removable drives|udisks2" "desktop launchers and trash|libglib2.0-bin"
|
|
)
|
|
DEBIAN_SERVICES=(
|
|
"audio server|pipewire" "pw-play and pw-dump|pipewire-bin" "pipewire pulse|pipewire-pulse" "session manager|wireplumber" "pactl|pulseaudio-utils"
|
|
"network|network-manager" "bluetooth|bluez" "power profiles|power-profiles-daemon" "brightness|brightnessctl" "pci info|pciutils"
|
|
)
|
|
DEBIAN_TOOLS=(
|
|
"colours from the wallpaper|matugen" "clipboard|wl-clipboard" "lock screen until the shell's own is proved|swaylock" "idle lock and sleep|swayidle"
|
|
"calculator|qalc" "screenshots|grim" "notifications from scripts|libnotify-bin" "lyrics and weather|curl"
|
|
"visualiser tempo|libaubio5" "drives on the Storage page (lsblk)|util-linux"
|
|
)
|
|
DEBIAN_THEME=(
|
|
"icon font|fonts-material-design-icons-iconfont" "clock font|fonts-rubik" "mono font|fonts-jetbrains-mono"
|
|
"text fonts|fonts-noto-core" "emoji|fonts-noto-color-emoji"
|
|
"app icons|papirus-icon-theme" "GTK theme|adw-gtk3"
|
|
)
|
|
|
|
# What a tick on the installer's Setup page brings. Not in the groups above, so a choice left off
|
|
# costs nothing.
|
|
option_packages() {
|
|
case "$1:$BASE_DISTRO" in
|
|
terminal:*) echo kitty fish starship fastfetch ;;
|
|
portals:*) echo xdg-desktop-portal-gnome ;;
|
|
keyring:*) echo gnome-keyring ;;
|
|
qt:*) echo qt6ct ;;
|
|
monitors:*) echo ddcutil ;;
|
|
automount:*) echo udiskie ;;
|
|
nightlight:*) echo wlsunset ;;
|
|
# The frame that gives a video its colours comes from ffmpeg. mpvpaper is AUR only on
|
|
# Arch and has no Fedora or Debian package: 05-extras says so.
|
|
video:arch) echo mpvpaper ffmpeg ;;
|
|
video:fedora) echo ffmpeg-free ;;
|
|
video:*) echo ffmpeg ;;
|
|
# wl-clip-persist is built with cargo where there is no package (01-ensure-prereqs).
|
|
clipboard:arch) echo cliphist wl-clip-persist ;;
|
|
clipboard:*) echo cliphist ;;
|
|
tray:arch) echo xembed-sni-proxy-standalone-git ;;
|
|
recording:fedora) echo gpu-screen-recorder ffmpeg-free ;;
|
|
recording:*) echo gpu-screen-recorder ffmpeg ;;
|
|
ocr:arch) echo tesseract tesseract-data-eng ;;
|
|
ocr:fedora) echo tesseract ;;
|
|
ocr:debian) echo tesseract-ocr ;;
|
|
annotate:arch) echo satty ;;
|
|
annotate:*) echo swappy ;;
|
|
login:arch) echo sddm caelestia-sddm-locklike-git file ;;
|
|
cjk:arch) echo noto-fonts-cjk ;;
|
|
cjk:fedora) echo google-noto-sans-cjk-fonts ;;
|
|
cjk:debian) echo fonts-noto-cjk ;;
|
|
esac
|
|
}
|
|
|
|
# Prints "why|package" lines for the group on this distro.
|
|
package_set() {
|
|
local group="$1" name
|
|
name="$(printf '%s' "$BASE_DISTRO" | tr '[:lower:]' '[:upper:]')_${group}"
|
|
local -n arr="$name" 2>/dev/null || return 0
|
|
printf '%s\n' "${arr[@]}"
|
|
}
|