summaryrefslogtreecommitdiff
path: root/src/config/shared/inotify/ConfigWatcher.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-04-26 15:16:36 +0100
committerGitHub <noreply@github.com>2026-04-26 15:16:36 +0100
commit5ba33f846129f3e6c0505b19f94634b24505e828 (patch)
treeaaacabe678006040c342935481a86607c66607fd /src/config/shared/inotify/ConfigWatcher.cpp
parent329b2b356dd92ac07f4e2aa69cbce82ee9ba9d19 (diff)
config/lua: init lua config manager, use lua if available (#13817)
Adds a new lua config manager, which will automatically be used if there is a lua config present.
Diffstat (limited to 'src/config/shared/inotify/ConfigWatcher.cpp')
-rw-r--r--src/config/shared/inotify/ConfigWatcher.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config/shared/inotify/ConfigWatcher.cpp b/src/config/shared/inotify/ConfigWatcher.cpp
index 02cedbd6..c10039e4 100644
--- a/src/config/shared/inotify/ConfigWatcher.cpp
+++ b/src/config/shared/inotify/ConfigWatcher.cpp
@@ -39,7 +39,7 @@ CFileDescriptor& CConfigWatcher::getInotifyFD() {
}
void CConfigWatcher::update() {
- static const auto PDISABLEAUTORELOAD = CConfigValue<Hyprlang::INT>("misc:disable_autoreload");
+ static const auto PDISABLEAUTORELOAD = CConfigValue<Config::INTEGER>("misc:disable_autoreload");
setWatchList(*PDISABLEAUTORELOAD ? std::vector<std::string>{} : Config::mgr()->getConfigPaths());
}
@@ -60,7 +60,7 @@ void CConfigWatcher::setWatchList(const std::vector<std::string>& paths) {
// add new paths
for (const auto& path : paths) {
m_watches.emplace_back(SInotifyWatch{
- .wd = inotify_add_watch(m_inotifyFd.get(), path.c_str(), IN_MODIFY | IN_DONT_FOLLOW),
+ .wd = inotify_add_watch(m_inotifyFd.get(), path.c_str(), IN_CLOSE_WRITE | IN_DONT_FOLLOW),
.file = path,
});
@@ -69,7 +69,7 @@ void CConfigWatcher::setWatchList(const std::vector<std::string>& paths) {
const auto IS_SYMLINK = std::filesystem::is_symlink(path, ec2);
if (!ec && !ec2 && IS_SYMLINK) {
m_watches.emplace_back(SInotifyWatch{
- .wd = inotify_add_watch(m_inotifyFd.get(), CANONICAL.c_str(), IN_MODIFY),
+ .wd = inotify_add_watch(m_inotifyFd.get(), CANONICAL.c_str(), IN_CLOSE_WRITE),
.file = path,
});
}