From b2cd693956ceadcea1ca96b751a83bc18a051eb7 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 10 Mar 2024 02:58:14 +0000 Subject: [PATCH] util: check for xcur2png before extract --- hyprcursor-util/src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hyprcursor-util/src/main.cpp b/hyprcursor-util/src/main.cpp index aa23249..5c989c6 100644 --- a/hyprcursor-util/src/main.cpp +++ b/hyprcursor-util/src/main.cpp @@ -288,6 +288,9 @@ static std::string spawnSync(const std::string& cmd) { static std::optional extractXTheme(const std::string& xpath, const std::string& out_) { + if (!spawnSync("xcur2png --help").contains("xcursor")) + return "missing dependency: -x requires xcur2png."; + if (!std::filesystem::exists(xpath) || !std::filesystem::exists(xpath + "/cursors")) return "input path does not exist or is not an xcursor theme";