Something went wrong. Try again.
my over complex system configurations
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930.pragma library
// The numbers and rules behind Session.qml, kept free of Quickshell types so// they run under qmltestrunner.
// the idle warning lasts 20 s, or the last third of a very short timeoutconst maxWarningSeconds = 20;
// minutes of idleness before the lock -> when the lock and the warning startfunction idleTimes(minutes) { const lockAfter = minutes * 60; const warnFor = Math.min(maxWarningSeconds, Math.floor(lockAfter / 3)); return { lockAfter, warnFor, warnAfter: lockAfter - warnFor };}
// 0 minutes never locks; neither does a lock already up or keep-awakefunction idleEnabled(minutes, locked, keepAwake) { return minutes > 0 && !locked && !keepAwake;}
// The lock file holds the Hyprland instance that was locked, so a fresh login// never inherits a lock from a session that ended locked.function isLockedIn(fileText, key) { return fileText.trim() === key;}
function lockFileText(locked, key) { return locked ? key : "";}