From 23c7c53dc4121fc54d70951991448e8a3f196a56 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Fri, 26 Aug 2022 12:11:36 +0400 Subject: [PATCH] Add a from-screen OCR thing --- profiles/workspace/sway/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/profiles/workspace/sway/default.nix b/profiles/workspace/sway/default.nix index ddf2b03..079829e 100755 --- a/profiles/workspace/sway/default.nix +++ b/profiles/workspace/sway/default.nix @@ -190,6 +190,10 @@ in { script "screenshot-area-copy" '' ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.wl-clipboard}/bin/wl-copy''; + "--release ${modifier}+Insert" = + script "screenshot-ocr" + "${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.tesseract5}/bin/tesseract - - | ${pkgs.wl-clipboard}/bin/wl-copy"; + "${modifier}+x" = "focus output right"; "${modifier}+Shift+x" = "move workspace to output right"; "${modifier}+Shift+h" = "layout splith";