Module: OmaGem::DSL::Toggle
- Included in:
- Config
- Defined in:
- lib/omagem/dsl/toggle.rb
Overview
Toggle Omarchy features on/off: nightlight, touchpad, Bluetooth, etc.
Instance Method Summary collapse
- #bar_visible(state = :toggle) ⇒ Object
- #idle(state = :toggle) ⇒ Object
- #nightlight(state = :toggle) ⇒ Object
- #notification_silencing ⇒ Object
-
#toggle(name, state = :toggle) ⇒ Object
Toggle a named feature: toggle("nightlight") or toggle("nightlight", :on | :off | :toggle).
- #touchpad(state = :toggle) ⇒ Object
- #touchscreen(state = :toggle) ⇒ Object
Instance Method Details
#bar_visible(state = :toggle) ⇒ Object
29 30 31 |
# File 'lib/omagem/dsl/toggle.rb', line 29 def (state = :toggle) run('toggle', 'bar', state.to_s) end |
#idle(state = :toggle) ⇒ Object
25 26 27 |
# File 'lib/omagem/dsl/toggle.rb', line 25 def idle(state = :toggle) run('toggle', 'idle', state.to_s) end |
#nightlight(state = :toggle) ⇒ Object
13 14 15 |
# File 'lib/omagem/dsl/toggle.rb', line 13 def nightlight(state = :toggle) run('toggle', 'nightlight', state.to_s) end |
#notification_silencing ⇒ Object
33 34 35 |
# File 'lib/omagem/dsl/toggle.rb', line 33 def notification_silencing run('toggle', 'notification silencing') end |
#toggle(name, state = :toggle) ⇒ Object
Toggle a named feature: toggle("nightlight") or toggle("nightlight", :on | :off | :toggle).
9 10 11 |
# File 'lib/omagem/dsl/toggle.rb', line 9 def toggle(name, state = :toggle) run('toggle', name, state.to_s) end |
#touchpad(state = :toggle) ⇒ Object
17 18 19 |
# File 'lib/omagem/dsl/toggle.rb', line 17 def touchpad(state = :toggle) run('toggle', 'touchpad', state.to_s) end |
#touchscreen(state = :toggle) ⇒ Object
21 22 23 |
# File 'lib/omagem/dsl/toggle.rb', line 21 def touchscreen(state = :toggle) run('toggle', 'touchscreen', state.to_s) end |