Update screenshot script
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
c98e4412af
commit
61510dd009
1 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,8 @@ PROMPT="Screenshot"
|
||||||
ACTIONS=(
|
ACTIONS=(
|
||||||
"1: Fullscreen"
|
"1: Fullscreen"
|
||||||
"2: Selection"
|
"2: Selection"
|
||||||
|
"3: Window"
|
||||||
|
"4: Delayed"
|
||||||
)
|
)
|
||||||
|
|
||||||
FILENAME="$(xdg-user-dir PICTURES)/screenshots/$(date +"%Y-%m-%dT%H%M%S").png"
|
FILENAME="$(xdg-user-dir PICTURES)/screenshots/$(date +"%Y-%m-%dT%H%M%S").png"
|
||||||
|
@ -19,4 +21,10 @@ case "${SELECTION}" in
|
||||||
"2")
|
"2")
|
||||||
grim -g "$(slurp)" - | tee "${FILENAME}" | wl-copy
|
grim -g "$(slurp)" - | tee "${FILENAME}" | wl-copy
|
||||||
;;
|
;;
|
||||||
|
"3")
|
||||||
|
grim -g "$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp)" - | tee "${FILENAME}" | wl-copy
|
||||||
|
;;
|
||||||
|
"4")
|
||||||
|
sleep 3 && grim - | tee "${FILENAME}" | wl-copy
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue