Trying to execute:
xprop -id `xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | awk '{print $5}'` | grep "WM_CLASS(STRING)" | sed -e 's/.*= "\([^"]*\)".*/\1/'
xprop -id `xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | awk '{print $5}'` | grep "WM_CLASS(STRING)" | sed -e 's/.*= "\([^"]*\)".*/\1/'
To copy to clipboard, switch view to plain text mode
with the code:
sh.
setProcessChannelMode(QProcess::MergedChannels);
sh.start("xprop -id `xprop -root | grep \"_NET_ACTIVE_WINDOW(WINDOW)\" | awk \'{print $5}\'` | "
"grep \"WM_CLASS(STRING)\" | sed -e \'s/.*= \"\\([^\"]*\\)\".*/\\1/\'");
...
QProcess sh;
sh.setProcessChannelMode(QProcess::MergedChannels);
sh.start("xprop -id `xprop -root | grep \"_NET_ACTIVE_WINDOW(WINDOW)\" | awk \'{print $5}\'` | "
"grep \"WM_CLASS(STRING)\" | sed -e \'s/.*= \"\\([^\"]*\\)\".*/\\1/\'");
...
To copy to clipboard, switch view to plain text mode
but what i get is:
xprop: error: Invalid window id format: `xprop.
xprop: error: Invalid window id format: `xprop.
To copy to clipboard, switch view to plain text mode
What did i forget to do? 
Thanks.
Bookmarks