Skip to content

Instantly share code, notes, and snippets.

@mikeshardmind
Created June 5, 2017 19:33
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 mikeshardmind/1ae295a58d5f8768b1fa8758aeff0823 to your computer and use it in GitHub Desktop.
Save mikeshardmind/1ae295a58d5f8768b1fa8758aeff0823 to your computer and use it in GitHub Desktop.
#!/bin/bash
#Dofus Window Switcher
#Usage: With no parameters, attempts to switch to a flashing dofus window.
#With a parameter, switch to the window with that title
if [ -z $1 ] ; then
for id in `xdotool search --class "Dofus"`; do
xprop -id $id | grep "The urgency hint bit is set" > /dev/null 2>&1
if [ "$?" = "0" ]; then
wmctrl -i -a $id
exit 0
fi
done
fi
if [ ! -z $1 ] ; then
xdotool search --name $1 windowactivate
exit 0
fi
exit 1
@EmmanuelBMS
Copy link

Where do i need to set the keybind? How can i run this code ? any help ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment