feat(setup/apps): convert graphical apps to Flatpak-first with cyberqueer GTK theme

Policy change: graphical apps now prefer Flatpak > pacman > AUR. Non-graphical
tools keep pacman > AUR > source. This makes installed apps sandboxed, keeps
system packages clean, and gives us a single hook point (apply_flatpak_theme)
to theme every GUI app consistently.

lib/logging.sh — two new helper functions sourced by every module:

  ensure_flatpak()
    Checks if flatpak is installed (pacman installs it if not) and ensures the
    Flathub remote is registered. Called at the top of every Flatpak script so
    the module is self-contained and safe to run in any order.

  apply_flatpak_theme(app_id)
    Copies gtk-themes/cyberqueer/ from the Dotfiles repo into ~/.themes/, then
    calls `flatpak override --user --filesystem=~/.themes:ro <id>` so the
    sandbox can read it, and `flatpak override --user --env=GTK_THEME=cyberqueer
    <id>` to activate it. Gracefully skips with a warning if the theme source
    directory is absent.

App scripts converted (pacman/AUR → Flatpak + theme):
  ardour       org.ardour.Ardour
  audacity     org.audacityteam.Audacity
  chromium     org.chromium.Chromium
  firefox      org.mozilla.firefox
  geany        org.geany.Geany
  gimp         org.gimp.GIMP
  inkscape     org.inkscape.Inkscape
  kate         org.kde.kate
  kdenlive     org.kde.kdenlive
  krita        org.kde.krita
  librewolf    io.gitlab.librewolf-community.librewolf
  lmms         io.lmms.LMMS
  localsend    org.localsend.localsend
  min-browser  com.github.minbrowser.min
  mixxx        org.mixxx.Mixxx
  onlyoffice   org.onlyoffice.desktopeditors
  openshot     org.openshot.OpenShot
  rdp-client   org.remmina.Remmina  (was pacman remmina + freerdp + libvncserver;
               Flatpak bundles all protocols, including VNC and SSH tunnels)
  shotcut      org.shotcut.Shotcut
  steam        com.valvesoftware.Steam
  vscodium     com.vscodium.codium
  wireshark    org.wireshark.Wireshark
  xournal      com.github.xournalpp.xournalpp
  zed          dev.zed.Zed
  zen-browser  io.github.zen_browser.zen

Special cases:

  blender-povray: Blender → Flatpak (org.blender.Blender) + theme; POV-Ray
    stays pacman because it has no Flatpak and is a CLI renderer, not a GUI app.

  prismlauncher / stuntrally: were already Flatpak installs; added
    apply_flatpak_theme so they pick up the cyberqueer theme like everything else.

  vesktop: switched from AUR vesktop to Flatpak dev.vencord.Vesktop. The AUR
    build requires cargo and takes several minutes; the Flatpak is pre-built.
    Vencord config is now deployed to ~/.var/app/dev.vencord.Vesktop/config/
    (both Vencord/ and vesktop/ sub-dirs) instead of ~/.config/, which is where
    the Flatpak sandbox exposes its config directory.

  k8s: kubectl stays pacman (it is a CLI tool with no GUI, no Flatpak needed);
    podman-desktop switches from pacman podman-desktop to Flatpak
    io.podman_desktop.PodmanDesktop + theme, because it is a full GUI app.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Amir Alexander Abdelbaki 2026-06-24 09:26:47 +02:00
parent b4d0aec647
commit dd1cd2b8c7
31 changed files with 161 additions and 64 deletions

View File

@ -10,3 +10,30 @@ log() { printf "${GREEN}[+] %s${RESET}\n" "$*"; }
skip() { printf "${YELLOW}[~] %s${RESET}\n" "$*"; }
warn() { printf "${YELLOW}[!] %s${RESET}\n" "$*" >&2; }
err() { printf "${RED}[✖] %s${RESET}\n" "$*" >&2; }
ensure_flatpak() {
if ! command -v flatpak &>/dev/null; then
log "Installing flatpak..."
sudo pacman -S --noconfirm --needed flatpak
fi
if ! flatpak remotes 2>/dev/null | grep -q flathub; then
log "Adding Flathub remote..."
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
fi
}
apply_flatpak_theme() {
local app_id="$1"
local theme_name="cyberqueer"
local theme_src="$HOME/Dotfiles/gtk-themes/$theme_name"
local themes_dir="$HOME/.themes"
if [[ ! -d "$theme_src" ]]; then
warn "Cyberqueer theme not found at $theme_src — skipping Flatpak theme override."
return 0
fi
mkdir -p "$themes_dir"
cp -r "$theme_src" "$themes_dir/$theme_name"
flatpak override --user --filesystem="$themes_dir":ro "$app_id"
flatpak override --user --env=GTK_THEME="$theme_name" "$app_id"
log "Cyberqueer theme applied to $app_id."
}

6
setup/modules/optional-Modules/apps/ardour.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Ardour (professional DAW)..."
sudo pacman -S --noconfirm --needed ardour
log "Installing Ardour (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.ardour.Ardour
apply_flatpak_theme "org.ardour.Ardour"
log "Ardour installed."

6
setup/modules/optional-Modules/apps/audacity.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Audacity (audio editor)..."
sudo pacman -S --noconfirm --needed audacity
log "Installing Audacity (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.audacityteam.Audacity
apply_flatpak_theme "org.audacityteam.Audacity"
log "Audacity installed."

10
setup/modules/optional-Modules/apps/blender-povray.sh Normal file → Executable file
View File

@ -2,6 +2,12 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Blender and POV-Ray..."
sudo pacman -S --noconfirm --needed blender povray
log "Installing Blender (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.blender.Blender
apply_flatpak_theme "org.blender.Blender"
log "Installing POV-Ray (pacman)..."
sudo pacman -S --noconfirm --needed povray
log "Blender and POV-Ray installed."

6
setup/modules/optional-Modules/apps/chromium.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Chromium..."
sudo pacman -S --noconfirm --needed chromium
log "Installing Chromium (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.chromium.Chromium
apply_flatpak_theme "org.chromium.Chromium"
log "Chromium installed."

6
setup/modules/optional-Modules/apps/firefox.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Firefox..."
sudo pacman -S --noconfirm --needed firefox
log "Installing Firefox (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.mozilla.firefox
apply_flatpak_theme "org.mozilla.firefox"
log "Firefox installed."

6
setup/modules/optional-Modules/apps/geany.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Geany and plugins..."
sudo pacman -S --noconfirm --needed geany geany-plugins
log "Installing Geany (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.geany.Geany
apply_flatpak_theme "org.geany.Geany"
log "Geany installed."

6
setup/modules/optional-Modules/apps/gimp.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing GIMP..."
sudo pacman -S --noconfirm --needed gimp
log "Installing GIMP (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.gimp.GIMP
apply_flatpak_theme "org.gimp.GIMP"
log "GIMP installed."

6
setup/modules/optional-Modules/apps/inkscape.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Inkscape..."
sudo pacman -S --noconfirm --needed inkscape
log "Installing Inkscape (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.inkscape.Inkscape
apply_flatpak_theme "org.inkscape.Inkscape"
log "Inkscape installed."

9
setup/modules/optional-Modules/apps/k8s.sh Normal file → Executable file
View File

@ -2,6 +2,11 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Kubernetes tools (kubectl, podman-desktop)..."
sudo pacman -S --noconfirm --needed kubectl podman-desktop
log "Installing kubectl (pacman)..."
sudo pacman -S --noconfirm --needed kubectl
log "Installing Podman Desktop (Flatpak)..."
ensure_flatpak
flatpak install -y flathub io.podman_desktop.PodmanDesktop
apply_flatpak_theme "io.podman_desktop.PodmanDesktop"
log "Kubernetes tools installed."

6
setup/modules/optional-Modules/apps/kate.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Kate..."
sudo pacman -S --noconfirm --needed kate
log "Installing Kate (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.kde.kate
apply_flatpak_theme "org.kde.kate"
log "Kate installed."

6
setup/modules/optional-Modules/apps/kdenlive.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Kdenlive..."
sudo pacman -S --noconfirm --needed kdenlive
log "Installing Kdenlive (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.kde.kdenlive
apply_flatpak_theme "org.kde.kdenlive"
log "Kdenlive installed."

6
setup/modules/optional-Modules/apps/krita.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Krita..."
sudo pacman -S --noconfirm --needed krita
log "Installing Krita (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.kde.krita
apply_flatpak_theme "org.kde.krita"
log "Krita installed."

6
setup/modules/optional-Modules/apps/librewolf.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing LibreWolf (AUR)..."
yay -S --answerdiff None --answerclean All --noconfirm librewolf-bin
log "Installing LibreWolf (Flatpak)..."
ensure_flatpak
flatpak install -y flathub io.gitlab.librewolf-community.librewolf
apply_flatpak_theme "io.gitlab.librewolf-community.librewolf"
log "LibreWolf installed."

6
setup/modules/optional-Modules/apps/lmms.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing LMMS..."
sudo pacman -S --noconfirm --needed lmms
log "Installing LMMS (Flatpak)..."
ensure_flatpak
flatpak install -y flathub io.lmms.LMMS
apply_flatpak_theme "io.lmms.LMMS"
log "LMMS installed."

6
setup/modules/optional-Modules/apps/localsend.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing LocalSend (AUR)..."
yay -S --answerdiff None --answerclean All --noconfirm localsend
log "Installing LocalSend (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.localsend.localsend
apply_flatpak_theme "org.localsend.localsend"
log "LocalSend installed."

6
setup/modules/optional-Modules/apps/min-browser.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Min browser (AUR)..."
yay -S --answerdiff None --answerclean All --noconfirm min
log "Installing Min browser (Flatpak)..."
ensure_flatpak
flatpak install -y flathub com.github.minbrowser.min
apply_flatpak_theme "com.github.minbrowser.min"
log "Min browser installed."

6
setup/modules/optional-Modules/apps/mixxx.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Mixxx (DJ software)..."
sudo pacman -S --noconfirm --needed mixxx
log "Installing Mixxx (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.mixxx.Mixxx
apply_flatpak_theme "org.mixxx.Mixxx"
log "Mixxx installed."

6
setup/modules/optional-Modules/apps/onlyoffice.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing OnlyOffice (AUR)..."
yay -S --answerdiff None --answerclean All --noconfirm onlyoffice-bin
log "Installing OnlyOffice (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.onlyoffice.desktopeditors
apply_flatpak_theme "org.onlyoffice.desktopeditors"
log "OnlyOffice installed."

6
setup/modules/optional-Modules/apps/openshot.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing OpenShot..."
sudo pacman -S --noconfirm --needed openshot
log "Installing OpenShot (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.openshot.OpenShot
apply_flatpak_theme "org.openshot.OpenShot"
log "OpenShot installed."

2
setup/modules/optional-Modules/apps/prismlauncher.sh Normal file → Executable file
View File

