Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kopiro/a61255dc320cdfc9efb61d26b0f65ed3 to your computer and use it in GitHub Desktop.
Save kopiro/a61255dc320cdfc9efb61d26b0f65ed3 to your computer and use it in GitHub Desktop.
WebOS Custom screensaver
#!/bin/sh
set -e -o pipefail
MOUNT_TARGET="/usr/palm/applications/com.webos.app.screensaver/qml/main.qml"
QML_PATH="$(dirname "$(realpath "$0")")/screensaver-main.qml"
if [[ ! -f "$MOUNT_TARGET" ]]; then
echo "[-] Target file does not exist: $MOUNT_TARGET" >&2
exit 1
fi
# umount "$MOUNT_TARGET"
if ! findmnt "$MOUNT_TARGET"; then
mount --bind "$QML_PATH" "$MOUNT_TARGET"
echo "[+] Enabled succesfully" >&2
else
echo "[~] Enabled already" >&2
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment