3 if [ "$XDG_RUNTIME_DIR" = "" ]; then
4 export XDG_RUNTIME_DIR=/run
7 WINFO_RUN_DIR="$XDG_RUNTIME_DIR/pepper"
9 if [ ! -d "$WINFO_RUN_DIR" ]; then
10 echo "Error: no ${WINFO_RUN_DIR} directory exist."
18 echo "Usage> # winfo {command}"
20 echo " Supported commands:"
22 echo " protocol_trace_on (turn on wayland protocol trace)"
23 echo " protocol_trace_off (turn off wayland protocol trace)"
24 echo " stdout (redirect STDOUT to a file : /run/pepper/stdout.txt)"
25 echo " stderr (redirect STDERR to a file : /run/pepper/stderr.txt)"
26 echo " keygrab_status"
29 echo " connected_clients (display connected clients info : pid, uid, gid, socket fd)"
30 echo " reslist (display resources info of the connected clients"
31 echo " help (display this help message)"
33 echo " To execute commands, just create/remove/update a file with the commands above."
34 echo " Please refer to the following examples."
36 echo " # winfo protocol_trace_on : enable event trace"
37 echo " # winfo protocol_trace_off : disable event trace"
38 echo " # winfo stdout : redirect STDOUT"
39 echo " # winfo stderr : redirect STDERR"
40 echo " # winfo keygrab_status : display keygrab status"
41 echo " # winfo keymap : display keymap"
42 echo " # winfo topvwins : display top/visible window stack"
43 echo " # winfo connected_clients : display connected clients information"
44 echo " # winfo reslist : display each resources information of connected clients"
45 echo " # winfo help : display this help message"
49 if [ "$1" = "" ]; then
56 rm -f ${CMD} ; touch ${CMD}