add per-applet toggle options for lock screen widgets
This commit is contained in:
parent
8f66d67029
commit
74967d798c
4 changed files with 19 additions and 4 deletions
|
|
@ -107,6 +107,8 @@ programs.nova-shell.modules = {
|
|||
disk.enable = false; # the number will only make you anxious
|
||||
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.mpris = false; # hide media controls on the lock screen
|
||||
lock.volume = false; # hide volume slider on the lock screen
|
||||
|
||||
# modules with extra config
|
||||
backlight.step = 2; # brightness adjustment %
|
||||
|
|
|
|||
|
|
@ -96,11 +96,22 @@ in
|
|||
"power"
|
||||
"backgroundOverlay"
|
||||
"overviewBackdrop"
|
||||
"lock"
|
||||
] (name: moduleOpt name { });
|
||||
in
|
||||
simpleModules
|
||||
// {
|
||||
lock = moduleOpt "lock" {
|
||||
mpris = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Show media controls on the lock screen.";
|
||||
};
|
||||
volume = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Show volume slider on the lock screen.";
|
||||
};
|
||||
};
|
||||
notifications = moduleOpt "notifications" {
|
||||
timeout = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ WlSessionLockSurface {
|
|||
color: Qt.rgba(M.Theme.base01.r, M.Theme.base01.g, M.Theme.base01.b, 0.7)
|
||||
border.color: Qt.rgba(M.Theme.base03.r, M.Theme.base03.g, M.Theme.base03.b, 0.3)
|
||||
border.width: 1
|
||||
visible: _mprisPlayer !== null
|
||||
visible: (M.Modules.lock.mpris ?? true) && _mprisPlayer !== null
|
||||
|
||||
readonly property var _mprisPlayers: (Mpris.players.values ?? []).filter(p => p.trackTitle || p.playbackState === MprisPlaybackState.Playing || p.playbackState === MprisPlaybackState.Paused)
|
||||
readonly property var _mprisPlayer: _mprisPlayers[0] ?? null
|
||||
|
|
@ -233,7 +233,7 @@ WlSessionLockSurface {
|
|||
color: Qt.rgba(M.Theme.base01.r, M.Theme.base01.g, M.Theme.base01.b, 0.7)
|
||||
border.color: Qt.rgba(M.Theme.base03.r, M.Theme.base03.g, M.Theme.base03.b, 0.3)
|
||||
border.width: 1
|
||||
visible: Pipewire.defaultAudioSink !== null
|
||||
visible: (M.Modules.lock.volume ?? true) && Pipewire.defaultAudioSink !== null
|
||||
|
||||
PwObjectTracker {
|
||||
objects: [Pipewire.defaultAudioSink]
|
||||
|
|
|
|||
|
|
@ -93,7 +93,9 @@ QtObject {
|
|||
enable: true
|
||||
})
|
||||
property var lock: ({
|
||||
enable: true
|
||||
enable: true,
|
||||
mpris: true,
|
||||
volume: true
|
||||
})
|
||||
property var statsDaemon: ({
|
||||
interval: -1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue