Class: Thaum::Theme

Inherits:
Data
  • Object
show all
Defined in:
lib/thaum/themes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#accentObject (readonly)

Returns the value of attribute accent

Returns:

  • (Object)

    the current value of accent



4
5
6
# File 'lib/thaum/themes.rb', line 4

def accent
  @accent
end

#bar_bgObject (readonly)

Returns the value of attribute bar_bg

Returns:

  • (Object)

    the current value of bar_bg



4
5
6
# File 'lib/thaum/themes.rb', line 4

def bar_bg
  @bar_bg
end

#bgObject (readonly)

Returns the value of attribute bg

Returns:

  • (Object)

    the current value of bg



4
5
6
# File 'lib/thaum/themes.rb', line 4

def bg
  @bg
end

#borderObject (readonly)

Returns the value of attribute border

Returns:

  • (Object)

    the current value of border



4
5
6
# File 'lib/thaum/themes.rb', line 4

def border
  @border
end

#dimObject (readonly)

Returns the value of attribute dim

Returns:

  • (Object)

    the current value of dim



4
5
6
# File 'lib/thaum/themes.rb', line 4

def dim
  @dim
end

#disabled_fgObject (readonly)

Returns the value of attribute disabled_fg

Returns:

  • (Object)

    the current value of disabled_fg



4
5
6
# File 'lib/thaum/themes.rb', line 4

def disabled_fg
  @disabled_fg
end

#error_fgObject (readonly)

Returns the value of attribute error_fg

Returns:

  • (Object)

    the current value of error_fg



4
5
6
# File 'lib/thaum/themes.rb', line 4

def error_fg
  @error_fg
end

#fgObject (readonly)

Returns the value of attribute fg

Returns:

  • (Object)

    the current value of fg



4
5
6
# File 'lib/thaum/themes.rb', line 4

def fg
  @fg
end

#info_fgObject (readonly)

Returns the value of attribute info_fg

Returns:

  • (Object)

    the current value of info_fg



4
5
6
# File 'lib/thaum/themes.rb', line 4

def info_fg
  @info_fg
end

#input_bgObject (readonly)

Returns the value of attribute input_bg

Returns:

  • (Object)

    the current value of input_bg



4
5
6
# File 'lib/thaum/themes.rb', line 4

def input_bg
  @input_bg
end

#muted_fgObject (readonly)

Returns the value of attribute muted_fg

Returns:

  • (Object)

    the current value of muted_fg



4
5
6
# File 'lib/thaum/themes.rb', line 4

def muted_fg
  @muted_fg
end

#pressedObject (readonly)

Returns the value of attribute pressed

Returns:

  • (Object)

    the current value of pressed



4
5
6
# File 'lib/thaum/themes.rb', line 4

def pressed
  @pressed
end

#selectionObject (readonly)

Returns the value of attribute selection

Returns:

  • (Object)

    the current value of selection



4
5
6
# File 'lib/thaum/themes.rb', line 4

def selection
  @selection
end

#selection_fgObject (readonly)

Returns the value of attribute selection_fg

Returns:

  • (Object)

    the current value of selection_fg



4
5
6
# File 'lib/thaum/themes.rb', line 4

def selection_fg
  @selection_fg
end

#success_fgObject (readonly)

Returns the value of attribute success_fg

Returns:

  • (Object)

    the current value of success_fg



4
5
6
# File 'lib/thaum/themes.rb', line 4

def success_fg
  @success_fg
end

#warning_fgObject (readonly)

Returns the value of attribute warning_fg

Returns:

  • (Object)

    the current value of warning_fg



4
5
6
# File 'lib/thaum/themes.rb', line 4

def warning_fg
  @warning_fg
end