Class: Thaum::Theme
- Inherits:
-
Data
- Object
- Data
- Thaum::Theme
- Defined in:
- lib/thaum/themes.rb
Instance Attribute Summary collapse
-
#accent ⇒ Object
readonly
Returns the value of attribute accent.
-
#bar_bg ⇒ Object
readonly
Returns the value of attribute bar_bg.
-
#bg ⇒ Object
readonly
Returns the value of attribute bg.
-
#border ⇒ Object
readonly
Returns the value of attribute border.
-
#dim ⇒ Object
readonly
Returns the value of attribute dim.
-
#disabled_fg ⇒ Object
readonly
Returns the value of attribute disabled_fg.
-
#error_fg ⇒ Object
readonly
Returns the value of attribute error_fg.
-
#fg ⇒ Object
readonly
Returns the value of attribute fg.
-
#info_fg ⇒ Object
readonly
Returns the value of attribute info_fg.
-
#input_bg ⇒ Object
readonly
Returns the value of attribute input_bg.
-
#muted_fg ⇒ Object
readonly
Returns the value of attribute muted_fg.
-
#pressed ⇒ Object
readonly
Returns the value of attribute pressed.
-
#selection ⇒ Object
readonly
Returns the value of attribute selection.
-
#selection_fg ⇒ Object
readonly
Returns the value of attribute selection_fg.
-
#success_fg ⇒ Object
readonly
Returns the value of attribute success_fg.
-
#warning_fg ⇒ Object
readonly
Returns the value of attribute warning_fg.
Instance Method Summary collapse
-
#initialize(bg:, fg:, accent:, border:, dim:, selection:, selection_fg:, pressed:, input_bg:, bar_bg:, success_fg: nil, warning_fg: nil, error_fg: nil, info_fg: nil, muted_fg: nil, disabled_fg: nil) ⇒ Theme
constructor
New semantic fields are optional to keep existing Theme.new callers working.
Constructor Details
#initialize(bg:, fg:, accent:, border:, dim:, selection:, selection_fg:, pressed:, input_bg:, bar_bg:, success_fg: nil, warning_fg: nil, error_fg: nil, info_fg: nil, muted_fg: nil, disabled_fg: nil) ⇒ Theme
New semantic fields are optional to keep existing Theme.new callers working. Defaults are chosen to be safe and legible.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/thaum/themes.rb', line 13 def initialize( bg:, fg:, accent:, border:, dim:, selection:, selection_fg:, pressed:, input_bg:, bar_bg:, success_fg: nil, warning_fg: nil, error_fg: nil, info_fg: nil, muted_fg: nil, disabled_fg: nil ) success_fg ||= accent warning_fg ||= accent error_fg ||= accent info_fg ||= accent muted_fg ||= dim disabled_fg ||= dim super end |
Instance Attribute Details
#accent ⇒ Object (readonly)
Returns the value of attribute accent
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def accent @accent end |
#bar_bg ⇒ Object (readonly)
Returns the value of attribute bar_bg
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def @bar_bg end |
#bg ⇒ Object (readonly)
Returns the value of attribute bg
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def bg @bg end |
#border ⇒ Object (readonly)
Returns the value of attribute border
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def border @border end |
#dim ⇒ Object (readonly)
Returns the value of attribute dim
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def dim @dim end |
#disabled_fg ⇒ Object (readonly)
Returns the value of attribute disabled_fg
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def disabled_fg @disabled_fg end |
#error_fg ⇒ Object (readonly)
Returns the value of attribute error_fg
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def error_fg @error_fg end |
#fg ⇒ Object (readonly)
Returns the value of attribute fg
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def fg @fg end |
#info_fg ⇒ Object (readonly)
Returns the value of attribute info_fg
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def info_fg @info_fg end |
#input_bg ⇒ Object (readonly)
Returns the value of attribute input_bg
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def input_bg @input_bg end |
#muted_fg ⇒ Object (readonly)
Returns the value of attribute muted_fg
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def muted_fg @muted_fg end |
#pressed ⇒ Object (readonly)
Returns the value of attribute pressed
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def pressed @pressed end |
#selection ⇒ Object (readonly)
Returns the value of attribute selection
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def selection @selection end |
#selection_fg ⇒ Object (readonly)
Returns the value of attribute selection_fg
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def selection_fg @selection_fg end |
#success_fg ⇒ Object (readonly)
Returns the value of attribute success_fg
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def success_fg @success_fg end |
#warning_fg ⇒ Object (readonly)
Returns the value of attribute warning_fg
4 5 6 |
# File 'lib/thaum/themes.rb', line 4 def warning_fg @warning_fg end |