Skip to content

Instantly share code, notes, and snippets.

@ondras
Last active April 19, 2016 19:56
Show Gist options
  • Save ondras/0f32cdcc5207e6341c6990c24f14ef09 to your computer and use it in GitHub Desktop.
Save ondras/0f32cdcc5207e6341c6990c24f14ef09 to your computer and use it in GitHub Desktop.
Here, I fixed your Atom editor for you
#!/bin/sh
# So here is the deal: the Atom editor might not get focused when
# activated from other app (terminal, file manager, ...). This behavior
# can be observed with all Chrome-based apps and several window managers.
# This tiny script fixes said behavior by sending an explicit "focus"
# request to the window manager. You will need the "wmctrl" package.
atom "$*"
wmctrl -x -a atom.Atom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment