Skip to content

Instantly share code, notes, and snippets.

@bugventure
Last active May 2, 2017 05:42
Show Gist options
  • Save bugventure/680879fec6d992d0e0a59425f749d0e7 to your computer and use it in GitHub Desktop.
Save bugventure/680879fec6d992d0e0a59425f749d0e7 to your computer and use it in GitHub Desktop.
if
ps aux | grep "[c]hrome" > /dev/null
then
xdotool windowactivate `xdotool search --onlyvisible --class google-chrome`
else
google-chrome &
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment