Created
November 27, 2020 12:42
-
-
Save schoentoon/3a40cdf236456ccd9483015ca0ef5336 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
# This script will allow you to easily use https://runeapps.org/clue on Linux. Ideally you would use | |
# the alt1 toolkit directly, but it's very much windows only and no support for anything else seems planned. | |
# the actual apps however are plain webapps, the only thing the 'toolkit' is really doing is recording the screen | |
# and passing it directly to those webapps. This script will partly do the same by taking a screenshot upon execution | |
# and passing it to the clue webapp | |
# | |
# This very much depends on xdotool | |
# We use xfce4-screenshooter to take screenshots, mostly because that's just what I have installed | |
# as my DE and it seemed to work right away. It should be fairly straight forward to replace this | |
# with whatever screenshot tool your DE uses. Just make sure to screenshot the current window and | |
# to copy it to the clipboard rather than saving it as a file or whatever. | |
# second of all, google-chrome is hardcoded. This is for 2 reasons, runeapps doesn't seem to support | |
# firefox, could be one of my extensions, could be the assumption that it runs in chromium/electron/whatever | |
# and second of all, as this will just open a new tab every single time I didn't feel like poluting my | |
# firefox tab session and possibly get annoyed with it opening in the wrong window once in a while | |
# that just using google-chrome purely for this seemed like an easier solution | |
# feel free to swap it out for any other browser, although with non chromium based browsers results may vary | |
# this tool might however fail if google-chrome was not yet previously running | |
# and it might once in a while fail at pasting your screenshot into the browser, this could happen due to | |
# the new tab not being fully loaded yet by the time we 'press' ctrl+v. Ideally I would just somehow wait | |
# for the page to load, but I didn't feel like figuring this out and a 1 second sleep just seemed to work. | |
# feel free to adjust this to your needs I guess. | |
RS=$(xdotool search -class RuneScape) | |
xfce4-screenshooter -c -w | |
google-chrome https://runeapps.org/apps/clue/ | |
CHROME=$(xdotool getwindowfocus) | |
sleep 1 | |
xdotool windowfocus $CHROME | |
xdotool key ctrl+v | |
xdotool windowfocus $RS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment