tokens: add more modes to initial_workspace_tracking

1 is single-shot, 2 is persistent

fixes #5732
This commit is contained in:
Vaxry
2024-04-24 16:16:46 +01:00
parent 81bb4eb2f6
commit 608eff600d
4 changed files with 52 additions and 8 deletions

View File

@@ -33,8 +33,9 @@ static std::vector<std::pair<std::string, std::string>> getHyprlandLaunchEnv() {
result.push_back(std::make_pair<>(
"HL_INITIAL_WORKSPACE_TOKEN",
g_pTokenManager->registerNewToken(PMONITOR->activeSpecialWorkspace ? PMONITOR->activeSpecialWorkspace->getConfigName() : PMONITOR->activeWorkspace->getConfigName(),
std::chrono::minutes(2))));
g_pTokenManager->registerNewToken(
SInitialWorkspaceToken{nullptr, PMONITOR->activeSpecialWorkspace ? PMONITOR->activeSpecialWorkspace->getConfigName() : PMONITOR->activeWorkspace->getConfigName()},
std::chrono::months(1337))));
return result;
}