qtile/qtile — pull request #171 by cjbarnes18 (2012-10-20 02:34:47+00:00)
Title: Promptwidget

The change to spawncmd prompt is the result of a discussion I had with micti on IRC, The idea is to provide the prompt with a command, then the user enters arguments for that command at the prompt.

I added a file completer so that commands could be easily Tab completed where a file is needed.

qtilecmd exposes the Qtile command tree at the prompt with tab completion, I added an internal version of Client for this, I think this could also be useful for other widgets to control Qtile.

keys config e.g.
```python
# Open files in emacs
Key(
[mod], "space",
lazy.spawncmd(
prompt="emacs open: ",
command='sakura -e "emacs -nw %s"',
complete="file",
),
),
# Search engine launcher
Key(
[mod], "g",
lazy.spawncmd(
prompt="search: ",
command="firefox https://duckduckgo.com/?q=%s",
complete=None,
),
),
# spawn a command
Key(
[mod], "numbersign",
lazy.spawncmd()
),
# Qtile commander
Key(
[mod], "c",
lazy.qtilecmd()
),
```