Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 36 lines (32 sloc) 0.811 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
active_corner_value_to_int = {
  desktop: 4,
  dashboard: 7,
  mission_control: 2,
  application_windows: 3,
  launchpad: 11,
  start_screen_saver: 5,
  disable_screen_saver: 6,
  put_display_to_sleep: 10,
  noop: 0
}

corners = {
  :tl => :all_windows,
  :tr => :dashboard,
  :br => :noop,
  :bl => :noop
}

corners.each do |corner, value|
  pivotal_workstation_defaults "Active Corner: #{corner} right #{value}" do
    domain 'com.apple.dock'
    key "wvous-#{corner}-corner"
    integer active_corner_value_to_int[value]
  end

  pivotal_workstation_defaults "Active Corner: #{corner} modifier" do
    domain 'com.apple.dock'
    key "wvous-#{corner}-modifier"
    integer 0
  end
end

execute "relaunch dock" do
  command "killall Dock"
end
Something went wrong with that request. Please try again.