Last active
October 21, 2015 15:09
-
-
Save mrWinston/8a4a2afea77f6c9c67d8 to your computer and use it in GitHub Desktop.
opens a file in the atom-editor and raises the window #script #shell #dumbstuff
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
#!/bin/bash | |
# This program is free software. It comes without any warranty, to | |
# the extent permitted by applicable law. You can redistribute it | |
# and/or modify it under the terms of the Do What The Fuck You Want | |
# To Public License, Version 2, as published by Sam Hocevar. See | |
# http://www.wtfpl.net/ for more details. | |
# raise the window which has the string "Atom" in its title but is not chrome and switch to its workspace | |
wmctrl -ai $(wmctrl -l | grep Atom | grep -iv chrome | cut -b-10) | |
# open file specified in first parameter in atom | |
atom $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment