16 lines
312 B
Bash
Executable file
16 lines
312 B
Bash
Executable file
#!/bin/bash
|
|
|
|
BASEPATH="$HOME/Images/screenshots"
|
|
cName="$BASEPATH/$(date +%F_%H-%M-%S).png"
|
|
|
|
case "$1" in
|
|
'root')
|
|
import -window root "$cName"
|
|
;;
|
|
'active')
|
|
import -window $(xdotool getwindowfocus -f) -frame "$cName"
|
|
;;
|
|
*)
|
|
>&2 echo -e "Error: bad action type. Usage:\n$0 [root|active]"
|
|
exit 1
|
|
esac
|