Blob


1 .\" Copyright (c) 2020 Omar Polo <op@omarpolo.com>
2 .\"
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
6 .\"
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 .Dd $Mdocdate: September 27 2020$
15 .Dt STAR-PLATINUM.CONF 5
16 .Os
17 .Sh NAME
18 .Nm star-platinum.conf
19 .Nd star-platinum configuration file
20 .Sh DESCRIPTION
21 .Nm
22 is the configuration file for the
23 .Xr star-platinum 1
24 program.
25 .Pp
26 Empty lines are ignored, and comments too.
27 Comments starts with a # sign and continue until the end of the line
28 and can be placed everywhere in the configuration file.
29 .Pp
30 The configuration file is made of blocks.
31 Every block starts with one or more
32 .Ic match
33 directives and continues with several keybinding directives.
34 If more than a single
35 .Ic match
36 directive is given, the keybinding will be used if at least one of the
37 .Ic match
38 directives matches the window.
39 That is, if both match class Firefox and match class Chromium is
40 given, the directives will be available for both Firefox and Chromium
41 windows.
42 .Pp
43 A keybinding directive is made of the
44 .Ic on
45 keyword followed by a keybinding, followed by the
46 .Ic do
47 keyword and an action.
48 The action can be another keybinding, or a special internal command.
49 .Pp
50 The syntax for the keybindings is inspired
51 .Xr emacs 1 .
52 A keybindings is written within double quotes and is made of modifiers
53 followed by the key.
54 Modifiers follows the
55 .Xr emacs 1
56 notation of using C- to mean control, S- for shift, M- for alt (mod1)
57 and s- for super (mod4).
58 The key can be either a plain letter (e.g. x) or the name of the key
59 written within angular brackets (e.g. <Down>).
60 .Pp
61 The only internal command available now is
62 .Ic ignore Ns : it's a no-op.
63 .Sh EXAMPLES
64 The following is an example of configuration file that binds some
65 .Xr emacs 1 Ns -esque keys for both Firefox and Chromium:
66 .Bd -literal -offset indent
67 match class Firefox
68 match class Chromium-browser
69 on "C-s" do "C-f"
71 # clipboard
72 on "C-w" do "C-x"
73 on "M-w" do "C-c"
74 on "C-y" do "C-v"
76 # movements
77 on "C-n" do "<Down>"
78 on "C-p" do "<Up>"
79 on "C-f" do "<Right>"
80 on "C-b" do "<Left>"
82 on "C-(" do ignore
83 .Ed