# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.17.1

EAPI=8

CRATES=""

RUST_MIN_VER="1.87.0"

inherit cargo optfeature

DESCRIPTION="Tiling window manager with COSMIC/BSPWM layout for River written in Rust"
HOMEPAGE="https://github.com/cap153/rrwm"
EGIT_REPO_URI="https://github.com/cap153/rrwm"

LICENSE="MIT"
SLOT="0"

# Rust does not use *FLAGS from make.conf, silence portage warning
# update with proper path to binaries this crate installs, omit leading /
QA_FLAGS_IGNORED="usr/bin/${PN}"
QA_PRESTRIPPED="usr/bin/${PN}"

RDEPEND=">=gui-wm/river-0.4.0"

src_unpack() {
	git-r3_src_unpack
	cargo_live_src_unpack
}

pkg_postinst() {
	elog ""
	elog "To start RRWM, you can either:"
	elog "'river -c rrwm'"
	elog "or edit '~/.config/river/init' and add 'rrwm &' to start RRWM"
	elog "You can check https://github.com/cap153/rrwm#configuration-example to see conf example."
	elog "Configuration should be located in ~/.config/river and file name should be named as 'rrvm.toml'!"
	elog ""

	optfeature "keyring" gnome-base/gnome-keyring
	optfeature "polkit authentication popup" gnome-extra/polkit-gnome
	optfeature "application launcher" x11-misc/rofi
	optfeature "status bar" gui-apps/waybar
	optfeature "wallpaper utility" gui-apps/swaybg
	optfeature "terminal emulator" x11-terms/kitty
}