[gnome-shell/wip/carlosg/osk-updates: 16/49] tools: Add osk-preview.sh utility script




commit 361e78a938945776f3437a03969ee32b84f099cc
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Apr 13 15:57:52 2022 +0200

    tools: Add osk-preview.sh utility script
    
    This script launches a nested GNOME Shell with the osk-preview mode,
    loading the file specified through arguments.
    
    Optionally, --vertical/--horizontal can be passed to have the nested
    shell instance represent the specified layout with a common resolution.

 tools/osk-preview.sh | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
---
diff --git a/tools/osk-preview.sh b/tools/osk-preview.sh
new file mode 100755
index 0000000000..a453c714de
--- /dev/null
+++ b/tools/osk-preview.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if [ -z $1 ]; then
+  echo 'Usage: osk-preview.sh [--vertical|--horizontal] JSON_FILE'
+  exit
+fi
+
+if [[ $1 = '--vertical' ]]; then
+  export MUTTER_DEBUG_DUMMY_MODE_SPECS=768x1366
+  FILE=$2
+elif [[ $1 = '--horizontal' ]]; then
+  export MUTTER_DEBUG_DUMMY_MODE_SPECS=1366x768
+  FILE=$2
+else
+  FILE=$1
+fi
+
+GNOME_SHELL_TEST_OSK_FILE=`readlink -e $FILE`
+export GNOME_SHELL_TEST_OSK_FILE
+export NO_AT_BRIDGE=1
+
+dbus-run-session -- gnome-shell --wayland --nested --mode=osk-preview


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]