Feat: Update kalpa-firstboot to use qdbus6

This commit is contained in:
Denys Madureira 2024-03-17 01:51:47 +01:00
parent 597349017b
commit f6b65a45ad

View File

@ -7,10 +7,10 @@ run_task() {
local label="$2" local label="$2"
shift 2 shift 2
qdbus-qt5 $dbusRef setLabelText "$label" qdbus6 $dbusRef setLabelText "$label"
if eval "$@"; then if eval "$@"; then
qdbus-qt5 $dbusRef Set "" value "$step" qdbus6 $dbusRef Set "" value "$step"
else else
kdialog --error "Operation Failed: $label" kdialog --error "Operation Failed: $label"
exit 1 exit 1
@ -22,8 +22,8 @@ run_task 2 "Adding Flathub Repository" /usr/bin/flatpak remote-add --user --if-n
run_task 3 "Installing Firefox" /usr/bin/flatpak install --user --noninteractive flathub org.mozilla.firefox run_task 3 "Installing Firefox" /usr/bin/flatpak install --user --noninteractive flathub org.mozilla.firefox
run_task 4 "Installing KCalc" /usr/bin/flatpak install --user --noninteractive flathub org.kde.kcalc run_task 4 "Installing KCalc" /usr/bin/flatpak install --user --noninteractive flathub org.kde.kcalc
run_task 5 "Installing Ark" /usr/bin/flatpak install --user --noninteractive flathub org.kde.ark run_task 5 "Installing Ark" /usr/bin/flatpak install --user --noninteractive flathub org.kde.ark
run_task 6 "Setting Default Browser" kwriteconfig5 --file ~/.config/kdeglobals --group General --key BrowserApplication org.mozilla.firefox.desktop run_task 6 "Setting Default Browser" kwriteconfig6 --file ~/.config/kdeglobals --group General --key BrowserApplication org.mozilla.firefox.desktop
run_task 7 "Cleaning up" rm -f ~/.config/autostart/kalpa-firstboot.desktop run_task 7 "Cleaning up" rm -f ~/.config/autostart/kalpa-firstboot.desktop
qdbus-qt5 $dbusRef close qdbus6 $dbusRef close