i3wm segments¶
- powerline.segments.i3wm.active_window(cutoff=100)[source]¶
 Returns the title of the currently active window.
- Parameters:
 cutoff (int) – Maximum title length. If the title is longer, the window_class is used instead.
Highlight groups used:
active_window_title.
- powerline.segments.i3wm.mode(names={'default': None})[source]¶
 Returns current i3 mode
- Parameters:
 names (dict) – Specifies the string to show for various modes. Use
nullto hide a mode (defaultis hidden by default).
Highligh groups used:
mode
- powerline.segments.i3wm.scratchpad(icons={'fresh': 'O', 'changed': 'X'})[source]¶
 Returns the windows currently on the scratchpad
- Parameters:
 icons (dict) – Specifies the strings to show for the different scratchpad window states. Must contain the keys
freshandchanged.
Highlight groups used:
scratchpadorscratchpad:visible,scratchpadorscratchpad:focused,scratchpadorscratchpad:urgent.
- powerline.segments.i3wm.workspace(icons={'multiple': 'M'}, format=None, strip=False, workspace=None)[source]¶
 Return the specified workspace name
- Parameters:
 workspace (str) – Specifies which workspace to show. If unspecified, may be set by the
list_workspaceslister if used, otherwise falls back to currently focused workspace.strip (bool) – Specifies whether workspace numbers (in the
1: nameformat) should be stripped from workspace names before being displayed. Defaults to false. Deprecated: Use {name} or {stripped_name} of format instead.format (str) – Specifies the format used to display workspaces; defaults to
{name}. Valid fields are:name(workspace name),number(workspace number if present), stipped_name` (workspace name stripped of leading number),icon(if available, icon for application running in the workspace, uses themultipleicon instead of multiple different icons),multi_icon(similar toicon, but does not usemultiple, instead joins all icons with a single space)icons (dict) – A dictionary mapping a substring of window classes to strings to be used as an icon for that window class. Further, there is a
multipleicon for workspaces containing more than one window.
Highlight groups used:
workspaceorw_visible,workspace:visible,workspaceorw_focused,workspace:focused,workspaceorw_urgent,workspace:urgent,workspace.
- powerline.segments.i3wm.workspaces()[source]¶
 Return list of used workspaces
- Parameters:
 only_show (list) – Specifies which workspaces to show. Valid entries are
"visible","urgent"and"focused". If omitted ornullall workspaces are shown.output (str) – May be set to the name of an X output. If specified, only workspaces on that output are shown. Overrides automatic output detection by the lemonbar renderer and bindings. Use “__all__” to show workspaces on all outputs.
strip (int) – Specifies how many characters from the front of each workspace name should be stripped (e.g. to remove workspace numbers). Defaults to zero.
format (str) – Specifies the format used to display workspaces; defaults to
{name}. Valid fields are:name(workspace name),number(workspace number if present), stipped_name` (workspace name stripped of leading number),icon(if available, icon for application running in the workspace, uses themultipleicon instead of multiple different icons),multi_icon(similar toicon, but does not usemultiple, instead joins all icons with a single space)icons (dict) – A dictionary mapping a substring of window classes to strings to be used as an icon for that window class. Further, there is a
multipleicon for workspaces containing more than one window.sort_workspaces (bool) – Sort the workspaces displayed by their name according to the natural ordering.
show_output (bool) – Shows the name of the output if more than one output is connected.
priority_workspaces (list) – A list of workspace names to be sorted before any other workspaces in the given order.
hide_empty_workspaces (bool) – Hides all workspaces without any open window. Also hides non-focussed workspaces containing only an open scratchpad.
Highlight groups used:
workspaceorw_visible,workspace:visible,workspaceorw_focused,workspace:focused,workspaceorw_urgent,workspace:urgent,workspaceoroutput.