mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2026-05-07 00:58:15 +02:00
Merge 826f9c9b4a into 20fc0fa6c2
This commit is contained in:
commit
a0b1fab00a
2 changed files with 15 additions and 6 deletions
|
|
@ -174,7 +174,8 @@ std::vector<CConfigManager::SSetting> CConfigManager::getSettings() {
|
|||
|
||||
for (auto& key : keys) {
|
||||
std::string monitor, fitMode, path, order;
|
||||
int timeout, recursive;
|
||||
int timeout;
|
||||
bool recursive;
|
||||
|
||||
try {
|
||||
monitor = std::any_cast<Hyprlang::STRING>(m_config.getSpecialConfigValue("wallpaper", "monitor", key.c_str()));
|
||||
|
|
@ -188,7 +189,7 @@ std::vector<CConfigManager::SSetting> CConfigManager::getSettings() {
|
|||
continue;
|
||||
}
|
||||
|
||||
const auto RESOLVE_PATH = getFullPath(path, recursive != 0);
|
||||
const auto RESOLVE_PATH = getFullPath(path, recursive);
|
||||
|
||||
if (!RESOLVE_PATH) {
|
||||
g_logger->log(LOG_ERR, "Failed to resolve path {}: {}", path, RESOLVE_PATH.error());
|
||||
|
|
@ -215,7 +216,14 @@ std::vector<CConfigManager::SSetting> CConfigManager::getSettings() {
|
|||
}
|
||||
}
|
||||
|
||||
result.emplace_back(SSetting{.monitor = std::move(monitor), .fitMode = std::move(fitMode), .paths = std::move(resolvedPaths), .order = std::move(order), .timeout = timeout});
|
||||
result.emplace_back(SSetting{
|
||||
.monitor = std::move(monitor),
|
||||
.fitMode = std::move(fitMode),
|
||||
.paths = std::move(resolvedPaths),
|
||||
.order = std::move(order),
|
||||
.timeout = timeout,
|
||||
.recursive = recursive,
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -16,9 +16,10 @@ class CConfigManager {
|
|||
struct SSetting {
|
||||
std::string monitor, fitMode;
|
||||
std::vector<std::string> paths;
|
||||
std::string order = "default";
|
||||
int timeout = 0;
|
||||
uint32_t id = 0;
|
||||
std::string order = "default";
|
||||
int timeout = 0;
|
||||
uint32_t id = 0;
|
||||
bool recursive = false;
|
||||
};
|
||||
|
||||
constexpr static const uint32_t SETTING_INVALID = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue