forked from Shinonome/dots-hyprland
use quickshell region selector for ocr
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user