diff --git a/Config/Config.qml b/Config/Config.qml index 272e6b2..4f4dca0 100644 --- a/Config/Config.qml +++ b/Config/Config.qml @@ -196,6 +196,7 @@ Singleton { wallpaperPath: general.wallpaperPath, desktopIcons: general.desktopIcons, dateFormat: general.dateFormat, + lidWatch: general.lidWatch, color: { mode: general.color.mode, smart: general.color.smart, diff --git a/Config/General.qml b/Config/General.qml index 45d3513..1ab28c1 100644 --- a/Config/General.qml +++ b/Config/General.qml @@ -10,6 +10,7 @@ JsonObject { } property string dateFormat: "ddd d MMM - hh:mm:ss" property bool desktopIcons: false + property bool lidWatch: true property Idle idle: Idle { } property string logo: "" diff --git a/Modules/Settings/Categories/Lockscreen.qml b/Modules/Settings/Categories/Lockscreen.qml index d08b8a1..47f0f4d 100644 --- a/Modules/Settings/Categories/Lockscreen.qml +++ b/Modules/Settings/Categories/Lockscreen.qml @@ -59,6 +59,15 @@ SettingsPage { Separator { } + SettingSwitch { + name: "Lid watch" + object: Config.general + setting: "lidWatch" + } + + Separator { + } + SettingSpinBox { min: 0 name: "Blur amount" diff --git a/shell.qml b/shell.qml index 62e207d..3720216 100644 --- a/shell.qml +++ b/shell.qml @@ -14,6 +14,7 @@ import qs.Modules.Wallpaper import qs.Modules.Lock import qs.Drawers import qs.Helpers +import qs.Config import qs.Modules.Polkit import qs.Daemons @@ -38,6 +39,7 @@ ShellRoot { } Connections { + enabled: Config.general.lidWatch function onLidClosing(): void { lock.lock.locked = true; }