forked from Shinonome/dots-hyprland
ocr: use all available langs
This commit is contained in:
@@ -65,8 +65,8 @@ bind = Super+Shift, A, exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp
|
|||||||
# OCR
|
# OCR
|
||||||
bind = Super+Shift, X, global, quickshell:regionOcr # Character recognition >> clipboard
|
bind = Super+Shift, X, global, quickshell:regionOcr # Character recognition >> clipboard
|
||||||
bind = Super+Shift, T, global, quickshell:regionOcr # [hidden]
|
bind = Super+Shift, T, global, quickshell:regionOcr # [hidden]
|
||||||
bind = Super+Shift, X,exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || grim -g "$(slurp $SLURP_ARGS)" "/tmp/ocr_image.png" && tesseract "/tmp/ocr_image.png" - | wl-copy && rm "/tmp/ocr_image.png" # [hidden]
|
bind = Super+Shift, X,exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || grim -g "$(slurp $SLURP_ARGS)" "/tmp/ocr_image.png" && tesseract "/tmp/ocr_image.png" stdout -l $(tesseract --list-langs | awk 'NR>1{print $1}' | tr '\\n' '+' | sed 's/\\+$/\\n/') | wl-copy && rm "/tmp/ocr_image.png" # [hidden]
|
||||||
bind = Super+Shift, T,exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || grim -g "$(slurp $SLURP_ARGS)" "/tmp/ocr_image.png" && tesseract "/tmp/ocr_image.png" - | wl-copy && rm "/tmp/ocr_image.png" # [hidden]
|
bind = Super+Shift, T,exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || grim -g "$(slurp $SLURP_ARGS)" "/tmp/ocr_image.png" && tesseract "/tmp/ocr_image.png" stdout -l $(tesseract --list-langs | awk 'NR>1{print $1}' | tr '\\n' '+' | sed 's/\\+$/\\n/') | wl-copy && rm "/tmp/ocr_image.png" # [hidden]
|
||||||
# Color picker
|
# Color picker
|
||||||
bindd = Super+Shift, C, Color picker, exec, hyprpicker -a # Pick color (Hex) >> clipboard
|
bindd = Super+Shift, C, Color picker, exec, hyprpicker -a # Pick color (Hex) >> clipboard
|
||||||
# Fullscreen screenshot
|
# Fullscreen screenshot
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ PanelWindow {
|
|||||||
snipProc.command = ["bash", "-c", `${cropInPlace} && xdg-open "${root.imageSearchEngineBaseUrl}$(${uploadAndGetUrl(root.screenshotPath)})" && ${cleanup}`]
|
snipProc.command = ["bash", "-c", `${cropInPlace} && xdg-open "${root.imageSearchEngineBaseUrl}$(${uploadAndGetUrl(root.screenshotPath)})" && ${cleanup}`]
|
||||||
break;
|
break;
|
||||||
case RegionSelection.SnipAction.CharRecognition:
|
case RegionSelection.SnipAction.CharRecognition:
|
||||||
snipProc.command = ["bash", "-c", `${cropInPlace} && tesseract '${StringUtils.shellSingleQuoteEscape(root.screenshotPath)}' - | wl-copy && ${cleanup}`]
|
snipProc.command = ["bash", "-c", `${cropInPlace} && tesseract '${StringUtils.shellSingleQuoteEscape(root.screenshotPath)}' stdout -l $(tesseract --list-langs | awk 'NR>1{print $1}' | tr '\\n' '+' | sed 's/\\+$/\\n/') | wl-copy && ${cleanup}`]
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.warn("[Region Selector] Unknown snip action, skipping snip.");
|
console.warn("[Region Selector] Unknown snip action, skipping snip.");
|
||||||
|
|||||||
Reference in New Issue
Block a user