Update .local/bin/screenshot.sh

This commit is contained in:
2025-09-25 13:25:37 +02:00
parent 9e8de68dcf
commit b9ac3cb221

View File

@@ -9,9 +9,6 @@ target_path="$HOME/Obrazy/zrzuty/$fname"
error_wrong_type="The first argument needs to be \"fullscreen\", \"window\" or \"region\". Exiting..." error_wrong_type="The first argument needs to be \"fullscreen\", \"window\" or \"region\". Exiting..."
notification_succes="$target_path saved and copied" notification_succes="$target_path saved and copied"
notification() {
notify-send -i "$target_path" -u low -a "Screenshot" "Screenshot saved" "$notification_succes"
}
# validate input # validate input
case "$1" in case "$1" in
@@ -24,6 +21,10 @@ case "$1" in
;; ;;
esac esac
notification() {
notify-send -i "$target_path" -u low -a "Screenshot" "Screenshot $type" "$notification_succes"
}
case $type in case $type in
"fullscreen") "fullscreen")
grim -o $(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name') "$target_path" grim -o $(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name') "$target_path"