add screen snapshot
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
88ba4641cc
commit
9caf05fe1c
|
@ -49,6 +49,7 @@
|
||||||
13, KEYBOARD, KEY_Y, KEY_Y, Y
|
13, KEYBOARD, KEY_Y, KEY_Y, Y
|
||||||
11, KEYBOARD, KEY_X, KEY_X, X
|
11, KEYBOARD, KEY_X, KEY_X, X
|
||||||
|
|
||||||
|
7+6, SHELL_COMMAND, snap, Fn+Start, Snapshot
|
||||||
7+12, SHELL_COMMAND, quick_action_volume_up, Fn+Y, Volume++
|
7+12, SHELL_COMMAND, quick_action_volume_up, Fn+Y, Volume++
|
||||||
7+13, SHELL_COMMAND, quick_action_volume_down, Fn+A, Volume--
|
7+13, SHELL_COMMAND, quick_action_volume_down, Fn+A, Volume--
|
||||||
7+11, SHELL_COMMAND, quick_action_bright_up, Fn+B, Brightness++
|
7+11, SHELL_COMMAND, quick_action_bright_up, Fn+B, Brightness++
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
SNAPSHOT_DIR=/mnt/funkey/snapshots
|
||||||
|
# Check args
|
||||||
|
if [ ${#} -ne 0 ]; then
|
||||||
|
echo "Usage: $(basename ${0})"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
mkdir -p "${SNAPSHOT_DIR}"
|
||||||
|
last=$(cd ${SNAPSHOT_DIR}; ls IMG_*.PNG 2> /dev/null | tail -1 | sed 's/^IMG_\([0-9]\+\)\.PNG$/\1/')
|
||||||
|
if [ "x${last}" = "x" ]; then
|
||||||
|
last=1
|
||||||
|
else
|
||||||
|
let last++
|
||||||
|
fi
|
||||||
|
snapshot_file=$(printf "IMG_%04d.PNG" $last)
|
||||||
|
fbgrab "${SNAPSHOT_DIR}/${snapshot_file}"
|
||||||
|
notif_disp 1 " CAPTURE TO ${snapshot_file}"
|
||||||
|
exit 0
|
|
@ -49,6 +49,7 @@
|
||||||
13, KEYBOARD, KEY_Y, KEY_Y, Y
|
13, KEYBOARD, KEY_Y, KEY_Y, Y
|
||||||
11, KEYBOARD, KEY_X, KEY_X, X
|
11, KEYBOARD, KEY_X, KEY_X, X
|
||||||
|
|
||||||
|
7+6, SHELL_COMMAND, snap, Fn+Start, Snapshot
|
||||||
7+12, SHELL_COMMAND, quick_action_volume_up, Fn+Y, Volume++
|
7+12, SHELL_COMMAND, quick_action_volume_up, Fn+Y, Volume++
|
||||||
7+13, SHELL_COMMAND, quick_action_volume_down, Fn+A, Volume--
|
7+13, SHELL_COMMAND, quick_action_volume_down, Fn+A, Volume--
|
||||||
7+11, SHELL_COMMAND, quick_action_bright_up, Fn+B, Brightness++
|
7+11, SHELL_COMMAND, quick_action_bright_up, Fn+B, Brightness++
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SNAPSHOT_DIR=/mnt/funkey/snapshots
|
||||||
|
|
||||||
|
# Check args
|
||||||
|
if [ ${#} -ne 0 ]; then
|
||||||
|
echo "Usage: $(basename ${0})"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "${SNAPSHOT_DIR}"
|
||||||
|
last=$(cd ${SNAPSHOT_DIR}; ls IMG_*.PNG 2> /dev/null | tail -1 | sed 's/^IMG_\([0-9]\+\)\.PNG$/\1/')
|
||||||
|
if [ "x${last}" = "x" ]; then
|
||||||
|
last=1
|
||||||
|
else
|
||||||
|
let last++
|
||||||
|
fi
|
||||||
|
snapshot_file=$(printf "IMG_%04d.PNG" $last)
|
||||||
|
fbgrab "${SNAPSHOT_DIR}/${snapshot_file}"
|
||||||
|
notif_disp 1 " CAPTURE TO ${snapshot_file}"
|
||||||
|
exit 0
|
Loading…
Reference in New Issue