formatter
This commit is contained in:
+40
-37
@@ -5,52 +5,55 @@ import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
id: root
|
||||
|
||||
property alias enabled: props.enabled
|
||||
readonly property alias enabledSince: props.enabledSince
|
||||
property alias enabled: props.enabled
|
||||
readonly property alias enabledSince: props.enabledSince
|
||||
|
||||
onEnabledChanged: {
|
||||
if (enabled)
|
||||
props.enabledSince = new Date();
|
||||
}
|
||||
onEnabledChanged: {
|
||||
if (enabled)
|
||||
props.enabledSince = new Date();
|
||||
}
|
||||
|
||||
PersistentProperties {
|
||||
id: props
|
||||
PersistentProperties {
|
||||
id: props
|
||||
|
||||
property bool enabled
|
||||
property date enabledSince
|
||||
property bool enabled
|
||||
property date enabledSince
|
||||
|
||||
reloadableId: "idleInhibitor"
|
||||
}
|
||||
reloadableId: "idleInhibitor"
|
||||
}
|
||||
|
||||
IdleInhibitor {
|
||||
enabled: props.enabled
|
||||
window: PanelWindow {
|
||||
implicitWidth: 0
|
||||
implicitHeight: 0
|
||||
color: "transparent"
|
||||
mask: Region {}
|
||||
}
|
||||
}
|
||||
IdleInhibitor {
|
||||
enabled: props.enabled
|
||||
|
||||
IpcHandler {
|
||||
target: "idleInhibitor"
|
||||
window: PanelWindow {
|
||||
color: "transparent"
|
||||
implicitHeight: 0
|
||||
implicitWidth: 0
|
||||
|
||||
function isEnabled(): bool {
|
||||
return props.enabled;
|
||||
}
|
||||
mask: Region {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function toggle(): void {
|
||||
props.enabled = !props.enabled;
|
||||
}
|
||||
IpcHandler {
|
||||
function disable(): void {
|
||||
props.enabled = false;
|
||||
}
|
||||
|
||||
function enable(): void {
|
||||
props.enabled = true;
|
||||
}
|
||||
function enable(): void {
|
||||
props.enabled = true;
|
||||
}
|
||||
|
||||
function disable(): void {
|
||||
props.enabled = false;
|
||||
}
|
||||
}
|
||||
function isEnabled(): bool {
|
||||
return props.enabled;
|
||||
}
|
||||
|
||||
function toggle(): void {
|
||||
props.enabled = !props.enabled;
|
||||
}
|
||||
|
||||
target: "idleInhibitor"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user