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

34 lines
815 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)}')
2024-09-02 14:45:05 -06:00
if [ "$1" == "clipboard" ]; then
case $selected in
active)
grimshot --notify copy active;;
screen)
grimshot --notify copy screen;;
output)
grimshot --notify copy output;;
area)
grimshot --notify copy area;;
window)
grimshot --notify copy window;;
esac
else
case $selected in
active)
grimshot --notify save active;;
screen)
grimshot --notify save screen;;
output)
grimshot --notify save output;;
area)
grimshot --notify save area;;
window)
grimshot --notify save window;;
esac
fi