nixos/nate/dotfiles/sway/scripts/screenshot.sh

19 lines
477 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2023-12-14 17:23:01 -07:00
entries="Active Screen Output Area Window"
selected=$(printf '%s\n' $entries | wofi --style=$HOME/.config/wofi/style.widgets.css --conf=$HOME/.config/wofi/config.screenshot | awk '{print tolower($1)}')
case $selected in
active)
2024-01-20 13:34:45 -07:00
grimshot --notify save active;;
2023-12-14 17:23:01 -07:00
screen)
2024-01-20 13:34:45 -07:00
grimshot --notify save screen;;
2023-12-14 17:23:01 -07:00
output)
2024-01-20 13:34:45 -07:00
grimshot --notify save output;;
2023-12-14 17:23:01 -07:00
area)
2024-01-20 13:34:45 -07:00
grimshot --notify save area;;
2023-12-14 17:23:01 -07:00
window)
2024-01-20 13:34:45 -07:00
grimshot --notify save window;;
2023-12-14 17:23:01 -07:00
esac