Class: Uh::WM::Env
- Inherits:
-
Baf::Env
- Object
- Baf::Env
- Uh::WM::Env
- Extended by:
- Forwardable
- Defined in:
- lib/uh/wm/env.rb
Constant Summary collapse
- RC_PATH =
'~/.uhwmrc.rb'.freeze
- MODIFIER =
:mod1
- KEYBINDS =
{ [:q, :shift] => proc { quit } }.freeze
- WORKER =
:block
- LOGGER_LEVEL =
Logger::WARN
- LOGGER_LEVEL_VERBOSE =
Logger::INFO
- LOGGER_LEVEL_DEBUG =
Logger::DEBUG
- LOGGER_LEVEL_STRINGS =
%w[DEBUG INFO WARN ERROR FATAL UNKNOWN].freeze
Instance Attribute Summary collapse
-
#keybinds ⇒ Object
readonly
Returns the value of attribute keybinds.
-
#launch ⇒ Object
Returns the value of attribute launch.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#layout_class ⇒ Object
Returns the value of attribute layout_class.
-
#layout_options ⇒ Object
Returns the value of attribute layout_options.
-
#modifier ⇒ Object
Returns the value of attribute modifier.
-
#modifier_ignore ⇒ Object
Returns the value of attribute modifier_ignore.
-
#rc_path ⇒ Object
Returns the value of attribute rc_path.
-
#rules ⇒ Object
Returns the value of attribute rules.
-
#worker ⇒ Object
Returns the value of attribute worker.
Instance Method Summary collapse
-
#initialize(**_) ⇒ Env
constructor
A new instance of Env.
- #log_logger_level ⇒ Object
- #logger ⇒ Object
Constructor Details
Instance Attribute Details
#keybinds ⇒ Object (readonly)
Returns the value of attribute keybinds.
23 24 25 |
# File 'lib/uh/wm/env.rb', line 23 def keybinds @keybinds end |
#launch ⇒ Object
Returns the value of attribute launch.
24 25 26 |
# File 'lib/uh/wm/env.rb', line 24 def launch @launch end |
#layout ⇒ Object
Returns the value of attribute layout.
24 25 26 |
# File 'lib/uh/wm/env.rb', line 24 def layout @layout end |
#layout_class ⇒ Object
Returns the value of attribute layout_class.
24 25 26 |
# File 'lib/uh/wm/env.rb', line 24 def layout_class @layout_class end |
#layout_options ⇒ Object
Returns the value of attribute layout_options.
24 25 26 |
# File 'lib/uh/wm/env.rb', line 24 def @layout_options end |
#modifier ⇒ Object
Returns the value of attribute modifier.
24 25 26 |
# File 'lib/uh/wm/env.rb', line 24 def modifier @modifier end |
#modifier_ignore ⇒ Object
Returns the value of attribute modifier_ignore.
24 25 26 |
# File 'lib/uh/wm/env.rb', line 24 def modifier_ignore @modifier_ignore end |
#rc_path ⇒ Object
Returns the value of attribute rc_path.
24 25 26 |
# File 'lib/uh/wm/env.rb', line 24 def rc_path @rc_path end |
#rules ⇒ Object
Returns the value of attribute rules.
24 25 26 |
# File 'lib/uh/wm/env.rb', line 24 def rules @rules end |
#worker ⇒ Object
Returns the value of attribute worker.
24 25 26 |
# File 'lib/uh/wm/env.rb', line 24 def worker @worker end |
Instance Method Details
#log_logger_level ⇒ Object
56 57 58 |
# File 'lib/uh/wm/env.rb', line 56 def log_logger_level log "Logging at #{LOGGER_LEVEL_STRINGS[logger.level]} level" end |
#logger ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'lib/uh/wm/env.rb', line 47 def logger @logger ||= Logger.new(@output).tap do |o| o.level = debug? ? LOGGER_LEVEL_DEBUG : verbose? ? LOGGER_LEVEL_VERBOSE : LOGGER_LEVEL o.formatter = LoggerFormatter.new end end |