wip
This commit is contained in:
parent
32edcff102
commit
0296117901
110 changed files with 9713 additions and 5 deletions
48
modules/osd/Interactions.qml
Normal file
48
modules/osd/Interactions.qml
Normal file
|
@ -0,0 +1,48 @@
|
|||
import "root:/services"
|
||||
import "root:/config"
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
|
||||
Scope {
|
||||
id: root
|
||||
|
||||
required property ShellScreen screen
|
||||
required property PersistentProperties visibilities
|
||||
required property bool hovered
|
||||
readonly property Brightness.Monitor monitor: Brightness.getMonitorForScreen(screen)
|
||||
|
||||
function show(): void {
|
||||
root.visibilities.osd = true;
|
||||
timer.restart();
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Audio
|
||||
|
||||
function onMutedChanged(): void {
|
||||
root.show();
|
||||
}
|
||||
|
||||
function onVolumeChanged(): void {
|
||||
root.show();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: root.monitor
|
||||
|
||||
function onBrightnessChanged(): void {
|
||||
root.show();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
|
||||
interval: OsdConfig.hideDelay
|
||||
onTriggered: {
|
||||
if (!root.hovered)
|
||||
root.visibilities.osd = false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue