repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

quickshell/nugu/BindModeWidget.qml

Raw
import QtQuick
import Quickshell.Hyprland
import "."

StatusItem {
    id: root

    property string mode: ""

    text: mode.length > 0 ? `󰌌 ${mode}` : ""
    active: mode.length > 0
    minWidth: 60

    // Current Hypr Lua config has no submaps, so parity is hidden state. Listening
    // now preserves future bind-mode behavior without adding Hypr config.
    Connections {
        target: Hyprland
        function onRawEvent(event) {
            if (event.name !== "submap") return
            const parsed = event.parse(1)
            root.mode = parsed.length > 0 ? parsed[0] : ""
        }
    }
}