mirror of
https://github.com/hyprwm/hyprcursor.git
synced 2024-11-17 02:35:57 +01:00
util: check for xcur2png before extract
This commit is contained in:
parent
4daa132c00
commit
b2cd693956
1 changed files with 3 additions and 0 deletions
|
@ -288,6 +288,9 @@ static std::string spawnSync(const std::string& cmd) {
|
||||||
|
|
||||||
static std::optional<std::string> extractXTheme(const std::string& xpath, const std::string& out_) {
|
static std::optional<std::string> 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"))
|
if (!std::filesystem::exists(xpath) || !std::filesystem::exists(xpath + "/cursors"))
|
||||||
return "input path does not exist or is not an xcursor theme";
|
return "input path does not exist or is not an xcursor theme";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue