Implement surface names
[staging/windowmanager.git] / scripts / wm-request
index 618da62..c98e748 100755 (executable)
@@ -1,5 +1,12 @@
 #!/bin/sh
 
+nopygments=0
+if [ "$1" = "-p" ]
+then
+   nopygments=1
+   shift
+fi
+
 if ! [ "$1" ]
 then
    echo "Usage: $0 VERB [ARGS]" >&2
@@ -15,7 +22,7 @@ set -eu
 
 if which python 2>/dev/null 1>&2 && echo '{ "test": "1" }' | python -m json.tool 2>/dev/null 1>&2
 then
-   if which pygmentize 2>/dev/null 1>&2
+   if [ $nopygments = 0 ] && which pygmentize 2>/dev/null 1>&2
    then
       json_pretty() {
          python -m json.tool | pygmentize -l json