17 lines
359 B
Bash
Executable file
17 lines
359 B
Bash
Executable file
#!/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
|