Module: Barabara
- Defined in:
- lib/barabara/modules/battery.rb,
lib/barabara.rb,
lib/barabara/app.rb,
lib/barabara/config.rb,
lib/barabara/version.rb,
lib/barabara/modules/wm.rb,
lib/barabara/modules/wttr.rb,
lib/barabara/modules/clock.rb,
lib/barabara/modules/wname.rb,
lib/barabara/modules/volume.rb,
lib/barabara/modules/weather.rb,
lib/barabara/modules/lemonbar.rb,
lib/barabara/modules/event_processor.rb
Overview
This module provides battery status functionality. At the moment it just reads a status file from kernel’s sysfs, so it only supports Linux.
TODO Add Upower support and make it possible to select the preferred mode from config.
Defined Under Namespace
Modules: Modules Classes: App, Configuration, GlobalConfig
Constant Summary collapse
- DEFAULT_CONF =
'~/.config/barabara.conf.yml'- VERSION =
'0.0.4'.freeze
Class Method Summary collapse
Class Method Details
.run_app ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/barabara.rb', line 14 def self.run_app require 'optimist' opts = Optimist:: do opt :config, "Path to config file", type: :string, default: DEFAULT_CONF end config_path = check_config(opts[:config]) @app = App.new(config_path) @app.run end |