class Tmux::StatusBar
Every {Session session} has a status bar. This is where various information as well as a list of {Window windows} will be displayed. For this purpose, the status bar is divided into three parts: the left, center and right part. While the center part displays the window list, the left and right part can be set to display any text.
This class allows accessing various attributes (e.g. the {#background_color background color} of the bar) and the editable parts ({#left left} and {#right right}).
Note: You will not have to instantiate this class. Use {Session#status_bar} instead.
Attributes
@return [Symbol]
@return [Symbol]
@return [Number] The interval in which the status bar will be
updated.
Sets the justification of the window list component of the status line.
@return [Symbol<:left, :right, :centre>]
@return [Symbol<:emacs, :vi>]
The left {Field field} which may display custom {Field#text text} and {Widget widgets}.
@return [Field]
The right {Field field} which may display custom {Field#text text} and {Widget widgets}.
@return [Field]
@return [Session]
Instruct tmux to treat top-bit-set characters in {StatusBar::Field#text} as UTF-8. Notably, this is important for wide characters. This option defaults to false.
@return [Boolean]
Instruct tmux to treat top-bit-set characters in {StatusBar::Field#text} as UTF-8. Notably, this is important for wide characters. This option defaults to false.
@return [Boolean]
Public Class Methods
@param [Session] session
# File lib/tmux/status_bar.rb, line 32 def initialize(session) @session = session @left = Field.new(self, :left) @right = Field.new(self, :right) end
Public Instance Methods
# File lib/tmux/status_bar.rb, line 60 def background_color=(color) @session.options.status_bg = color end
# File lib/tmux/status_bar.rb, line 72 def foreground_color=(color) @session.options.status_fg = color end
Hides the status bar.
@return [void]
# File lib/tmux/status_bar.rb, line 41 def hide @session.options.status = false end
# File lib/tmux/status_bar.rb, line 85 def interval=(value) @session.options.status_interval = value end
# File lib/tmux/status_bar.rb, line 100 def justification=(val) @session.options.status_justify = val end
# File lib/tmux/status_bar.rb, line 113 def keymap=(val) @session.options.status_keys = val end
Shows the status bar.
@return [void]
# File lib/tmux/status_bar.rb, line 48 def show @session.options.status = true end
# File lib/tmux/status_bar.rb, line 130 def utf8=(bool) @session.options.status_utf8 = bool end