fix: add lock config scope
Also global lock settings And fix some accesses
This commit is contained in:
parent
bbba6e162d
commit
8883156dd9
5 changed files with 67 additions and 60 deletions
|
|
@ -11,7 +11,7 @@ Scope {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property Lock lock
|
required property Lock lock
|
||||||
readonly property bool enabled: !Config.general.idle.inhibitWhenAudio || !Players.list.some(p => p.isPlaying)
|
readonly property bool enabled: !GlobalConfig.general.idle.inhibitWhenAudio || !Players.list.some(p => p.isPlaying)
|
||||||
|
|
||||||
function handleIdleAction(action: var): void {
|
function handleIdleAction(action: var): void {
|
||||||
if (!action)
|
if (!action)
|
||||||
|
|
@ -29,7 +29,7 @@ Scope {
|
||||||
|
|
||||||
LogindManager {
|
LogindManager {
|
||||||
onAboutToSleep: {
|
onAboutToSleep: {
|
||||||
if (Config.general.idle.lockBeforeSleep)
|
if (GlobalConfig.general.idle.lockBeforeSleep)
|
||||||
root.lock.lock.locked = true;
|
root.lock.lock.locked = true;
|
||||||
}
|
}
|
||||||
onLockRequested: root.lock.lock.locked = true
|
onLockRequested: root.lock.lock.locked = true
|
||||||
|
|
@ -37,7 +37,7 @@ Scope {
|
||||||
}
|
}
|
||||||
|
|
||||||
Variants {
|
Variants {
|
||||||
model: Config.general.idle.timeouts
|
model: GlobalConfig.general.idle.timeouts
|
||||||
|
|
||||||
IdleMonitor {
|
IdleMonitor {
|
||||||
required property var modelData
|
required property var modelData
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,12 @@ WlSessionLockSurface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConfigScope {
|
||||||
|
id: configScope
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
screen: root.screen
|
||||||
|
|
||||||
ScreencopyView {
|
ScreencopyView {
|
||||||
id: background
|
id: background
|
||||||
|
|
||||||
|
|
@ -228,3 +234,4 @@ WlSessionLockSurface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ Scope {
|
||||||
property int errorTries
|
property int errorTries
|
||||||
|
|
||||||
function checkAvail(): void {
|
function checkAvail(): void {
|
||||||
if (!available || !Config.lock.enableFprint || !root.lock.secure) {
|
if (!available || !GlobalConfig.lock.enableFprint || !root.lock.secure) {
|
||||||
abort();
|
abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -113,7 +113,7 @@ Scope {
|
||||||
// Isn't actually the real max tries as pam only reports completed
|
// Isn't actually the real max tries as pam only reports completed
|
||||||
// when max tries is reached.
|
// when max tries is reached.
|
||||||
tries++;
|
tries++;
|
||||||
if (tries < Config.lock.maxFprintTries) {
|
if (tries < GlobalConfig.lock.maxFprintTries) {
|
||||||
// Restart if not actually real max tries
|
// Restart if not actually real max tries
|
||||||
root.fprintState = "fail";
|
root.fprintState = "fail";
|
||||||
start();
|
start();
|
||||||
|
|
@ -188,6 +188,6 @@ Scope {
|
||||||
fprint.checkAvail();
|
fprint.checkAvail();
|
||||||
}
|
}
|
||||||
|
|
||||||
target: Config.lock
|
target: GlobalConfig.lock
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ class LockConfig : public ConfigObject {
|
||||||
QML_ANONYMOUS
|
QML_ANONYMOUS
|
||||||
|
|
||||||
CONFIG_PROPERTY(bool, recolourLogo, false)
|
CONFIG_PROPERTY(bool, recolourLogo, false)
|
||||||
CONFIG_PROPERTY(bool, enableFprint, true)
|
CONFIG_GLOBAL_PROPERTY(bool, enableFprint, true)
|
||||||
CONFIG_PROPERTY(int, maxFprintTries, 3)
|
CONFIG_GLOBAL_PROPERTY(int, maxFprintTries, 3)
|
||||||
CONFIG_PROPERTY(bool, hideNotifs, false)
|
CONFIG_PROPERTY(bool, hideNotifs, false)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ Singleton {
|
||||||
|
|
||||||
readonly property string imagecache: `${cache}/imagecache`
|
readonly property string imagecache: `${cache}/imagecache`
|
||||||
readonly property string notifimagecache: `${imagecache}/notifs`
|
readonly property string notifimagecache: `${imagecache}/notifs`
|
||||||
readonly property string wallsdir: Quickshell.env("CAELESTIA_WALLPAPERS_DIR") || absolutePath(Config.paths.wallpaperDir)
|
readonly property string wallsdir: Quickshell.env("CAELESTIA_WALLPAPERS_DIR") || absolutePath(GlobalConfig.paths.wallpaperDir)
|
||||||
readonly property string recsdir: Quickshell.env("CAELESTIA_RECORDINGS_DIR") || `${videos}/Recordings`
|
readonly property string recsdir: Quickshell.env("CAELESTIA_RECORDINGS_DIR") || `${videos}/Recordings`
|
||||||
readonly property string libdir: Quickshell.env("CAELESTIA_LIB_DIR") || "/usr/lib/caelestia"
|
readonly property string libdir: Quickshell.env("CAELESTIA_LIB_DIR") || "/usr/lib/caelestia"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue