Skip to content

Instantly share code, notes, and snippets.

@gpoole
Last active May 26, 2017 03:08
Show Gist options
  • Save gpoole/49a02ae5c06f8c142057eb66da104df0 to your computer and use it in GitHub Desktop.
Save gpoole/49a02ae5c06f8c142057eb66da104df0 to your computer and use it in GitHub Desktop.
Opens Atom from the terminal on the current OSX space/desktop (kwm/khd powered)
#!/bin/bash
# Note where we are
SPACE_ID=`kwmc query space active id`
# Open atom and wait a moment
atom .
sleep 1
# Bring Atom and us back to where we were
kwmc window -m space $SPACE_ID
kwmc space -fExperimental $SPACE_ID
# Wait for everything to get settled
sleep 1
# Restores my saved 80/20 atom/terminal layout
kwmc tree restore atom-terminal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment