Skip to content

Instantly share code, notes, and snippets.

@SergKolo
Created April 28, 2016 22:07
Show Gist options
  • Save SergKolo/a0f939fe719d092b7ac5c8c4f1150b3d to your computer and use it in GitHub Desktop.
Save SergKolo/a0f939fe719d092b7ac5c8c4f1150b3d to your computer and use it in GitHub Desktop.
DIR:/xieerqi|16:06|skolodya@ubuntu:
$ cat monitor_stack.sh
get_monitor_stack()
{
qdbus org.ayatana.bamf \
/org/ayatana/bamf/matcher \
org.ayatana.bamf.matcher.WindowStackForMonitor $1
}
for window in $( get_monitor_stack $1 )
do
printf "%s\t%s\n" "$window" \
"$(qdbus org.ayatana.bamf $window \
org.ayatana.bamf.view.Name)"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment