wayland/shortcuts-inhibit: add shortcuts inhibitor
Some checks failed
Build / Nix (push) Has been cancelled
Build / Nix-1 (push) Has been cancelled
Build / Nix-2 (push) Has been cancelled
Build / Nix-3 (push) Has been cancelled
Build / Nix-4 (push) Has been cancelled
Build / Nix-5 (push) Has been cancelled
Build / Nix-6 (push) Has been cancelled
Build / Nix-7 (push) Has been cancelled
Build / Nix-8 (push) Has been cancelled
Build / Nix-9 (push) Has been cancelled
Build / Nix-10 (push) Has been cancelled
Build / Nix-11 (push) Has been cancelled
Build / Nix-12 (push) Has been cancelled
Build / Nix-13 (push) Has been cancelled
Build / Nix-14 (push) Has been cancelled
Build / Nix-15 (push) Has been cancelled
Build / Nix-16 (push) Has been cancelled
Build / Nix-17 (push) Has been cancelled
Build / Nix-18 (push) Has been cancelled
Build / Nix-19 (push) Has been cancelled
Build / Nix-20 (push) Has been cancelled
Build / Nix-21 (push) Has been cancelled
Build / Nix-22 (push) Has been cancelled
Build / Nix-23 (push) Has been cancelled
Build / Nix-24 (push) Has been cancelled
Build / Nix-25 (push) Has been cancelled
Build / Nix-26 (push) Has been cancelled
Build / Nix-27 (push) Has been cancelled
Build / Nix-28 (push) Has been cancelled
Build / Nix-29 (push) Has been cancelled
Build / Nix-30 (push) Has been cancelled
Build / Nix-31 (push) Has been cancelled
Build / Archlinux (push) Has been cancelled
Lint / Lint (push) Has been cancelled

This commit is contained in:
bbedward 2025-09-29 18:20:04 -04:00 committed by outfoxxed
parent 1ddb355121
commit ed036d514b
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
9 changed files with 523 additions and 0 deletions

View file

@ -0,0 +1,65 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Quickshell
import Quickshell.Wayland
Scope {
Timer {
id: toggleTimer
interval: 100
onTriggered: windowLoader.active = true
}
LazyLoader {
id: windowLoader
active: true
property bool enabled: false
FloatingWindow {
id: w
color: contentItem.palette.window
ColumnLayout {
anchors.centerIn: parent
CheckBox {
id: loadedCb
text: "Loaded"
checked: true
}
CheckBox {
id: enabledCb
text: "Enabled"
checked: windowLoader.enabled
onCheckedChanged: windowLoader.enabled = checked
}
Label {
text: `Active: ${inhibitorLoader.item?.active ?? false}`
}
Button {
text: "Toggle Window"
onClicked: {
windowLoader.active = false;
toggleTimer.start();
}
}
}
LazyLoader {
id: inhibitorLoader
active: loadedCb.checked
ShortcutInhibitor {
window: w
enabled: enabledCb.checked
onCancelled: enabledCb.checked = false
}
}
}
}
}