Files
DankMaterialShell/quickshell/Modules/OSD/IdleInhibitorOSD.qml
T

34 lines
750 B
QML

import QtQuick
import qs.Common
import qs.Services
import qs.Widgets
DOSD {
id: root
osdKind: "idleInhibitor"
osdWidth: Theme.osdHeight
osdHeight: Theme.osdHeight
autoHideInterval: 2000
enableMouseInteraction: false
Connections {
target: SessionService
function onInhibitorChanged() {
if (SettingsData.osdIdleInhibitorEnabled) {
root.show();
}
}
}
content: Item {
OsdIcon {
tonal: false
anchors.centerIn: parent
iconName: SessionService.idleInhibited ? "motion_sensor_active" : "motion_sensor_idle"
iconColor: SessionService.idleInhibited ? Theme.primary : Theme.outline
}
}
}