Skip to content

Instantly share code, notes, and snippets.

@SergKolo
Created April 24, 2016 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SergKolo/411d69b3a6ae9b0d2873d166e090b19f to your computer and use it in GitHub Desktop.
Save SergKolo/411d69b3a6ae9b0d2873d166e090b19f to your computer and use it in GitHub Desktop.
Get Unity's window stack
window_stack()
{
qdbus --literal com.canonical.Unity.WindowStack
/com/canonical/Unity/WindowStack \
com.canonical.Unity.WindowStack.GetWindowStack | \
awk -F '{' '{gsub(/\}|\]|,/,"");gsub(/\[/,"\n");print $2}' | \
awk '!/compiz/&&!/^$/ && $4!="\""$3"\"" { L[n++] = $0 }\
END { while(n--) print L[n] }'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment