From f40eb6cf6e29a805f4a77196849054bbb9f66a93 Mon Sep 17 00:00:00 2001 From: furo Date: Wed, 9 Aug 2023 17:59:18 +0200 Subject: [PATCH] Add screenshot script --- scripts/screenshot.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/screenshot.sh diff --git a/scripts/screenshot.sh b/scripts/screenshot.sh new file mode 100755 index 0000000..0042b5c --- /dev/null +++ b/scripts/screenshot.sh @@ -0,0 +1,13 @@ +cd ~/Development/ddguesser +mkdir screenshots +ID=$(uuidgen) +MAP=$(dmenu < /dev/null) +if [ -z "$MAP" ]; then + exit 1 +fi + +ENTITIES=$(echo -e "false\ntrue" | dmenu) +mkdir screenshots +flameshot screen -p "./screenshots/$ID.png" + +echo "INSERT INTO locations (id, map, has_entities) VALUES (\'$ID\', \'$MAP\', $ENTITIES);" >> inserts.psql \ No newline at end of file