From 488494a631d98d348ce75bd891bb9758f1fb0ff9 Mon Sep 17 00:00:00 2001 From: joy Date: Thu, 21 Nov 2024 15:52:23 +0100 Subject: [PATCH] text scanner --- modules/wm/home/default.nix | 1 - modules/wm/home/screen/default.nix | 12 ------------ modules/wm/hyprland/default.nix | 4 +++- modules/wm/hyprland/scripts/screen.sh | 4 ---- 4 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 modules/wm/home/screen/default.nix delete mode 100755 modules/wm/hyprland/scripts/screen.sh diff --git a/modules/wm/home/default.nix b/modules/wm/home/default.nix index e2baee3..c9811cc 100644 --- a/modules/wm/home/default.nix +++ b/modules/wm/home/default.nix @@ -3,7 +3,6 @@ ./foot ./ags ./mpv - ./screen ./firefox ./clip ./rofi diff --git a/modules/wm/home/screen/default.nix b/modules/wm/home/screen/default.nix deleted file mode 100644 index 9868e0f..0000000 --- a/modules/wm/home/screen/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{pkgs, ...}: { - home.file.".config/swappy/config".text = '' - [Default] - save_dir=$HOME/media/pics/screen - ''; - - home.packages = with pkgs; [ - grim - slurp - swappy - ]; -} diff --git a/modules/wm/hyprland/default.nix b/modules/wm/hyprland/default.nix index bfafe6f..648199b 100644 --- a/modules/wm/hyprland/default.nix +++ b/modules/wm/hyprland/default.nix @@ -1,6 +1,7 @@ { username, nixpath, + pkgs, ... }: { programs.hyprland = { @@ -83,7 +84,8 @@ "$mod, F, exec, freetube" "$mod, C, exec, hyprpicker -a" "$mod+Shift, Z, exec, grim - | swappy -f -" - "$mod, Z, exec, sh $sciPath/screen.sh" + ''$mod,T, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.tesseract}/bin/tesseract - stdout -l deu --psm 6 | wl-copy'' + ''$mod,Z, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f -'' "$mod, V, exec, cliphist list | rofi show -dmenu | cliphist decode | wl-copy" "$mod, O, exec, sh $sciPath/mpv.sh" "$mod, B, exec, rofimoji" diff --git a/modules/wm/hyprland/scripts/screen.sh b/modules/wm/hyprland/scripts/screen.sh deleted file mode 100755 index d705daf..0000000 --- a/modules/wm/hyprland/scripts/screen.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -grim -g "$(slurp)" - | swappy -f - -