i3wm segments¶
-
powerline.segments.i3wm.
active_window
(show_empty=False, auto_expand=False, max_width=80, item_length=20, global_menu=False, cutoff=100)[source]¶ Returns the title of the currently active window. To enhance the global menu support, add the following to your
.bashrc
:if [ -n "$GTK_MODULES" ]; then GTK_MODULES="${GTK_MODULES}:appmenu-gtk-module" else GTK_MODULES="appmenu-gtk-module" fi if [ -z "$UBUNTU_MENUPROXY" ]; then UBUNTU_MENUPROXY=1 fi export GTK_MODULES export UBUNTU_MENUPROXY
Parameters: - cutoff (int) – Maximum title length. If the title is longer, the window_class is used instead.
- global_menu (boolean) – Activate global menu support (experimental)
- item_length (int) – Maximum length of a menu item.
- max_width (int) – Maximum total length of the content.
- auto_expand (bool) – Add spaces to center the segment.
- show_empty (bool) – Show the sehment if no window is focused.
Highlight groups used:
active_window_title:single
oractive_window_title:stacked_unfocused
oractive_window_title:stacked
oractive_window_title
.
-
powerline.segments.i3wm.
mode
(names={'default': None})[source]¶ Returns current i3 mode
Parameters: default (str) – - Specifies the name to be displayed instead of “default”.
- By default the segment is left out in the default mode.
Highlight 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
fresh
andchanged
.
Highlight groups used:
scratchpad
orscratchpad:visible
,scratchpad
orscratchpad:focused
,scratchpad
orscratchpad:urgent
.
-
powerline.segments.i3wm.
workspaces
(hide_empty_workspaces=False, priority_workspaces=[], show_output=False, show_dummy_workspace=False, show_multiple_icons=True, show_icons=True, icons={'Xfce4-terminal': '\uf120', 'Chromium': '\uf268', 'Google-chrome': '\uf268', 'Steam': '\uf1b6', 'jetbrains': '\uf121', 'Gimp': '\uf044', 'Pavucontrol': '\uf1de', 'Lmms': '\uf1de', 'thunderbird': '\uf0e0', 'Thunar': '\uf07b', 'Skype': '\uf17e', 'TelegramDesktop': '\uf2c6', 'feh': '\uf1c5', 'firefox': '\uf269', 'Evince': '\uf1c1', 'Okular': '\uf1c1', 'libreoffice-calc': '\uf0ce', 'libreoffice-writer': '\uf1c2', 'multiple': '\uf009'}, separator=" ", strip=0, output=None, only_show=None)[source]¶ Return list of used workspaces
Parameters: - only_show (list) – Specifies which workspaces to show. Valid entries are
"visible"
,"urgent"
and"focused"
. If omitted ornull
all workspaces are shown. - output (string) – 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.
- separator (string) – Specifies a string to be inserted between the workspace name and program icons and between program icons.
- icons (dict) – A dictionary mapping a substring of window classes to strings to be used as an icon for that
window class. The following window classes have icons by default:
Xfce4-terminal
,Chromium
,Steam
,jetbrains
,Gimp
,Pavucontrol
,Lmms
,Thunderbird
,Thunar
,Skype
,TelegramDesktop
,feh
,Firefox
,Evince
,Okular
,libreoffice-calc
,libreoffice-writer
. You can override the default icons by defining an icon for that window class yourself, and disable single icons by setting their icon to “” or None. Further, there is amultiple
icon for workspaces containing more than one window (which is used ifshow_multiple_icons
isFalse
) - show_icons (boolean) – Determines whether to show icons. Defaults to True.
- show_multiple_icons (boolean) – If this is set to False, instead of displaying multiple icons per workspace, the icon “multiple” will be used.
- show_dummy_workspace (boolean) – If this is set to True, this segment will always display an additional, non-existing workspace. This workspace will be handled as if it was a non-urgent and non-focused regular workspace, i.e., click events will work as with normal workspaces.
- show_output (boolean) – Show the name of the output if more than one output is connected and output is not
set to
__all__
. - list priority_workspaces (string) – A list of workspace names to be sorted before any other workspaces in the given order.
- hide_empty_workspaces (boolean) – Hides all workspaces without any open window. (Does not remove the dummy workspace.) Also hides non-focussed workspaces containing only an open scratchpad.
Highlight groups used:
workspace
orworkspace:visible
,workspace
orworkspace:focused
,workspace
orworkspace:urgent
oroutput
.Click values supplied:
workspace_name
(string) for workspaces andoutput_name
(string) for outputs.- only_show (list) – Specifies which workspaces to show. Valid entries are