qs: fullscreen mute icon
This commit is contained in:
parent
2192caf8ad
commit
ec70f24581
1 changed files with 37 additions and 0 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Quickshell
|
import Quickshell
|
||||||
|
import Quickshell.Widgets
|
||||||
|
import Quickshell.Wayland
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Services.Pipewire
|
import Quickshell.Services.Pipewire
|
||||||
import qs.bar
|
import qs.bar
|
||||||
|
|
@ -42,6 +44,41 @@ BarWidgetInner {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Variants {
|
||||||
|
model: {
|
||||||
|
if (!Pipewire.defaultAudioSource.audio?.muted) return [];
|
||||||
|
return [...new Set(ToplevelManager.toplevels.values.filter(t => t.fullscreen).map(t => t.screens[0]))];
|
||||||
|
}
|
||||||
|
|
||||||
|
PanelWindow {
|
||||||
|
required property ShellScreen modelData;
|
||||||
|
screen: modelData
|
||||||
|
|
||||||
|
anchors.left: true
|
||||||
|
anchors.bottom: true
|
||||||
|
margins.left: 100
|
||||||
|
margins.bottom: 100
|
||||||
|
exclusionMode: ExclusionMode.Ignore
|
||||||
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
|
mask: Region {}
|
||||||
|
color: "transparent"
|
||||||
|
implicitWidth: 64
|
||||||
|
implicitHeight: 64
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: "#40000000"
|
||||||
|
radius: 15
|
||||||
|
|
||||||
|
IconImage {
|
||||||
|
source: Quickshell.iconPath("microphone-sensitivity-muted-symbolic")
|
||||||
|
anchors.fill: parent
|
||||||
|
opacity: 0.3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
target: "audio"
|
target: "audio"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue