How to assign multiple apps to single focus command shortcut in Slate? I would like to use a single keyboard shortcut to focus on multiple applications in Slate. For example, I want to map Command+1 to Chrome and Firefox. Each time I press Cmd+1 the focused application should rotate. Is this possible? If so, how can I do this?

bind 1:cmd focus 'Chrome'
bind 1:cmd focus 'Firefox'
For example save this script as ~/bin/chromeorfirefox and make it executable:

#!/bin/bash
if [[ $(lsappinfo visibleprocesslist|cut -d\" -f2) = Google\ Chrome ]]; then
  open -a Firefox
else
  open -a Google\ Chrome
fi


Then add

1:cmd shell '~/bin/chromeorfirefox'


to ~/.slate.

lsappinfo was added in 10.9. You can use a script like this in 10.8 and earlier:

#!/usr/bin/osascript
if (path to frontmost application) is (path to application "Google Chrome") then
    "Firefox"
else
    "Google Chrome"
end if
tell application result
    reopen
    activate
end tell