Built-in Extensions¶
CommandSet¶
- class libqtile.extension.CommandSet(**config)[source]
Give list of commands to be executed in dmenu style.
ex. manage mocp deamon:
Key([mod], 'm', lazy.run_extension(extension.CommandSet( commands={ 'play/pause': '[ $(mocp -i | wc -l) -lt 2 ] && mocp -p || mocp -G', 'next': 'mocp -f', 'previous': 'mocp -r', 'quit': 'mocp -x', 'open': 'urxvt -e mocp', 'shuffle': 'mocp -t shuffle', 'repeat': 'mocp -t repeat', }, pre_commands=['[ $(mocp -i | wc -l) -lt 1 ] && mocp -S'], **Theme.dmenu))),
ex. CommandSet inside another CommandSet
CommandSet( commands={ "Hello": CommandSet( commands={ "World": "echo 'Hello, World!'" }, **Theme.dmenu ) }, **Theme.dmenu )
Configuration options
key
default
description
backgroundNonedefines the normal background color (#RGB or #RRGGBB)
commandNonethe command to be launched (string or list with arguments)
commandsNonedictionary of commands where key is runable command
dmenu_bottomFalsedmenu appears at the bottom of the screen
dmenu_command'dmenu'the dmenu command to be launched
dmenu_fontNoneoverride the default 'font' and 'fontsize' options for dmenu
dmenu_heightNonedefines the height (only supported by some dmenu forks)
dmenu_ignorecaseFalsedmenu matches menu items case insensitively
dmenu_linesNonedmenu lists items vertically, with the given number of lines
dmenu_promptNonedefines the prompt to be displayed to the left of the input field
font'sans'defines the font name to be used
fontsizeNonedefines the font size to be used
foregroundNonedefines the normal foreground color (#RGB or #RRGGBB)
pre_commandsNonelist of commands to be executed before getting dmenu answer
selected_backgroundNonedefines the selected background color (#RGB or #RRGGBB)
selected_foregroundNonedefines the selected foreground color (#RGB or #RRGGBB)
RunCommand¶
- class libqtile.extension.RunCommand(**config)[source]
Run an arbitrary command.
Mostly useful as a superclass for more specific extensions that need to interact with the qtile object.
Also consider simply using lazy.spawn() or writing a client.
Configuration options
key
default
description
backgroundNonedefines the normal background color (#RGB or #RRGGBB)
commandNonethe command to be launched (string or list with arguments)
font'sans'defines the font name to be used
fontsizeNonedefines the font size to be used
foregroundNonedefines the normal foreground color (#RGB or #RRGGBB)
selected_backgroundNonedefines the selected background color (#RGB or #RRGGBB)
selected_foregroundNonedefines the selected foreground color (#RGB or #RRGGBB)
WindowList¶
- class libqtile.extension.WindowList(**config)[source]
Give vertical list of all open windows in dmenu. Switch to selected.
Configuration options
key
default
description
all_groupsTrueIf True, list windows from all groups; otherwise only from the current group
backgroundNonedefines the normal background color (#RGB or #RRGGBB)
commandNonethe command to be launched (string or list with arguments)
dmenu_bottomFalsedmenu appears at the bottom of the screen
dmenu_command'dmenu'the dmenu command to be launched
dmenu_fontNoneoverride the default 'font' and 'fontsize' options for dmenu
dmenu_heightNonedefines the height (only supported by some dmenu forks)
dmenu_ignorecaseFalsedmenu matches menu items case insensitively
dmenu_lines'80'Give lines vertically. Set to None get inline
dmenu_promptNonedefines the prompt to be displayed to the left of the input field
font'sans'defines the font name to be used
fontsizeNonedefines the font size to be used
foregroundNonedefines the normal foreground color (#RGB or #RRGGBB)
item_format'{group}.{id}: {window}'the format for the menu items
selected_backgroundNonedefines the selected background color (#RGB or #RRGGBB)
selected_foregroundNonedefines the selected foreground color (#RGB or #RRGGBB)