add quickshell

This commit is contained in:
Zoty 2026-04-15 10:38:34 -03:00
parent 3d48e35de5
commit 10960f620d
Signed by: Zoty
SSH key fingerprint: SHA256:WsGEGivgl37t3Mth6uugXMOgMCTR7QolIepNbC+j/tA
32 changed files with 1415 additions and 11 deletions

37
quickshell/GpuMonitor.qml Normal file
View file

@ -0,0 +1,37 @@
pragma Singleton
import Quickshell
import Quickshell.Io
import QtQuick
Singleton {
id: root
property int usage: 0
property int temp: 0
Timer {
interval: 2000
running: true
repeat: true
triggeredOnStart: true
onTriggered: {
_proc.running = false
_proc.running = true
}
}
Process {
id: _proc
command: ["nvidia-smi", "--query-gpu=utilization.gpu,temperature.gpu", "--format=csv,noheader,nounits"]
stdout: SplitParser {
onRead: line => {
const parts = line.trim().split(/\s*,\s*/)
if (parts.length < 2) return
const u = parseInt(parts[0])
const t = parseInt(parts[1])
if (!isNaN(u)) root.usage = u
if (!isNaN(t)) root.temp = t
}
}
}
}