summaryrefslogtreecommitdiffstats
path: root/man/xlnch.1
blob: 4ca4b92f7cab9c5c9cfab1e00220c9a5b912c085 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
.\" Generated by scdoc 1.11.1
.\" Complete documentation for this program is not available as a GNU info page
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.nh
.ad l
.\" Begin generated content:
.TH "xlnch" "1" "2021-05-04"
.P
.P
.SH NAME
.P
xlnch - fast launcher for X
.P
.SH SYNOPSIS
.P
\fBxlnch\fR [\fIfile\fR]
.P
.SH OPTIONS
.P
\fBxlnch\fR has the following options:
.P
\fIfile\fR
.RS 4
xlnch configuration.\&
.P
.RE
\fB-h\fR
.RS 4
Print help.\&
.P
.RE
.SH DESCRIPTION
.P
\fBxlnch\fR 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.\&
.P
.SH CONFIGURATION
.P
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 \fBxlnch\fR open and
in focus.\& Those commands will be shown in red.\& If you ommit the command
description, \fBxlnch\fR will show the command instead.\&
.P
The configuration format is this:
.P
.RS 4
[&]<key>:[<description>]:<command>
.P
.RE
\fBkey\fR
.RS 4
A single ascii character.\&
.P
.RE
\fBdescription\fR
.RS 4
Any ascii string.\&
.P
.RE
\fBcommand\fR
.RS 4
A valid command (see below).\&
.P
.RE
.SH EXAMPLE CONFIGURATION
.P
f::firefox
.br
e:The best editor:emacs
.br
&t:terminals:xterm
.P
In this example pressing \fIf\fR will launch firefox and then exit, same for \fIe\fR
and emacs.\& But if you press \fIt\fR an xterm will spawn but the launcher will stay
open, so pressing \fIt\fR 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.\&
.P
.SH VALID COMMANDS
.P
Internally \fBxlnch\fR uses \fBwordexp\fR(3) to parse the command.\& So the same
limitations apply.\& Some advanced stuff might be possible with clever quoting
and calling \fIbash -c\fR as the command but it is recommended to make a script for
such things and just call it from \fBxlnch\fR.\&
.P
.SH TIPS
.P
Since \fBxlnch\fR can read from stdin you can have "excecutable" files with
different configurations.\& Just add \fI#!\&/bin/xlnch\fR on the first line, make the
file executable and run it.\&
.P
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 \fIb\fR to the parent menu so you have a way
back.\&
.P
.SH AUTHOR
.P
Anastasis Grammenos