Segment reference¶
Segments¶
Segments are written in Python, and the default segments provided with
Powerline are located in powerline/segments/extension.py
.
User-defined segments can be defined in any module in sys.path
or
paths common configuration option, import is
always absolute.
Segments are regular Python functions, and they may accept arguments. All
arguments should have a default value which will be used for themes that
don’t provide an args
dict.
More information is available in Writing segments section.
Available segments¶
- Common segments
- VCS submodule
- System properties
- Network
- Current environment
- Battery
- Weather
- Date and time
- Media players
ClementinePlayerSegment
CmusPlayerSegment
DbusPlayerSegment
ITunesPlayerSegment
MocPlayerSegment
MpdPlayerSegment
PlayerSegment
RDIOPlayerSegment
RhythmboxPlayerSegment
SpotifyAppleScriptPlayerSegment
SpotifyDbusPlayerSegment
clementine()
cmus()
dbus_player()
itunes()
mocp()
mpd()
rdio()
rhythmbox()
spotify()
spotify_apple_script()
spotify_dbus()
- i3wm segments
- PDB segments
- Shell segments
- Tmux segments
- Vim segments
VimBranchSegment
VimStashSegment
branch()
bufnr()
col_current()
csv_col_current()
file_bom()
file_directory()
file_encoding()
file_format()
file_name()
file_scheme()
file_size()
file_type()
file_vcs_status()
line_count()
line_current()
line_percent()
mode()
modified_buffers()
modified_indicator()
paste_indicator()
position()
readonly_indicator()
stash()
tab()
tab_modified_indicator()
tabnr()
trailing_whitespace()
virtcol_current()
visual_range()
window_title()
winnr()
- Plugin-specific segments