@ -3,5 +3,7 @@ set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing PrismLauncher (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.prismlauncher.PrismLauncher
apply_flatpak_theme "org.prismlauncher.PrismLauncher"
log "PrismLauncher installed."

11
setup/modules/optional-Modules/apps/rdp-client.sh Normal file → Executable file
View File

@ -2,9 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Remmina RDP client with FreeRDP and VNC support..."
sudo pacman -S --noconfirm --needed \
remmina \
freerdp \
libvncserver
log "Remmina installed with RDP (freerdp) and VNC support."
log "Installing Remmina (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.remmina.Remmina
apply_flatpak_theme "org.remmina.Remmina"
log "Remmina installed."

6
setup/modules/optional-Modules/apps/shotcut.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Shotcut..."
sudo pacman -S --noconfirm --needed shotcut
log "Installing Shotcut (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.shotcut.Shotcut
apply_flatpak_theme "org.shotcut.Shotcut"
log "Shotcut installed."

6
setup/modules/optional-Modules/apps/steam.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Steam..."
sudo pacman -S --noconfirm --needed steam
log "Installing Steam (Flatpak)..."
ensure_flatpak
flatpak install -y flathub com.valvesoftware.Steam
apply_flatpak_theme "com.valvesoftware.Steam"
log "Steam installed."

2
setup/modules/optional-Modules/apps/stuntrally.sh Normal file → Executable file
View File

@ -3,5 +3,7 @@ set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Stunt Rally (Flatpak)..."
ensure_flatpak
flatpak install -y flathub io.github.stuntrally.StuntRally3
apply_flatpak_theme "io.github.stuntrally.StuntRally3"
log "Stunt Rally installed."

18
setup/modules/optional-Modules/apps/vesktop.sh Normal file → Executable file
View File

@ -2,11 +2,19 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Vesktop (AUR)..."
yay -S --answerdiff None --answerclean All --noconfirm vesktop
log "Installing Vesktop (Flatpak)..."
ensure_flatpak
flatpak install -y flathub dev.vencord.Vesktop
apply_flatpak_theme "dev.vencord.Vesktop"
log "Deploying Vencord config..."
rm -rf ~/.config/Vencord ~/.config/vesktop
cp -r ~/Dotfiles/desktopenvs/hyprland/Vencord ~/.config/
cp -r ~/Dotfiles/desktopenvs/hyprland/Vencord ~/.config/vesktop
FLATPAK_CFG="$HOME/.var/app/dev.vencord.Vesktop/config"
mkdir -p "$FLATPAK_CFG"
if [[ -d "$HOME/Dotfiles/desktopenvs/hyprland/Vencord" ]]; then
rm -rf "$FLATPAK_CFG/Vencord" "$FLATPAK_CFG/vesktop"
cp -r "$HOME/Dotfiles/desktopenvs/hyprland/Vencord" "$FLATPAK_CFG/Vencord"
cp -r "$HOME/Dotfiles/desktopenvs/hyprland/Vencord" "$FLATPAK_CFG/vesktop"
else
warn "Vencord config not found at ~/Dotfiles/desktopenvs/hyprland/Vencord — skipping."
fi
log "Vesktop installed with Vencord theme."

6
setup/modules/optional-Modules/apps/vscodium.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing VSCodium (AUR)..."
yay -S --answerdiff None --answerclean All --noconfirm vscodium-bin
log "Installing VSCodium (Flatpak)..."
ensure_flatpak
flatpak install -y flathub com.vscodium.codium
apply_flatpak_theme "com.vscodium.codium"
log "VSCodium installed."

6
setup/modules/optional-Modules/apps/wireshark.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Wireshark..."
sudo pacman -S --noconfirm --needed wireshark-qt
log "Installing Wireshark (Flatpak)..."
ensure_flatpak
flatpak install -y flathub org.wireshark.Wireshark
apply_flatpak_theme "org.wireshark.Wireshark"
log "Wireshark installed."

6
setup/modules/optional-Modules/apps/xournal.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Xournal++ (PDF annotator)..."
sudo pacman -S --noconfirm --needed xournalpp
log "Installing Xournal++ (Flatpak)..."
ensure_flatpak
flatpak install -y flathub com.github.xournalpp.xournalpp
apply_flatpak_theme "com.github.xournalpp.xournalpp"
log "Xournal++ installed."

8
setup/modules/optional-Modules/apps/zed.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Zed editor..."
sudo pacman -S --noconfirm --needed zed
log "Zed installed."
log "Installing Zed editor (Flatpak)..."
ensure_flatpak
flatpak install -y flathub dev.zed.Zed
apply_flatpak_theme "dev.zed.Zed"
log "Zed editor installed."

6
setup/modules/optional-Modules/apps/zen-browser.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing Zen Browser (AUR)..."
yay -S --answerdiff None --answerclean All --noconfirm zen-browser-bin
log "Installing Zen Browser (Flatpak)..."
ensure_flatpak
flatpak install -y flathub io.github.zen_browser.zen
apply_flatpak_theme "io.github.zen_browser.zen"
log "Zen Browser installed."