add screenshit script for mango
This commit is contained in:
parent
5d11d672f1
commit
2533dcdee6
4 changed files with 257 additions and 5 deletions
15
modules/home/screenshot
Normal file
15
modules/home/screenshot
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
case "${1:-fullscreen}" in
|
||||
region)
|
||||
g=$(slurp -d); [ -z "$g" ] && exit 1
|
||||
grim -g "$g" - | wl-copy ;;
|
||||
window)
|
||||
g=$(mmsg get focusing-client | jq -r '"\(.x),\(.y) \(.width)x\(.height)"')
|
||||
[ -z "$g" ] && exit 1
|
||||
grim -g "$g" - | wl-copy ;;
|
||||
output)
|
||||
grim -o "$(mmsg get cursorpos | jq -r .monitor)" - | wl-copy;;
|
||||
*) grim - | wl-copy;;
|
||||
esac
|
||||
Loading…
Reference in a new issue