Lister reference

Listers are special segment collections which allow to show some list of segments for each entity in the list of entities (multiply their segments list by a list of entities). E.g. powerline.listers.vim.tablister presented with powerline.segments.vim.tabnr and ….file_name as segments will emit segments with buffer names and tabpage numbers for each tabpage shown by vim.

Listers appear in configuration as irregular segments having segment_list as their type and segments key with a list of segments (a bit more details in Themes section of configuration reference).

More information in Writing listers section.

Vim listers


List all buffers in segment_info format

Specifically generates a list of segment info dictionaries with buffer and bufnr keys set to buffer-specific ones, window, winnr and window_id keys set to None.

Adds one of buf:, buf_nc:, buf_mod:, or buf_nc_mod prefix to all segment highlight groups.

Parameters:show_unlisted (bool) – True if unlisted buffers should be shown as well. Current buffer is always shown.

List all tab pages in segment_info format

Specifically generates a list of segment info dictionaries with window, winnr, window_id, buffer and bufnr keys set to tab-local ones and additional tabpage and tabnr keys.

Adds either tab: or tab_nc: prefix to all segment highlight groups.

Works best with vim-7.4 or later: earlier versions miss tabpage object and thus window objects are not available as well.

Pdb listers

powerline.listers.pdb.frame_lister(maxframes=3, full_stack=False)[source]

List all frames in segment_info format

  • full_stack (bool) – If true, then all frames in the stack are listed. Normally N first frames are discarded where N is a number of frames present at the first invocation of the prompt minus one.
  • maxframes (int) – Maximum number of frames to display.

i3wm listers


List all outputs in segment_info format

powerline.listers.i3wm.workspace_lister(output=None, only_show=None)[source]

List all workspaces in segment_info format

Sets the segment info values of workspace and output to the name of the i3 workspace and the xrandr output respectively and the keys "visible", "urgent" and "focused" to a boolean indicating these states.

  • only_show (list) – Specifies which workspaces to list. Valid entries are "visible", "urgent" and "focused". If omitted or null all workspaces are listed.
  • output (str) – May be set to the name of an X output. If specified, only workspaces on that output are listed. Overrides automatic output detection by the lemonbar renderer and bindings. Set to false to force all workspaces to be shown.