update
This commit is contained in:
parent
2b6b25783d
commit
6b4b3c8351
@ -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
21
ocr.sh
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user