diff options
Diffstat (limited to 'src/managers/WelcomeManager.cpp')
| -rw-r--r-- | src/managers/WelcomeManager.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/managers/WelcomeManager.cpp b/src/managers/WelcomeManager.cpp new file mode 100644 index 00000000..fdbbadfe --- /dev/null +++ b/src/managers/WelcomeManager.cpp @@ -0,0 +1,31 @@ +#include "WelcomeManager.hpp" +#include "../debug/Log.hpp" +#include "../config/ConfigValue.hpp" +#include "../helpers/fs/FsUtils.hpp" + +#include <hyprutils/os/Process.hpp> + +using namespace Hyprutils::OS; + +CWelcomeManager::CWelcomeManager() { + static auto PAUTOGEN = CConfigValue<Hyprlang::INT>("autogenerated"); + + if (!*PAUTOGEN) { + Debug::log(LOG, "[welcome] skipping, not autogen"); + return; + } + + if (!NFsUtils::executableExistsInPath("hyprland-welcome")) { + Debug::log(LOG, "[welcome] skipping, no welcome app"); + return; + } + + m_fired = true; + + CProcess welcome("hyprland-welcome", {}); + welcome.runAsync(); +} + +bool CWelcomeManager::fired() { + return m_fired; +} |
