# 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

powerline.listers.vim.bufferlister(pl, segment_info, show_unlisted=False, **kwargs)

  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.

powerline.listers.vim.tablister(pl, segment_info, **kwargs)

  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(pl, segment_info, full_stack=False, maxframes=3)

  List all frames in segment_info format

  Parameters:

    - 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

powerline.listers.i3wm.output_lister(pl, segment_info)

  List all outputs in segment_info format

powerline.listers.i3wm.workspace_lister(pl, segment_info, only_show=None, output=None)

  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.

  Parameters:

    - 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.