# apiwow-dwm - dwm and picom in the calm grey and white scheme.
#
# Suckless software is configured by editing its source, so this profile ships
# a config.h for dwm and rebuilds it. That is why it depends on the toolchain.
name=apiwow-dwm
version=1.0.0
release=1
kind=profile
desc="dwm + picom, calm grey and white, with the Arctic terminal and fonts"
url="https://github.com/apiwo/arctic-linux"
license="MIT BSD-2-Clause"
depend="dwm dmenu st picom slstatus slock foot \
	xorg-server xorg-xinit libx11 libxft libxinerama \
	ttf-jetbrains-mono ttf-nerd-fonts-symbols noto-fonts feh"
makedepend="clang bmake"
source="config.h picom.conf xinitrc foot.ini"
sha256="SKIP SKIP SKIP SKIP"
backup="etc/skel/.config/picom/picom.conf etc/skel/.xinitrc"

package() {
	# The dwm config the profile was built around, kept for anyone who wants to
	# change it and rebuild.
	install -Dm644 config.h "$pkgdir/usr/share/apiwow-dwm/config.h"

	install -Dm644 picom.conf "$pkgdir/etc/skel/.config/picom/picom.conf"
	install -Dm755 xinitrc    "$pkgdir/etc/skel/.xinitrc"
	install -Dm644 foot.ini   "$pkgdir/etc/skel/.config/foot/foot.ini"

	install -d "$pkgdir/usr/share/xsessions"
	cat >"$pkgdir/usr/share/xsessions/apiwow-dwm.desktop" <<-'DESK'
		[Desktop Entry]
		Name=apiwow-dwm
		Comment=dwm with picom, grey and white
		Exec=/etc/skel/.xinitrc
		Type=XSession
	DESK

	install -d "$pkgdir/usr/share/arctic/profiles"
	printf 'apiwow-dwm\n' >"$pkgdir/usr/share/arctic/profiles/active"
}
