nixos/nate-work/dotfiles/hypr/scripts/screenshot.sh

26 lines
751 B
Bash
Raw Permalink Normal View History

2024-12-17 14:40:05 -07:00
#!/usr/bin/env bash
entries="Screen Window Area"
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;;
esac
else
case $selected in
screen)
hyprshot --notif-timeout 2000 -m output -o ~/;;
window)
hyprshot --notif-timeout 2000 -m window -o ~/;;
area)
hyprshot --notif-timeout 2000 -m region -o ~/;;
esac
fi