use quickshell region selector for recording

This commit is contained in:
end-4
2025-10-26 15:45:07 +01:00
parent 53998cc51a
commit 7c5740a39b
8 changed files with 143 additions and 51 deletions
@@ -62,6 +62,18 @@ Scope {
GlobalStates.regionSelectorOpen = true
}
function record() {
root.action = RegionSelection.SnipAction.Record
root.selectionMode = RegionSelection.SelectionMode.RectCorners
GlobalStates.regionSelectorOpen = true
}
function recordWithSound() {
root.action = RegionSelection.SnipAction.RecordWithSound
root.selectionMode = RegionSelection.SelectionMode.RectCorners
GlobalStates.regionSelectorOpen = true
}
IpcHandler {
target: "region"
@@ -71,10 +83,15 @@ Scope {
function search() {
root.search()
}
function ocr() {
root.ocr()
}
function record() {
root.record()
}
function recordWithSound() {
root.recordWithSound()
}
}
GlobalShortcut {
@@ -92,4 +109,14 @@ Scope {
description: "Recognizes text in the selected region"
onPressed: root.ocr()
}
GlobalShortcut {
name: "regionRecord"
description: "Records the selected region"
onPressed: root.record()
}
GlobalShortcut {
name: "regionRecordWithSound"
description: "Records the selected region with sound"
onPressed: root.recordWithSound()
}
}