mirror of
https://github.com/hyprwm/hyprlock.git
synced 2025-12-20 00:40:03 +01:00
background: reload screenshot if reload_cmd specified (#903)
This commit is contained in:
parent
36ec73f166
commit
98b86752fe
1 changed files with 4 additions and 3 deletions
|
|
@ -72,12 +72,13 @@ void CBackground::configure(const std::unordered_map<std::string, std::any>& pro
|
|||
} else if (!path.empty())
|
||||
resourceID = g_asyncResourceManager->requestImage(path, m_imageRevision, nullptr);
|
||||
|
||||
if (!isScreenshot && reloadTime > -1) {
|
||||
if (!reloadCommand.empty() && reloadTime > -1) {
|
||||
try {
|
||||
modificationTime = std::filesystem::last_write_time(absolutePath(path, ""));
|
||||
if (!isScreenshot)
|
||||
modificationTime = std::filesystem::last_write_time(absolutePath(path, ""));
|
||||
} catch (std::exception& e) { Debug::log(ERR, "{}", e.what()); }
|
||||
|
||||
plantReloadTimer(); // No reloads for screenshots.
|
||||
plantReloadTimer(); // No reloads if reloadCommand is empty
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue