This commit is contained in:
2025-10-11 19:10:48 +05:00
commit d0401c8c07
27 changed files with 1240 additions and 0 deletions

44
home/desktop/grim.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/usr/bin/env bash
screen_name="$(date +%F--%H-%M-%S).png"
screen_path="/home/fox/Pictures"
screen_full="$screen_path$screen_name"
notify_name="Grim"
notify_title="Скриншот сохранён:"
notify_msg="[$screen_full]"
notify_btn="Открыть скриншот"
screen_notify() {
notify_action="$(notify-send -a "$notify_name" "$notify_title" "$notify_msg" -i "$screen_full" --action="open=$notify_btn")"
if [[ "$notify_action" == "open" ]]; then
imv "$screen_full"
fi
}
screen_full() {
grim $screen_full
screen_copy
screen_notify &
}
screen_active() {
grim -g "$(slurp)" $screen_full
screen_copy
screen_notify &
}
screen_area() {
grim -g "$(slurp)" $screen_full
screen_copy
screen_notify &
}
screen_copy() {
wl-copy "$screen_full"
}
case "$1" in
"-f") screen_full; exit ;;
"-a") screen_active; exit ;;
"-s") screen_area; exit ;;
esac