pipewire service, lock-aware applets, cpu overall chart, security comments
This commit is contained in:
parent
e7bf175169
commit
8628b4b27b
13 changed files with 183 additions and 208 deletions
|
|
@ -8,6 +8,7 @@ QtObject {
|
|||
id: root
|
||||
|
||||
readonly property bool enabled: S.Modules.lock.enable
|
||||
property bool locked: false
|
||||
property string sessionPath: ""
|
||||
|
||||
// Lock/unlock requests from logind
|
||||
|
|
@ -15,10 +16,10 @@ QtObject {
|
|||
signal unlockRequested
|
||||
|
||||
// Set logind LockedHint
|
||||
function setLockedHint(locked) {
|
||||
function setLockedHint(isLocked) {
|
||||
if (!sessionPath)
|
||||
return;
|
||||
_lockedHint._locked = locked;
|
||||
root.locked = isLocked;
|
||||
_lockedHint.running = true;
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +83,6 @@ QtObject {
|
|||
|
||||
// Set logind LockedHint
|
||||
property Process _lockedHint: Process {
|
||||
property bool _locked: false
|
||||
command: ["busctl", "call", "--system", "org.freedesktop.login1", root.sessionPath || "/org/freedesktop/login1/session/auto", "org.freedesktop.login1.Session", "SetLockedHint", "b", _locked ? "true" : "false"]
|
||||
command: ["busctl", "call", "--system", "org.freedesktop.login1", root.sessionPath || "/org/freedesktop/login1/session/auto", "org.freedesktop.login1.Session", "SetLockedHint", "b", root.locked ? "true" : "false"]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
36
shell/services/PipewireService.qml
Normal file
36
shell/services/PipewireService.qml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
pragma Singleton
|
||||
|
||||
import QtQuick
|
||||
import Quickshell.Services.Pipewire
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
readonly property var sink: Pipewire.defaultAudioSink
|
||||
readonly property real volume: sink?.audio?.volume ?? 0
|
||||
readonly property bool muted: sink?.audio?.muted ?? false
|
||||
|
||||
readonly property var sinks: {
|
||||
const list = [];
|
||||
if (Pipewire.nodes) {
|
||||
for (const node of Pipewire.nodes.values)
|
||||
if (!node.isStream && node.isSink)
|
||||
list.push(node);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
readonly property var streams: {
|
||||
const list = [];
|
||||
if (Pipewire.nodes) {
|
||||
for (const node of Pipewire.nodes.values)
|
||||
if (node.isStream && node.audio)
|
||||
list.push(node);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
property PwObjectTracker _tracker: PwObjectTracker {
|
||||
objects: [Pipewire.defaultAudioSink, ...root.streams]
|
||||
}
|
||||
}
|
||||
|
|
@ -12,6 +12,7 @@ singleton MprisService 1.0 MprisService.qml
|
|||
singleton NetworkService 1.0 NetworkService.qml
|
||||
singleton NiriIpc 1.0 NiriIpc.qml
|
||||
singleton NotifService 1.0 NotifService.qml
|
||||
singleton PipewireService 1.0 PipewireService.qml
|
||||
singleton PowerProfileService 1.0 PowerProfileService.qml
|
||||
singleton ScreenshotService 1.0 ScreenshotService.qml
|
||||
singleton SleepService 1.0 SleepService.qml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue