# Maintainer: Lysec <admin@lysec.dev>

pkgname=cachyos-mangowc-dms
pkgdesc='CachyOS MangoWC (+DMS) settings'
pkgver=1.0.0
pkgrel=2
arch=('any')
url="https://github.com/cachyos/$pkgname"
license=(GPL-3.0-only)
makedepends=('coreutils' 'git')
source=(
  git+$url#commit=f2ea58d2758cab12f728a0ff5b429c4634ccec75
  cat-dms::git+https://github.com/xi-ve/cat-dms.git#commit=eb7b5138b672be3c06445dd80de6bc30c3076030
)
sha512sums=('5bc19e0c4d5c3cb1b4dbd446266aae6b9e1ac3bdc611f25592384ddd090b0b2f862615ee88e01810ea45af7f6320eab62b1ef6d3b1514493109a25b315382fd5'
            '57e4ef8df4668e80cd6240bf79b2e4702f3eb9c4e955525f163de11421ec89b8f7a3b74f933742f26e6242d109984e1d32aebf0afb83d186e690b9be89056eac')
depends=(
  mangowm
  dms-shell
  grim
  slurp
  nautilus
  cliphist
  qt6ct
  nwg-look
  adw-gtk-theme
  cachyos-alacritty-config
  gnome-keyring
  noto-fonts
  noto-fonts-emoji
  xdg-desktop-portal-gnome
  xdg-desktop-portal-gtk
  xwayland-satellite
)
provides=('cachyos-desktop-settings')
conflicts=('cachyos-desktop-settings')

prepare() {
  cd "${srcdir}/${pkgname}"

  git submodule init
  git config submodule.etc/skel/.config/DankMaterialShell/plugins/catWidget.url "${srcdir}/cat-dms"
  git -c protocol.file.allow=always submodule update
}

package() {
  install -d "${pkgdir}/etc"
  cp -rf "${srcdir}/${pkgname}/etc" "${pkgdir}"
}
