# Copyright 2026 Nadeŭka <me+oss@nadevko.cc>
# Distributed under the terms of the GNU General Public License v2
EAPI=8

PYTHON_COMPAT=( python3_{10..15} )
inherit git-r3 python-single-r1

DESCRIPTION='Minimalistic WiFi network chooser for iwd using rofi'
HOMEPAGE=https://github.com/defname/rofi-iwd-wifi-menu
EGIT_REPO_URI=https://github.com/defname/rofi-iwd-wifi-menu.git

LICENSE='CC-BY-4.0 GPL-3'
SLOT=0

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="
	${PYTHON_DEPS}
	net-wireless/iwd
	x11-misc/rofi
	$(python_gen_cond_dep '>=dev-python/pexpect-4.8[${PYTHON_USEDEP}]')
"

src_compile() {
	:
}

src_install() {
	insinto /usr/share/${PN}
	doins -r iwdrofimenu res
	rm "${ED}"/usr/share/${PN}/res/icons/{README,LICENSE} || die
	doins settings.py
	exeinto /usr/share/${PN}
	doexe iwdrofimenu.py
	dobin "${FILESDIR}"/iwdrofimenu
	einstalldocs
}