add lock.screenshot option to disable blurred desktop background
This commit is contained in:
parent
74967d798c
commit
5a5bbc5811
4 changed files with 20 additions and 27 deletions
|
|
@ -107,6 +107,7 @@ programs.nova-shell.modules = {
|
||||||
disk.enable = false; # the number will only make you anxious
|
disk.enable = false; # the number will only make you anxious
|
||||||
power.enable = false; # if you enjoy living dangerously without a logout button
|
power.enable = false; # if you enjoy living dangerously without a logout button
|
||||||
lock.enable = false; # if you prefer your session unlocked and your secrets free
|
lock.enable = false; # if you prefer your session unlocked and your secrets free
|
||||||
|
lock.screenshot = false; # disable blurred desktop screenshot background
|
||||||
lock.mpris = false; # hide media controls on the lock screen
|
lock.mpris = false; # hide media controls on the lock screen
|
||||||
lock.volume = false; # hide volume slider on the lock screen
|
lock.volume = false; # hide volume slider on the lock screen
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,11 @@ in
|
||||||
simpleModules
|
simpleModules
|
||||||
// {
|
// {
|
||||||
lock = moduleOpt "lock" {
|
lock = moduleOpt "lock" {
|
||||||
|
screenshot = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Show blurred desktop screenshot as lock screen background.";
|
||||||
|
};
|
||||||
mpris = lib.mkOption {
|
mpris = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,19 @@ WlSessionLockSurface {
|
||||||
|
|
||||||
color: M.Theme.base00
|
color: M.Theme.base00
|
||||||
|
|
||||||
|
property real _bgOpacity: 0
|
||||||
|
NumberAnimation on _bgOpacity {
|
||||||
|
to: 1
|
||||||
|
duration: 400
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
|
||||||
// Blur screenshot of desktop as background
|
// Blur screenshot of desktop as background
|
||||||
ScreencopyView {
|
ScreencopyView {
|
||||||
id: background
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
captureSource: root.screen
|
captureSource: root.screen
|
||||||
opacity: 0
|
opacity: root._bgOpacity
|
||||||
|
visible: M.Modules.lock.screenshot ?? true
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: MultiEffect {
|
layer.effect: MultiEffect {
|
||||||
|
|
@ -29,19 +36,13 @@ WlSessionLockSurface {
|
||||||
blur: 1
|
blur: 1
|
||||||
blurMax: 64
|
blurMax: 64
|
||||||
}
|
}
|
||||||
|
|
||||||
NumberAnimation on opacity {
|
|
||||||
to: 1
|
|
||||||
duration: 400
|
|
||||||
easing.type: Easing.OutCubic
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dim overlay
|
// Dim overlay
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: Qt.rgba(M.Theme.base00.r, M.Theme.base00.g, M.Theme.base00.b, 0.4)
|
color: Qt.rgba(M.Theme.base00.r, M.Theme.base00.g, M.Theme.base00.b, 0.4)
|
||||||
opacity: background.opacity
|
opacity: root._bgOpacity
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hex wave overlay
|
// Hex wave overlay
|
||||||
|
|
@ -49,15 +50,7 @@ WlSessionLockSurface {
|
||||||
id: hexWave
|
id: hexWave
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
running: root.lock.secure
|
running: root.lock.secure
|
||||||
opacity: background.opacity * 0.4
|
opacity: root._bgOpacity * 0.4
|
||||||
|
|
||||||
NumberAnimation on opacity {
|
|
||||||
id: _hexFadeIn
|
|
||||||
running: false
|
|
||||||
to: 0.4
|
|
||||||
duration: 600
|
|
||||||
easing.type: Easing.OutCubic
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keyboard input via TextInput - engages Qt's full input pipeline including
|
// Keyboard input via TextInput - engages Qt's full input pipeline including
|
||||||
|
|
@ -300,15 +293,8 @@ WlSessionLockSurface {
|
||||||
easing.type: Easing.InCubic
|
easing.type: Easing.InCubic
|
||||||
}
|
}
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
target: background
|
target: root
|
||||||
property: "opacity"
|
property: "_bgOpacity"
|
||||||
to: 0
|
|
||||||
duration: 300
|
|
||||||
easing.type: Easing.InCubic
|
|
||||||
}
|
|
||||||
NumberAnimation {
|
|
||||||
target: hexWave
|
|
||||||
property: "opacity"
|
|
||||||
to: 0
|
to: 0
|
||||||
duration: 300
|
duration: 300
|
||||||
easing.type: Easing.InCubic
|
easing.type: Easing.InCubic
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ QtObject {
|
||||||
})
|
})
|
||||||
property var lock: ({
|
property var lock: ({
|
||||||
enable: true,
|
enable: true,
|
||||||
|
screenshot: true,
|
||||||
mpris: true,
|
mpris: true,
|
||||||
volume: true
|
volume: true
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue