bin/screenshot: add
This commit is contained in:
parent
b28f2da899
commit
583cc6680d
1 changed files with 17 additions and 0 deletions
17
bin/screenshot
Executable file
17
bin/screenshot
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get the type from arg
|
||||||
|
type=$1
|
||||||
|
|
||||||
|
# Perform action based on type
|
||||||
|
case "$type" in
|
||||||
|
"interactive") # Take interactive screenshot
|
||||||
|
grim -g "$(slurp -d)" - | wl-copy -t image/jpeg
|
||||||
|
;;
|
||||||
|
"plain") # Take plain screenshot
|
||||||
|
grim - | wl-copy -t image/jpeg
|
||||||
|
;;
|
||||||
|
*) # Handle invalid type
|
||||||
|
echo "Invalid type, use screenshot <interactive|plain>."
|
||||||
|
;;
|
||||||
|
esac
|
Loading…
Add table
Add a link
Reference in a new issue