init: working version

This commit is contained in:
Kiana Sheibani 2025-10-07 19:43:46 -04:00
commit 7d8d7dacae
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
109 changed files with 15066 additions and 0 deletions

47
services/Idle.qml Normal file
View file

@ -0,0 +1,47 @@
pragma Singleton
import QtQuick
import Quickshell
import Quickshell.Io
Singleton {
id: root
property alias inhibit: inhibitor.running
property bool inhibitPipewire
function toggleInhibitPipewire() {
root.inhibitPipewire = !root.inhibitPipewire;
pipewireInhibitor.running = true;
}
// Idle Inhibitor
Process {
id: inhibitor
command: ["wayland-idle-inhibitor"]
}
// Idle Inhibit on Pipewire
readonly property string pipewireInhibitorService: "wayland-pipewire-idle-inhibit.service"
Timer {
id: pipewireInhibitorTimer
running: true
repeat: true
triggeredOnStart: true
onTriggered: pipewireInhibitorCheck.running = true
}
Process {
id: pipewireInhibitorCheck
command: ["systemctl", "status", "--user", root.pipewireInhibitorService]
onExited: (code, _) => root.inhibitPipewire = (code === 0)
}
Process {
id: pipewireInhibitor
command: ["systemctl", root.inhibitPipewire ? "start" : "stop", "--user", root.pipewireInhibitorService]
}
}