1
0
Fork 0
mirror of synced 2024-11-22 10:05:37 -05:00

Move setup assistant to own package

This commit is contained in:
Nico Jensch 2020-12-22 21:22:56 +01:00
parent dd4438e183
commit 76aa55a2eb
14 changed files with 0 additions and 633 deletions

View file

@ -1,262 +0,0 @@
#!/bin/bash
function askYesNoQuestion
{
yad \
--image="$1" \
--title="$2" \
--window-icon="$3" \
--geometry=700x100 \
--button=No:0 \
--button=Yes:1 \
--text-align=center \
--center \
--text "$4";
local code=$?
if [ "$code" -eq 252 ]; then
# The user doesn't want to continue here, they pressed the X button
exit 0
elif [ "$code" -eq 1 ]; then
return 1
# In case there is an unknown exit code, we assume No
else
return 0
fi
}
function askPackageSelectionQuestion
{
askPackageSelectionQuestion_out=()
local stdout
stdout=$(yad \
--image="$1" \
--title="$2" \
--window-icon="$3" \
--text "$4" \
--geometry=600x500 \
--list \
--checklist \
--column=Install \
--column="Package:hd" \
--column="$5" \
--center < "$6")
if [ "$?" -eq 252 ]; then
# The user doesn't want to continue here, they pressed the X button
exit 0
fi
while IFS= read -r line
do
local checked="$(echo "$line" | cut -d '|' -f1)"
local packages="$(echo "$line" | cut -d '|' -f2)"
if [ "$checked" == "TRUE" ]; then
for package in $packages
do
askPackageSelectionQuestion_out+=("$package")
done
fi
done < <(printf '%s\n' "$stdout")
}
function isOnline
{
# Because this can never be offline, right?
wget -q --spider http://garudalinux.org
return $?
}
function upgrade2ultimate
{
PACKAGES=()
# WARNING: Currently not executed in pamac mode!
PREPARE=()
SETUP=()
HAS_PAMAC_INSTALLER=false
if [ -x "$(command -v pamac-installer)" ]; then
HAS_PAMAC_INSTALLER=true
fi
if ! askYesNoQuestion "font-manager" "Upgrade to ULTIMATE" "update" "Do you need cjk font support (fixes missing characters)?"; then
PACKAGES+=("noto-fonts-cjk")
fi
if ! askYesNoQuestion "printer" "Upgrade to ULTIMATE" "update" "Do you need Printer, Scanner and Samba Support?"; then
if pacman -Qs plasma-workspace > /dev/null ; then
PACKAGES+=("printer-support"
"scanner-support"
"samba-support"
"kdenetwork-filesharing"
"print-manager"
"skanlite")
else
PACKAGES+=("printer-support"
"scanner-support"
"samba-support"
"gvfs-smb"
"simple-scan")
fi
fi
if ! askYesNoQuestion "wallpaper" "Upgrade to ULTIMATE" "update" "Do you want to install additional Garuda wallpapers?"; then
PACKAGES+=("garuda-wallpapers-extra")
fi
if ! askYesNoQuestion "AppImageLauncher" "Upgradpe to ULTIMATE" "update" "What about Snaps, Flatpak, Appimage and firmware update support?"; then
if pacman -Qs pamac-aur > /dev/null ; then
PREPARE+=("sudo pacman --noconfirm -R pamac-aur")
fi
if pacman -Qs pamac-tray-appindicator > /dev/null ; then
PREPARE+=("pacman --noconfirm -R pamac-tray-appindicator")
fi
PACKAGES+=("pamac-all"
"appimagelauncher"
"fwupd"
"gnome-firmware"
"apparmor"
"snapd"
"snapd-glib"
"flatpak")
SETUP+=("systemctl enable --now snapd.socket"
"systemctl enable --now apparmor.service"
"systemctl enable --now snapd.apparmor.service")
fi
if pacman -Qs plasma-desktop > /dev/null ; then
if ! askYesNoQuestion "plasmashell" "Upgrade to ULTIMATE" "update" "Do you want to install additional KDE applications?"; then
PACKAGES+=("elisa"
"khelpcenter"
"krdc"
"krfb"
"kompare"
"krita"
"krename"
"ksystemlog"
"khotkeys"
"drkonqi"
"kscreen"
"kgamma5"
"ksshaskpass"
"kwrited"
"kmouth"
"lokalize"
"kup"
"kmag"
"kimtoy"
"kleopatra"
"qt5-imageformats"
"kimageformats"
"kdeplasma-addons"
"plasma-thunderbolt"
"plasma-vault"
"plasma-disks"
"plasma-meta"
"vlc")
fi
fi
if pacman -Qs gnome-shell > /dev/null ; then
if ! askYesNoQuestion "gnome-shell" "Upgrade to ULTIMATE" "update" "Do you want to install additional GNOME applications?"; then
PACKAGES+=("gpaste"
"eog-plugins"
"grilo-plugins"
"seahorse-nautilus"
"gtkhash-nautilus"
"gnome-logs"
"gnome-remote-desktop"
"gnome-sound-recorder"
"vino"
"rygel"
"shotwell"
"lollypop")
fi
fi
askPackageSelectionQuestion 'libreoffice-main' "Upgrade to ULTIMATE" 'update' "What Office suites do you want?" "Office" "/usr/lib/setup-assistant/office.txt"
# Absolute HACK!
if [[ "${askPackageSelectionQuestion_out[@]}" =~ "libreoffice-fresh" ]] && [[ "${askPackageSelectionQuestion_out[@]}" =~ "libreoffice-still" ]] ; then
askPackageSelectionQuestion_out=( "${askPackageSelectionQuestion_out[@]/libreoffice-still}" )
fi
PACKAGES=("${PACKAGES[@]}" "${askPackageSelectionQuestion_out[@]}")
askPackageSelectionQuestion 'firefox' "Upgrade to ULTIMATE" 'update' "What extra browsers do you want?" "Applications" "/usr/lib/setup-assistant/browsers.txt"
PACKAGES=("${PACKAGES[@]}" "${askPackageSelectionQuestion_out[@]}")
askPackageSelectionQuestion 'telegram-desktop' "Upgrade to ULTIMATE" 'update' "What communication software do you want?" "Applications" "/usr/lib/setup-assistant/communication.txt"
PACKAGES=("${PACKAGES[@]}" "${askPackageSelectionQuestion_out[@]}")
askPackageSelectionQuestion 'thunderbird' "Upgrade to ULTIMATE" 'update' "What email clients do you want?" "Applications" "/usr/lib/setup-assistant/mail.txt"
PACKAGES=("${PACKAGES[@]}" "${askPackageSelectionQuestion_out[@]}")
askPackageSelectionQuestion 'audacity' "Upgrade to ULTIMATE" 'update' "What audio software do you want?" "Applications" "/usr/lib/setup-assistant/audio.txt"
PACKAGES=("${PACKAGES[@]}" "${askPackageSelectionQuestion_out[@]}")
askPackageSelectionQuestion 'kdenlive' "Upgrade to ULTIMATE" 'update' "What video software do you want?" "Applications" "/usr/lib/setup-assistant/video.txt"
PACKAGES=("${PACKAGES[@]}" "${askPackageSelectionQuestion_out[@]}")
askPackageSelectionQuestion 'gimp' "Upgrade to ULTIMATE" 'update' "What graphics software do you want?" "Applications" "/usr/lib/setup-assistant/graphics.txt"
PACKAGES=("${PACKAGES[@]}" "${askPackageSelectionQuestion_out[@]}")
askPackageSelectionQuestion 'gimp' "Upgrade to ULTIMATE" 'update' "What multimedia software do you want?" "Applications" "/usr/lib/setup-assistant/multimedia.txt"
PACKAGES=("${PACKAGES[@]}" "${askPackageSelectionQuestion_out[@]}")
askPackageSelectionQuestion 'code' "Upgrade to ULTIMATE" 'update' "What developement software do you want?" "Applications" "/usr/lib/setup-assistant/development.txt"
PACKAGES=("${PACKAGES[@]}" "${askPackageSelectionQuestion_out[@]}")
# Absolute HACK!
if [[ "${askPackageSelectionQuestion_out[@]}" =~ "podman" ]]; then
SETUP+=("systemctl enable --now podman.socket")
fi
askPackageSelectionQuestion 'virtualbox' "Upgrade to ULTIMATE" 'update' "What virtualization software do you want?" "Applications" "/usr/lib/setup-assistant/virtualization.txt"
PACKAGES=("${PACKAGES[@]}" "${askPackageSelectionQuestion_out[@]}")
# Absolute HACK!
if [[ "${askPackageSelectionQuestion_out[@]}" =~ "virt-manager-meta" ]] || [[ "${askPackageSelectionQuestion_out[@]}" =~ "gnome-boxes" ]]; then
SETUP+=("systemctl enable --now libvirtd")
fi
if [ "$HAS_PAMAC_INSTALLER" = "true" ]; then
# Pamac can correctly handle the pamac-aur and pamac-all conflict, PREPARE can be ignored here.
if ! pamac-installer ${PACKAGES[@]} ; then
exit 0
fi
pkexec bash -c "$( IFS=$'\n'; echo "${SETUP[*]}" )"
else
alacritty -e bash /usr/lib/setup-assistant/apply.sh <( IFS=$'\n'; echo "${PREPARE[*]}" ) <(printf '%s\n' "${PACKAGES[@]}") <( IFS=$'\n'; echo "${SETUP[*]}" )
fi
}
if [ -z "$SETUP_ASSISTANT_SELFUPDATE" ]; then
systemctl --user enable psd >/dev/null 2>&1 &
systemctl --user start psd >/dev/null 2>&1 &
libinput-gestures-setup autostart >/dev/null 2>&1 &
libinput-gestures-setup start >/dev/null 2>&1 &
while ! isOnline
do
if askYesNoQuestion "update" "Setup Assistant" "update" "No internet connection available, try again?"; then
exit 0
fi
done
if ! askYesNoQuestion "update" "Setup Assistant" "update" "Do you want to get a recent mirrorlist?"; then
reflector-simple >/dev/null 2>&1
fi
if ! askYesNoQuestion "update" "Setup Assistant" "update" "Update the system? (recommended!)"; then
# yy because we may have updated the mirrorlist in the last step
alacritty -e pkexec bash -c "pacman -Syyu; read -p 'Press enter to continue'"
SETUP_ASSISTANT_SELFUPDATE=1 exec setup-assistant
fi
fi
if ! askYesNoQuestion "update" "Setup Assistant" "update" "Upgrade to Ultimate? (You can select which apps you want!)"; then
upgrade2ultimate
fi

