diff options
Diffstat (limited to 'man/xlnch.1.scd')
-rw-r--r-- | man/xlnch.1.scd | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/man/xlnch.1.scd b/man/xlnch.1.scd new file mode 100644 index 0000000..824e2fc --- /dev/null +++ b/man/xlnch.1.scd @@ -0,0 +1,84 @@ +xlnch(1) + +; Tabs are required for indentation (<C-q tab> in emacs) + +# NAME + +xlnch - fast launcher for X + +# SYNOPSIS + +*xlnch* [_file_] + +# OPTIONS + +*xlnch* has the following options: + +_file_ + xlnch configuration. + +*-h* + Print help. + +# DESCRIPTION + +*xlnch* parses a list of commands along with keys for executing them. It then +draws the avaliable commands with their keybinding and grabs the focus so the +next keypress will run the selected command. The configuration can either be +read from a file or from the standard input. + +# CONFIGURATION + +Each line is a command. It must have a key, and can optionally have a +description. By default xlnch exits when you press a key bound to a command. +You can prefix the key with an ampersand (&) which will keep *xlnch* open and +in focus. Those commands will be shown in red. If you ommit the command +description, *xlnch* will show the command instead. + +The configuration format is this: + + \[&]<key>:[<description>]:<command> + +*key* + A single ascii character. + +*description* + Any ascii string. + +*command* + A valid command (see below). + +# EXAMPLE CONFIGURATION + +f::firefox++ +e:The best editor:emacs++ +&t:terminals:xterm + +In this example pressing _f_ will launch firefox and then exit, same for _e_ +and emacs. But if you press _t_ an xterm will spawn but the launcher will stay +open, so pressing _t_ twice will launch two xterms consecutively. This makes +more sense if used to control your window manager though it's cli interface or +similar applications. + +# VALID COMMANDS + +Internally *xlnch* uses *wordexp*(3) to parse the command. So the same +limitations apply. Some advanced stuff might be possible with clever quoting +and calling _bash -c_ as the command but it is recommended to make a script for +such things and just call it from *xlnch*. + +# TIPS + +Since *xlnch* can read from stdin you can have "excecutable" files with +different configurations. Just add _#!/bin/xlnch_ on the first line (or the +appropriate path), make the file executable and run it. + +You can call different xlnch configurations from within xlnch to create +submenues. Don't use the & for such calls because the two xlnch windows will +both want to constantly grab the focus. Either don't provide a way to go back +to the previous menu, or simply assign _b_ to the parent menu so you have a way +back. + +# AUTHOR + +Anastasis Grammenos
\ No newline at end of file |