mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-11-16 22:25:59 +01:00
fix unload all
This commit is contained in:
parent
3571e20b55
commit
3293f37662
1 changed files with 5 additions and 5 deletions
|
@ -112,11 +112,6 @@ void CConfigManager::parseKeyword(const std::string& COMMAND, const std::string&
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigManager::handleWallpaper(const std::string& COMMAND, const std::string& VALUE) {
|
void CConfigManager::handleWallpaper(const std::string& COMMAND, const std::string& VALUE) {
|
||||||
if (VALUE == "all") {
|
|
||||||
handleUnloadAll(COMMAND, VALUE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (VALUE.find_first_of(',') == std::string::npos) {
|
if (VALUE.find_first_of(',') == std::string::npos) {
|
||||||
parseError = "wallpaper failed (syntax)";
|
parseError = "wallpaper failed (syntax)";
|
||||||
return;
|
return;
|
||||||
|
@ -171,6 +166,11 @@ void CConfigManager::handlePreload(const std::string& COMMAND, const std::string
|
||||||
void CConfigManager::handleUnload(const std::string& COMMAND, const std::string& VALUE) {
|
void CConfigManager::handleUnload(const std::string& COMMAND, const std::string& VALUE) {
|
||||||
auto WALLPAPER = VALUE;
|
auto WALLPAPER = VALUE;
|
||||||
|
|
||||||
|
if (VALUE == "all") {
|
||||||
|
handleUnloadAll(COMMAND, VALUE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (WALLPAPER[0] == '~') {
|
if (WALLPAPER[0] == '~') {
|
||||||
static const char* const ENVHOME = getenv("HOME");
|
static const char* const ENVHOME = getenv("HOME");
|
||||||
WALLPAPER = std::string(ENVHOME) + WALLPAPER.substr(1);
|
WALLPAPER = std::string(ENVHOME) + WALLPAPER.substr(1);
|
||||||
|
|
Loading…
Reference in a new issue