# Maintainer: Karim <karim@gabrielevarano.ch>
#
# Metapackage: pulls the complete TANINUX (camel) desktop — niri + eww, managed
# by the TANINUX apps. Own packages come from the [tanin] repo, everything else
# from the official Arch repos. AUR-only runtime deps (eww, tiramisu, waypaper,
# cliphist, librewolf-bin, arch-update, timeshift-autosnap, xdg-terminal-exec,
# paru) are rebuilt into [tanin] so this never hard-depends on the AUR.
# Calamares just installs this package at the end.
pkgname=tanin-desktop
pkgver=0.2.0
pkgrel=6
pkgdesc="TANINUX desktop — metapackage pulling the full niri/eww environment"
arch=('any')
url="https://taninux.kgva.ch"
license=('GPL-3.0-or-later')

depends=(
  # --- own packages ([tanin] repo) ---
  'taninux'                       # System Settings + Software Hub + TUI
  'tanin-greet'                   # greetd greeter (GTK4, Fuji topbar)
  'tanin-libadwaita'              # Fuji recolour for GTK4/libadwaita + GTK3
  'tanin-eww'                     # eww bar/dock/panels + niri config -> /usr/share/tanin/skel
  'tanin-setup'                   # seeds ~/.config + session portal on first run
  'tanin-calendar'                # GTK4/libadwaita calendar app (reads EDS)

  # --- compositor + login ---
  'niri'                          # Wayland compositor (niri-only)
  'greetd'                        # display manager (greeter = tanin-greet)
  'cage'                          # kiosk compositor hosting the greeter

  # --- lock / idle (ext-session-lock + ext-idle-notify, niri-native) ---
  'gtklock'                       # screen lock (Fuji greeter look): Super+Alt+L, eww Control-Center, core/lock.py
  'gtklock-userinfo-module'       # avatar + username on the lock (matches the greeter)
  'gtklock-powerbar-module'       # power buttons on the lock
  'swaylock'                      # robust fallback locker
  'swayidle'                      # idle timeouts (screen-off/suspend) — core/power.py

  # --- session portals ---
  'xdg-desktop-portal'
  'xdg-desktop-portal-gtk'         # Settings/Appearance portal (dark mode!)
  'xdg-desktop-portal-gnome'       # screencast backend recommended for niri

  # --- shell / eww stack (eww, tiramisu, waypaper, cliphist via [tanin]) ---
  'eww'                            # bar/dock/panels/spotlight
  'tiramisu-git'                       # headless notification daemon -> eww UI
  'waypaper'                       # wallpaper (niri autostart: waypaper --restore)
  'awww'                           # 2nd wallpaper surface -> blurred niri Overview backdrop (place-within-backdrop)
  'imagemagick'                    # generates the blurred backdrop copy (overview-backdrop.sh)
  'cliphist'                       # clipboard history for Spotlight

  # --- browser (rebuilt into [tanin]; keep current with LibreWolf releases) ---
  'librewolf-bin'                  # default browser (privacy-focused Firefox fork)

  # --- terminal + CLI used by the bar/scripts ---
  'foot' 'jq' 'wl-clipboard' 'xdg-utils' 'libqalculate'   # libqalculate -> qalc
  'grim' 'slurp'                   # screenshots

  # --- online accounts + calendar -------------------------------------------
  # GOA = central account hub (Google/Microsoft/Nextcloud/CalDAV, like Apple's
  # Internet Accounts); it feeds Evolution Data Server, which the eww bar panel
  # (scripts/calendar.sh -> eds-events.py) and tanin-calendar read.
  'gnome-online-accounts'          # account hub (OAuth: Google/MS/Nextcloud) -> TANINUX "Online Accounts"
  'gnome-online-accounts-gtk'      # the add/manage UI launched by that page
  'evolution-data-server'          # calendar/contact backend GOA feeds (primary source)
  'evolution-ews'                  # Microsoft 365/Exchange backend (no CalDAV)
  'khal'                           # fallback calendar source when EDS is unavailable
  'vdirsyncer'                     # optional CalDAV/Nextcloud <-> local vdir sync (khal path)

  # --- connectivity / audio / hardware ---
  'networkmanager' 'bluez' 'bluez-utils'
  'pipewire' 'pipewire-pulse' 'wireplumber'   # wpctl / pactl
  'brightnessctl' 'playerctl'
  'wlsunset'                       # display night-light settings
  'cups'                           # printers settings page

  # --- packages / updates ([tanin] AUR rebuilds) ---
  'flatpak' 'pacman-contrib'       # checkupdates / paccache
  'arch-update'                    # update notifier + pre/post tasks
  'timeshift' 'timeshift-autosnap' # snapshot before each pacman upgrade (rollback safety)
  'xdg-terminal-exec'              # launch Terminal=true apps in the user's terminal

  # --- theming / fonts ---
  'taninux-gtk3-theme'                  # eigenständiges GTK3 Apple-Optik Theme (kein adw-gtk3)
  'adwaita-icon-theme'                   # base icon theme
  'tanin-icons'                          # Fuji-accent folder overlay (Tanin-<accent>), set by the accent picker
  'inter-font' 'ttf-iosevka-nerd' 'ttc-iosevka-aile' 'ttf-nerd-fonts-symbols'  # Inter UI · Iosevka Nerd/Aile · Symbols Nerd
)

optdepends=(
  'paru: AUR support in the Software Hub (opt-in)'
  'waybar: fallback bar if eww is missing (launch.sh falls back to it)'
)

# Metapackage — no files of its own.
package() {
  :
}
