Class: HackyHAL::DeviceControllers::OsxComputer
- Inherits:
-
GenericSsh
- Object
- Base
- GenericSsh
- HackyHAL::DeviceControllers::OsxComputer
- Defined in:
- lib/hacky_hal/device_controllers/osx_computer.rb
Constant Summary
Constants inherited from GenericSsh
GenericSsh::MAX_COMMAND_RETRIES
Instance Attribute Summary
Attributes inherited from GenericSsh
Attributes included from Options
Instance Method Summary collapse
-
#mirror_screens ⇒ Object
The #mirror_screens and #unmirror_screens methods require the ‘displays’ command line tool to be installed.
-
#set_audio_output_device(name) ⇒ Object
The #set_audio_output_device method requires the audiodevice command from “Who’s hacks?”.
- #sleep_display ⇒ Object
- #unmirror_screens ⇒ Object
-
#wake_display ⇒ Object
The #wake_display and #sleep_display methods require the sleep-wake-display command.
Methods inherited from GenericSsh
#connect, #connected?, #disconnect, #exec, #initialize
Methods inherited from Base
Methods included from Options
Constructor Details
This class inherits a constructor from HackyHAL::DeviceControllers::GenericSsh
Instance Method Details
#mirror_screens ⇒ Object
The #mirror_screens and #unmirror_screens methods require the ‘displays’ command line tool to be installed. You can find it here: github.com/bwesterb/displays/
23 24 25 |
# File 'lib/hacky_hal/device_controllers/osx_computer.rb', line 23 def mirror_screens exec("displays mirror") end |
#set_audio_output_device(name) ⇒ Object
The #set_audio_output_device method requires the audiodevice command from “Who’s hacks?”. You can find it here: whoshacks.blogspot.com/2009/01/change-audio-devices-via-shell-script.html
35 36 37 |
# File 'lib/hacky_hal/device_controllers/osx_computer.rb', line 35 def set_audio_output_device(name) exec("audiodevice output '#{name}'") end |
#sleep_display ⇒ Object
15 16 17 |
# File 'lib/hacky_hal/device_controllers/osx_computer.rb', line 15 def sleep_display exec("sleep-wake-display sleep") end |
#unmirror_screens ⇒ Object
27 28 29 |
# File 'lib/hacky_hal/device_controllers/osx_computer.rb', line 27 def unmirror_screens exec("displays unmirror") end |
#wake_display ⇒ Object
The #wake_display and #sleep_display methods require the sleep-wake-display command. You can find it here: github.com/byteclub/os-x-sleep-wake-display
11 12 13 |
# File 'lib/hacky_hal/device_controllers/osx_computer.rb', line 11 def wake_display exec("sleep-wake-display wake") end |