Created
April 24, 2016 03:41
-
-
Save SergKolo/411d69b3a6ae9b0d2873d166e090b19f to your computer and use it in GitHub Desktop.
Get Unity's window stack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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