Class: Tmux::StatusBar
- Inherits:
-
Object
- Object
- Tmux::StatusBar
- Defined in:
- lib/tmux/status_bar.rb,
lib/tmux/status_bar/field.rb
Overview
Every session has a status bar. This is where various information as well as a list of 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 of the bar) and the editable parts (left and right).
Note: You will not have to instantiate this class. Use Tmux::Session#status_bar instead.
Defined Under Namespace
Classes: Field
Instance Attribute Summary collapse
- #background_color ⇒ Symbol
- #foreground_color ⇒ Symbol
-
#interval ⇒ Number
The interval in which the status bar will be updated.
-
#justification ⇒ Symbol<:left, :right, :centre>
Sets the justification of the window list component of the status line.
- #keymap ⇒ Symbol<:emacs, :vi>
- #left ⇒ Field readonly
- #right ⇒ Field readonly
- #session ⇒ Session readonly
-
#utf8 ⇒ Boolean
(also: #utf8?)
Instruct tmux to treat top-bit-set characters in Field#text as UTF-8.
Instance Method Summary collapse
-
#hide
Hides the status bar.
-
#initialize(session) ⇒ StatusBar
constructor
A new instance of StatusBar.
-
#show
Shows the status bar.
Constructor Details
Instance Attribute Details
#background_color ⇒ Symbol
53 54 55 |
# File 'lib/tmux/status_bar.rb', line 53 def background_color @background_color end |
#foreground_color ⇒ Symbol
65 66 67 |
# File 'lib/tmux/status_bar.rb', line 65 def foreground_color @foreground_color end |
#interval ⇒ Number
Returns The interval in which the status bar will be updated.
78 79 80 |
# File 'lib/tmux/status_bar.rb', line 78 def interval @interval end |
#justification ⇒ Symbol<:left, :right, :centre>
Sets the justification of the window list component of the status line.
93 94 95 |
# File 'lib/tmux/status_bar.rb', line 93 def justification @justification end |
#keymap ⇒ Symbol<:emacs, :vi>
105 106 107 |
# File 'lib/tmux/status_bar.rb', line 105 def keymap @keymap end |
#left ⇒ Field (readonly)
24 25 26 |
# File 'lib/tmux/status_bar.rb', line 24 def left @left end |
#right ⇒ Field (readonly)
30 31 32 |
# File 'lib/tmux/status_bar.rb', line 30 def right @right end |
#session ⇒ Session (readonly)
19 20 21 |
# File 'lib/tmux/status_bar.rb', line 19 def session @session end |
#utf8 ⇒ Boolean Also known as: utf8?
Instruct tmux to treat top-bit-set characters in Tmux::StatusBar::Field#text as UTF-8. Notably, this is important for wide characters. This option defaults to false.
122 123 124 |
# File 'lib/tmux/status_bar.rb', line 122 def utf8 @utf8 end |
Instance Method Details
#hide
This method returns an undefined value.
Hides the status bar.
41 42 43 |
# File 'lib/tmux/status_bar.rb', line 41 def hide @session..status = false end |
#show
This method returns an undefined value.
Shows the status bar.
48 49 50 |
# File 'lib/tmux/status_bar.rb', line 48 def show @session..status = true end |