use quickshell region selector for ocr

This commit is contained in:
end-4
2025-10-24 00:26:47 +02:00
parent 6f756f48cb
commit 3bd699c9e6
7 changed files with 259 additions and 164 deletions
@@ -56,6 +56,12 @@ Scope {
GlobalStates.regionSelectorOpen = true
}
function ocr() {
root.action = RegionSelection.SnipAction.CharRecognition
root.selectionMode = RegionSelection.SelectionMode.RectCorners
GlobalStates.regionSelectorOpen = true
}
IpcHandler {
target: "region"
@@ -65,6 +71,10 @@ Scope {
function search() {
root.search()
}
function ocr() {
root.ocr()
}
}
GlobalShortcut {
@@ -77,4 +87,9 @@ Scope {
description: "Searches the selected region"
onPressed: root.search()
}
GlobalShortcut {
name: "regionOcr"
description: "Recognizes text in the selected region"
onPressed: root.ocr()
}
}