View file

@ -1,22 +0,0 @@
#!/bin/bash
if [ -e "$1" ]; then
echo "Running pre-installation stuff.."
echo ""
sudo bash - <$1
fi
echo ""
echo "Installing packages.."
echo ""
sudo pacman --needed -S $(cat - <$2)
if [ -e "$3" ]; then
echo ""
echo "Enabling services.."
echo ""
sudo bash - <$3
fi
echo ""
read -p "Press enter to finish"

View file

@ -1,39 +0,0 @@
true
olivia
Olivia (Audio player with YouTube support)
false
audacious
Audacious
false
cantata
Cantata (Frontend for mpd)
false
kwave
Kwave (Sound editor by KDE)
false
lollypop
Lollypop (GNOME music player)
false
audacity
Audacity (Record/edit audio)
false
ardour
Ardour (proffesional-grade audio workstation)
false
lmms
LMMS (The Linux MultiMedia Studio)
false
mixxx
Mixxx (Digital DJ'ing)
false
musescore
MuseScore (Sheet music notation)
false
rosegarden
Rosegarden (MIDI/audio sequencer)
false
strawberry
Strawberry Player (aimed at collectors)
false
bitwig-studio
Bitwig Studio (Digital audio workstation)

View file

@ -1,24 +0,0 @@
false
chromium
Chromium
false
vivaldi vivaldi-ffmpeg-codecs
Vivaldi
false
opera opera-ffmpeg-codecs
Opera
false
torbrowser-launcher
Tor Browser (The Onion Router)
false
otter-browser
Otter Browser
false
brave-bin
Brave (Based on Chromium + privacy stuff)
false
falkon
Falkon (KDE browser)
false
ungoogled-chromium-git
Ungoogled Chromium

View file

@ -1,33 +0,0 @@
true
telegram-desktop
Telegram Desktop
false
discord
Discord
false
element-desktop
Element (Matrix client)
false
wire-desktop
Wire (E2EE messenger)
false
signal-desktop
Signal Desktop
false
jitsi-meet
Jitsi-Meet (Open source webconferencing)
false
zoom
Zoom (Proprietary webconferencing)
false
skypeforlinux-stable-bin
Skype
false
slack-desktop
Slack (Messenger)
false
whatsapp-nativefier
Whatsapp (nativefier)
false
mumble
Mumble (Open source Teamspeak clone)

View file

@ -1,30 +0,0 @@
true
code
Visual Studio Code
false
github-desktop-bin
GitHub Desktop
false
emacs
GNU Emacs
false
atom
Atom
false
intellij-idea-community-edition
IntelliJ-IDEA (Community Edition)
false
pycharm-community-edition
PyCharm (Community Edition)
false
android-studio android-studio-launcher
Android Studio
false
podman-docker podman-compose crun
Podman (Docker, usable with docker commands)
false
plasma-sdk
Plasma SDK
false
qtcreator
QtCreator

View file

@ -1,36 +0,0 @@
true
gimp
GIMP (Advanced image manipulation program)
false
krita krita-plugin-gmic opencolorio
Krita (Paint application by KDE)
false
kolourpaint
Kolourpaint (Paint application)
false
digikam
Digikam (Photo management app)
false
inkscape
Inkscape (Vector graphics)
false
blender
Blender (full featured 3D creation suite)
false
pencil2d
Pencil 2D (2D handdrawn animations)
false
synfigstudio
Synfig Studio (2D vector animation)
false
darktable
DarkTable (Organize and develop raw images)
false
fontforge
FontForge (Outline and font editor)
false
mypaint
MyPaint (Digital painting)
false
imagemagick
ImageMagick (Edit bmp and svg images)

View file

@ -1,42 +0,0 @@
true
nextcloud-client
Nextcloud-client (Use our Garuda Cloud to sync dotfiles)
true
firefox-extension-bitwarden
Firefox Bitwarden extension (password manager)
true
xdman
Xtreme Download Manager
true
firefox-extension-xdm-browser-monitor
Firefox XDM extension (download manager)
false
cockpit cockpit-dashboard cockpit-machines
Cockpit (Access some system settings at localhost:9090)
false
syncthing-gtk
Syncthing-GTK (sync files between devices)
false
remmina
Remmina (Remote access client)
false
filezilla
Filezilla (FTP client)
false
putty
Putty (SSH/Telnet client)
false
nitroshare
Nitroshare (Network file sharing via LAN)
false
jdownloader2
Jdownloader2 (Advanced download manager)
false
deluge-gtk
Deluge (GTK torrent client)
false
qbittorrent
Qbittorrent (QT torrent client)
false
streamlink-twitch-gui
Twitch GUI

View file

@ -1,15 +0,0 @@
true
thunderbird
Thunderbird
false
kmail
Kmail (KDE mail client)
false
geary
Geary (GNOME mail client)
false
trojita
Trojita (Qt mail client)
false
mailspring
Mailspring

View file

@ -1,54 +0,0 @@
false
converseen
Converseen (Image converter)
false
handbrake
Handbrake (Video format transcoder)
false
mystiq
Mystiq (QT Video converter)
false
transmageddon
Transmageddon (GTK Video converter)
false
soundconverter
Soundconvertor (Audio converter)
false
stremio
Stremio (One-stop hub for video content aggregation)
false
kodi kodi-platform kodi-eventclients
Kodi (Entertainment hub)
false
mediaelch
Mediaelch (Media manager for Kodi)
false
plex-media-player
Plex desktop client
false
hypnotix
Hypnotix (An IPTV app for watching live tv)
false
subtitlecomposer
Subtitlecomposer (A KDE subtitle editor)
false
kid3
Kid3 (KDE Tag editor)
false
easytag
Easytag (Audio tag editor)
false
k3b cdparanoia cdrdao dvd+rw-tools emovix transcode vcdimager cdrtools
K3B (CD burning application for KDE)
false
brasero
BRASERO (CD burning application for GTK)
false
xfburn
XFBURN (CD burning application for XFCE)
false
variety
Variety (Wallpaper changer)
false
conky-lua-nv conky-manager
Conky (System monitor)

View file

@ -1,30 +0,0 @@
true
libreoffice-fresh libmythes
LibreOffice Fresh (Recommended, full featured office suite)
false
libreoffice-still libmythes
LibreOffice Still (The same than above, more stable version)
false
onlyoffice-bin
OnlyOffice (Aims to be compatible with Microsoft Office)
false
wps-office wps-office-mime ttf-wps-fonts
WPS Office
false
ms-office-online
Microsoft Office (Online wrapper)
false
freeoffice
Free Office
false
yozo-office yozo-office-fonts
Yozo Office
false
calligra
Calligra Suite
false
abiword
Abiword (Simple wordprocessor, recommended for simple writing)
false
joplin-desktop-electron
Joplin (Is able to sync notes to Garuda cloud)

View file

@ -1,24 +0,0 @@
true
kdenlive movit sox opus-tools frei0r-plugins
Kdenlive (Video editor by KDE)
false
shotcut
Shotcut (Qt-based video editor)
false
pitivi frei0r-plugins
Pitivi
false
openshot
Openshot
false
obs-studio
OBS Studio (Video recording/streaming)
false
smplayer smplayer-skins smplayer-themes
SMPlayer (Build-in codecs, high compatability video player)
false
vlc
Vlc
false
baka-mplayer
Baka-Mplayer (libmpv and Qt based video player)

View file

@ -1,9 +0,0 @@
false
virtualbox-meta
Virtualbox (most likely easier for beginners)
false
gnome-boxes
GNOME Boxes (Easy KVM)
false
virt-manager-meta
Virt-manager

View file

@ -1,13 +0,0 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Setup Asssistant
Name[de]=Setup Assistant
Comment=First setup & upgrade to Ultimate
Comment[de]=Erste Einrichtung & Upgrade zu Ultimate
Encoding=UTF-8
Exec=setup-assistant
Terminal=false
Type=Application
Icon=gnome-system-log
Categories=GTK;System;Garuda-Setup;
NoDisplay=false