setting option to disable lidwatcher, also in settingswindow
This commit is contained in:
@@ -196,6 +196,7 @@ Singleton {
|
|||||||
wallpaperPath: general.wallpaperPath,
|
wallpaperPath: general.wallpaperPath,
|
||||||
desktopIcons: general.desktopIcons,
|
desktopIcons: general.desktopIcons,
|
||||||
dateFormat: general.dateFormat,
|
dateFormat: general.dateFormat,
|
||||||
|
lidWatch: general.lidWatch,
|
||||||
color: {
|
color: {
|
||||||
mode: general.color.mode,
|
mode: general.color.mode,
|
||||||
smart: general.color.smart,
|
smart: general.color.smart,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ JsonObject {
|
|||||||
}
|
}
|
||||||
property string dateFormat: "ddd d MMM - hh:mm:ss"
|
property string dateFormat: "ddd d MMM - hh:mm:ss"
|
||||||
property bool desktopIcons: false
|
property bool desktopIcons: false
|
||||||
|
property bool lidWatch: true
|
||||||
property Idle idle: Idle {
|
property Idle idle: Idle {
|
||||||
}
|
}
|
||||||
property string logo: ""
|
property string logo: ""
|
||||||
|
|||||||
@@ -59,6 +59,15 @@ SettingsPage {
|
|||||||
Separator {
|
Separator {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingSwitch {
|
||||||
|
name: "Lid watch"
|
||||||
|
object: Config.general
|
||||||
|
setting: "lidWatch"
|
||||||
|
}
|
||||||
|
|
||||||
|
Separator {
|
||||||
|
}
|
||||||
|
|
||||||
SettingSpinBox {
|
SettingSpinBox {
|
||||||
min: 0
|
min: 0
|
||||||
name: "Blur amount"
|
name: "Blur amount"
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import qs.Modules.Wallpaper
|
|||||||
import qs.Modules.Lock
|
import qs.Modules.Lock
|
||||||
import qs.Drawers
|
import qs.Drawers
|
||||||
import qs.Helpers
|
import qs.Helpers
|
||||||
|
import qs.Config
|
||||||
import qs.Modules.Polkit
|
import qs.Modules.Polkit
|
||||||
import qs.Daemons
|
import qs.Daemons
|
||||||
|
|
||||||
@@ -38,6 +39,7 @@ ShellRoot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
enabled: Config.general.lidWatch
|
||||||
function onLidClosing(): void {
|
function onLidClosing(): void {
|
||||||
lock.lock.locked = true;
|
lock.lock.locked = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user