2024-12-17 14:40:05 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2025-01-06 16:00:23 -07:00
|
|
|
entries="Screen Window Area Area+Edit"
|
2024-12-17 14:40:05 -07:00
|
|
|
|
|
|
|
selected=$(printf '%s\n' "$entries" | tr ' ' '\n' | wofi --style="$HOME"/.config/wofi/macc_style.css --conf="$HOME"/.config/wofi/config.screenshot | awk '{print tolower($1)}')
|
|
|
|
|
|
|
|
if [ "$1" == "clipboard" ]; then
|
|
|
|
case $selected in
|
|
|
|
screen)
|
|
|
|
hyprshot --notif-timeout 2000 -m output --clipboard-only;;
|
|
|
|
window)
|
|
|
|
hyprshot --notif-timeout 2000 -m window --clipboard-only;;
|
|
|
|
area)
|
|
|
|
hyprshot --notif-timeout 2000 -m region --clipboard-only;;
|
2025-01-06 16:00:23 -07:00
|
|
|
area+edit)
|
|
|
|
hyprshot --notif-timeout 2000 -m region --clipboard-only
|
|
|
|
sleep 0.1
|
|
|
|
flatpak run com.github.maoschanz.drawing -c
|
|
|
|
;;
|
2024-12-17 14:40:05 -07:00
|
|
|
esac
|
|
|
|
else
|
|
|
|
case $selected in
|
|
|
|
screen)
|
2025-01-06 16:00:23 -07:00
|
|
|
hyprshot --notif-timeout 2000 -m output -o ~/Pictures/;;
|
2024-12-17 14:40:05 -07:00
|
|
|
window)
|
2025-01-06 16:00:23 -07:00
|
|
|
hyprshot --notif-timeout 2000 -m window -o ~/Pictures/;;
|
2024-12-17 14:40:05 -07:00
|
|
|
area)
|
2025-01-06 16:00:23 -07:00
|
|
|
hyprshot --notif-timeout 2000 -m region -o ~/Pictures/;;
|
|
|
|
area+edit)
|
|
|
|
hyprshot --notif-timeout 2000 -m region --clipboard-only
|
|
|
|
sleep 0.1
|
|
|
|
flatpak run com.github.maoschanz.drawing -c
|
|
|
|
;;
|
2024-12-17 14:40:05 -07:00
|
|
|
esac
|
|
|
|
fi
|