This commit is contained in:
sudacode 2025-03-12 01:53:02 -07:00
parent 2b6b25783d
commit 6b4b3c8351
Signed by: sudacode
SSH Key Fingerprint: SHA256:lT5C2bB398DcX6daCF/gYFNSTK3y+Du3oTGUnYzfTEw
2 changed files with 21 additions and 10 deletions

View File

@ -1,5 +1,15 @@
#!/usr/bin/env bash
IMG="$1"
if [[ -f "$IMG" ]]; then
echo "Changing wallpaper to $IMG"
echo "$IMG" > "$HOME/.wallpaper"
hyprctl hyprpaper reload ,"$IMG"
notify-send -i hyprpaper -u normal "change-wallpaper.sh" "Wallpaper changed to ${IMG##*/variety/}"
exit 0
fi
WALLPAPER_DIR="$HOME/Pictures/variety/"
CURRENT_WALL=$(hyprctl hyprpaper listloaded)

21
ocr.sh
View File

@ -1,14 +1,15 @@
#!/bin/bash
set -Eeuo pipefail
RES="$(slurp | grim -g - - | gazou | sed -n '2p')"
# RES="$(slurp | grim -g - - | gazou | sed '1d;$d')"
# # Truncate RES for display if it's longer than 100 characters
# DISPLAY_RES="${RES:0:100}"
# if [ ${#RES} -gt 100 ]; then
# DISPLAY_RES="${DISPLAY_RES}..."
# fi
# notify-send "GAZOU" "Text: $DISPLAY_RES"
# echo "$RES" | wl-copy
# Truncate RES for display if it's longer than 100 characters
DISPLAY_RES="${RES:0:100}"
if [ ${#RES} -gt 100 ]; then
DISPLAY_RES="${DISPLAY_RES}..."
fi
notify-send "ocr.sh" "Text: $DISPLAY_RES"
echo "$RES" | wl-copy
slurp | grim -g - /tmp/ocr.png || exit 1
transformers_ocr recognize --image-path /tmp/ocr.png || exit 1
notify-send "tramsformers_ocr" "Text: $DISPLAY_RES"