Last Updated: May 15, 2019
·
1.007K
· godfoca

Setting keyboard shortcuts from inside boxen

With boxen you can automate EVERYTHING. This, combined with the fact that in OS X you can customize keyboard shortcuts in a very consistent and simple manner for most actions in any application, means you can have boxen manage your keyboard shortcuts. This is what I do in my personal manifest (i.e. modules/people/manifests/foca.pp):

osx::shortcut {
  "Full Screen in iTerm":
    app  => "com.googlecode.iterm2",
    key  => "cmd-shift-f",
    menu => "Toggle Full Screen";
  "No quitting iTerm":
    app  => "com.googlecode.iterm2",
    key  => nil,
    menu => "Quit iTerm";
}

In order to enable this simple syntax, I wrote a very simple boxen module for this. Check out the code in this gist: https://gist.github.com/foca/6457114