Fix X11 screenshotting
This commit is contained in:
parent
9b9456a8ac
commit
78113baeaa
|
@ -24,10 +24,10 @@ screenshot_take() {
|
||||||
[ "$2" = "true" ] && [ "$x11" != "true" ] && POS="$(slurp)"
|
[ "$2" = "true" ] && [ "$x11" != "true" ] && POS="$(slurp)"
|
||||||
|
|
||||||
if [ "$x11" = "true" ] && [ -x "$(command -v maim)" ]; then
|
if [ "$x11" = "true" ] && [ -x "$(command -v maim)" ]; then
|
||||||
[ "$2" = "true" ] && sel_arg="-s"
|
[ "$2" = "true" ] && sel_arg=s
|
||||||
[ "$3" = "true" ] && [ "$2" != "true" ] && cursor_arg=u
|
[ "$3" = "true" ] && [ "$2" != "true" ] && cursor_arg=u
|
||||||
|
|
||||||
maim -"${sel_arg}""${cursor_arg}"B > "$1" || exit 1
|
maim -${sel_arg}${cursor_arg}B > "$1" || exit 1
|
||||||
elif [ -x "$(command -v slurp)" ] && [ -x "$(command -v grim)" ] && [ "$PREFER_WAYSHOT" != "true" ]; then
|
elif [ -x "$(command -v slurp)" ] && [ -x "$(command -v grim)" ] && [ "$PREFER_WAYSHOT" != "true" ]; then
|
||||||
if [ "$2" = "true" ]; then
|
if [ "$2" = "true" ]; then
|
||||||
grim -g "$POS" - > "$1" || exit 1
|
grim -g "$POS" - > "$1" || exit 1
|
||||||
|
|
Loading…
Reference in a new issue