- Vertical bar on DP-2 with rounded-square pills throughout - Per-monitor workspace groups sorted by screen x position, with Nerd Font icons for named workspaces and apex-neon red active indicator - Bar layout: datetime+weather top, workspaces centered, gamemode+media+notif+system bottom - Popouts anchor to triggering icon (top-right for datetime/weather, bottom-right for media/notif/system) - Lock command switched from hyprlock to swaylock - Hyprland blur/ignore_alpha layerrules for quickshell namespace Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
49 lines
1.1 KiB
QML
49 lines
1.1 KiB
QML
import Quickshell
|
|
import Quickshell.Io
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import "../shared" as Shared
|
|
|
|
// Gamemode indicator — visible only when gamemode is active
|
|
// Polls `gamemoded --status` every 5 seconds
|
|
BarPill {
|
|
id: root
|
|
|
|
groupName: "" // no popout
|
|
accentColor: Shared.Theme.green
|
|
visible: isActive
|
|
|
|
property bool isActive: false
|
|
|
|
content: [
|
|
Text {
|
|
Layout.alignment: Qt.AlignHCenter
|
|
text: "\u{f0522}" // nf-md-controller_classic
|
|
color: Shared.Theme.green
|
|
font.pixelSize: Shared.Theme.fontLarge
|
|
font.family: Shared.Theme.iconFont
|
|
}
|
|
]
|
|
|
|
Process {
|
|
id: gameProc
|
|
command: ["gamemoded", "--status"]
|
|
stdout: StdioCollector {
|
|
onStreamFinished: {
|
|
root.isActive = this.text.indexOf("is active") >= 0
|
|
}
|
|
}
|
|
}
|
|
|
|
function poll() { gameProc.running = false; gameProc.running = true; }
|
|
|
|
Timer {
|
|
interval: 5000
|
|
running: true
|
|
repeat: true
|
|
onTriggered: root.poll()
|
|
}
|
|
|
|
Component.onCompleted: root.poll()
|
|
}
|