Files
euri-packages/packages/calamares-branding-antergos-next-minimal/calamares-next.sh
T
c-ludenberg 82ff06c4da feat: bury offline mode, ship antergos-layan-theme
remember when i thought an offline installer was a good idea?
a pre-built squashfs that still needed internet to install DEs?
"offline" in name only. it was a lie. a beautiful, naive lie.

so i killed it. ripped out the mode picker, the connectivity check,
the whole AskMode() circus. calamares-next now just shows a notice
saying "yeah that wasnt actually offline" and launches directly
into online mode. no more pretending.

also fixed the QML nav button because having a greyed out "Next"
on the last page is terrible UX. now it says "Done" and quits.
youre welcome.

and since we nuked the offline mode, might as well make the
online mode look fucking spectacular. enter antergos-layan-theme:

- kvantum theme because your apps deserve better than qt dreck
- sddm theme (AntergosDark-Layan) for a sexy login screen
- every plasma plasmoid from the rice (panel colorizer, netspeed,
  shutdown switch, applets, separators, music toolbar, the works)
- yakuake arc-dark skin
- antergos logos in /usr/share/logos and /usr/share/pixmaps
- konsole profile, desktop appletsrc, all that jazz
- kde_settings.conf now points to AntergosDark-Layan sddm theme

also replaced the old antergos-grub-theme with the Layan grub
theme because the old one was a git-sourced abomination. 75 distro
icons, terminal box, selection widgets, antergos wallpaper.
ships to /usr/share/grub/themes/antergos/ so calamares finds it.

oh and a dozen audit fixes:
- kscreenlockerrc wallpaper path fixed
- kdialogrc no longer says some other distro
- 7 stale knsregistry files deleted (dev machine was leaking)
- systemd-inhibit guarded with command -v (dinit doesnt have it)
- plasma restart uses killall not systemctl --user
- "XeroLinux Toolkit" -> "Antergos Toolkit" in appletsrc
- KDE_SESSION_VERSION=5 -> =6 (its 2026)
- mirrorlist script says Artix not Arch
- SDDM Messages.sh removed from build artifacts
2026-07-16 21:57:36 +02:00

165 lines
4.2 KiB
Bash

#!/bin/bash
# Antergos NeXT Calamares Installer Launcher
GUIDIE() {
echo "calamares-next: $1" | sed -e 's|<tt>||g' -e 's|</tt>||g'
local prog=yad
command -v yad &>/dev/null || prog=zenity
local cmd=(
"$prog" --form --title="Error detected"
--text="<b>calamares-next:</b>\n$1\n"
--image=dialog-error
--button=yad-quit:1
)
"${cmd[@]}"
exit 1
}
FollowFile() {
local tailfile="$1"
local term_title="$2"
local xpos="$3"
local ypos="$4"
case "$CurrentDesktop" in
xfce) xfce4-terminal -T "$term_title" --geometry="120x20+$xpos+$ypos" -x tail -f "$tailfile" & ;;
kde) setsid konsole -e tail -f "$tailfile" &> /dev/null ;;
esac
}
CatchChrootedPacmanLog() {
local pacmanlog=""
local lockfile="$HOME/.$progname.lck"
while true ; do
sleep 2
pacmanlog="$(/usr/bin/ls -1 /tmp/calamares-root-*/var/log/pacman.log 2>/dev/null | /usr/bin/tail -n 1)"
if [ -n "$pacmanlog" ] ; then
[ -r "$lockfile" ] && return
/usr/bin/touch "$lockfile"
FollowFile "$pacmanlog" "Pacman log" 400 50
break
fi
done
}
LogHeader() {
local calamares_version date
calamares_version="$(pacman -Q calamares 2>/dev/null | awk '{print $NF}')"
date=$(date -u "+%x %X")
cat <<EOF > $log
########## $log by calamares-next
########## Started (UTC): $date
########## Install mode: $mode
########## Calamares version: $calamares_version
EOF
}
InstallLog_Start() {
LogHeader
if [ "$ShowInstallLog" = "TRUE" ] ; then
FollowFile "$log" "Install log" 20 20
fi
}
Calamares_Start() {
if [ "$EUID" = 0 ]; then
calamares -D8 >> $log &
return
fi
local kdesu=/usr/lib/kf6/kdesu
[ -x $kdesu ] || kdesu=kdesu
case "$CurrentDesktop" in
kde) $kdesu -t -c "calamares -D8" >> $log & ;;
*) pkexec calamares -D8 >> $log & ;;
esac
}
AskMode() {
local ICO="/usr/share/calamares/branding/antergos-next/antergos-icon.png"
[ -f "$ICO" ] || ICO="system-software-install"
yad --info \
--title="Notice" \
--image=dialog-information \
--borders=20 \
--width=500 \
--text="The so-called \"Offline Install\" has been removed.\n\nIt was never truly offline — all DE packages were\ndownloaded from the internet regardless. The rootfs\nonly contained live session essentials, so there was\nnothing meaningful to unpack.\n\nAll packages are now installed online via basestrap." \
--button="Continue":0
yad --form \
--title="Antergos NeXT Installer" \
--image="$ICO" \
--borders=20 \
--height=200 --width=480 \
--buttons-layout=spread \
--field=" ":LBL "" \
--field="<b>Online Install</b>":LBL "" \
--field="Full desktop selection from the internet.":LBL "" \
--field="Choose your desktop environment, customize packages,":LBL "" \
--field="get the latest updates.":LBL "" \
--field=" ":LBL "" \
--button="Install":0
}
InstallWithLogs() {
InstallLog_Start
Calamares_Start
if [ "$ShowPacmanLog" = "TRUE" ] ; then
CatchChrootedPacmanLog
else
sleep 5
fi
}
SetConfig() {
sudo rm -f "/etc/calamares/settings.conf"
sudo cp "/etc/calamares-online/settings.conf" "/etc/calamares/settings.conf"
PreLog "Using online settings"
}
PreLog() {
echo "==> $1" >> "$prelogfile"
}
Main() {
progname="${0##*/}"
[ -x /usr/bin/calamares ] || GUIDIE "<tt>/usr/bin/calamares</tt> is needed for installing Antergos NeXT"
local CurrentDesktop=""
if [ "$XDG_CURRENT_DESKTOP" ]; then
CurrentDesktop=$(echo "$XDG_CURRENT_DESKTOP" | tr '[:upper:]' '[:lower:]')
elif [ "$DESKTOP_SESSION" ]; then
CurrentDesktop=$(echo "$DESKTOP_SESSION" | tr '[:upper:]' '[:lower:]')
fi
local ShowInstallLog="FALSE"
local ShowPacmanLog="TRUE"
local Home=/home/antergos
local log=$Home/antergos-install.log
local workdir=""
local prelogfile=""
workdir="$Home/work.$progname.xyz"
mkdir -p "$workdir"
prelogfile="$workdir/preliminary.log"
rm -f "$prelogfile"
AskMode
mode=online
SetConfig
InstallWithLogs
}
Main "$@"