Implement surface names
[staging/windowmanager.git] / scripts / wm-request
old mode 100644 (file)
new mode 100755 (executable)
index 55df3e4..c98e748
@@ -1,4 +1,11 @@
-#/bin/sh
+#!/bin/sh
+
+nopygments=0
+if [ "$1" = "-p" ]
+then
+   nopygments=1
+   shift
+fi
 
 if ! [ "$1" ]
 then
@@ -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