Created
July 18, 2020 08:52
-
-
Save MatejLach/e3a81c58193078fb9b005959ecff358f to your computer and use it in GitHub Desktop.
Scale Wayland applications on phosh via gsettings to fit the device screen
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 -e | |
export GSETTINGS_SCHEMA_DIR=_build/data/ | |
if [ -z "$1" ]; then | |
echo "Usage: $0 APP-ID VALUE" | |
exit 0 | |
fi | |
case "$2" in | |
on|1|ON|true) | |
val=true | |
;; | |
*) | |
val=false | |
;; | |
esac | |
APP_ID="$(echo $1 | sed 's/[^a-zA-Z0-9]/-/g' | tr '[:upper:]' '[:lower:]')" | |
gsettings set sm.puri.phoc.application:/sm/puri/phoc/application/"$APP_ID"/ scale-to-fit "${val}" | |
echo -n "Scale-to-fit for $1 is now " | |
G_MESSAGES_DEBUG= gsettings get sm.puri.phoc.application:/sm/puri/phoc/application/"$APP_ID"/ scale-to-fit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment