3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-08-18 11:02:10 +00:00
Files
Hyprland/src/managers/WelcomeManager.cpp
Vaxry 5ba33f8461 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.
2026-04-26 15:16:36 +01:00

38 lines
912 B
C++

#include "WelcomeManager.hpp"
#include "../Compositor.hpp"
#include "../debug/log/Logger.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<Config::INTEGER>("autogenerated");
if (!*PAUTOGEN) {
Log::logger->log(Log::DEBUG, "[welcome] skipping, not autogen");
return;
}
if (g_pCompositor->m_safeMode) {
Log::logger->log(Log::DEBUG, "[welcome] skipping, safe mode");
return;
}
if (!NFsUtils::executableExistsInPath("hyprland-welcome")) {
Log::logger->log(Log::DEBUG, "[welcome] skipping, no welcome app");
return;
}
m_fired = true;
CProcess welcome("hyprland-welcome", {});
welcome.runAsync();
}
bool CWelcomeManager::fired() {
return m_fired;
}