]> git.armaanb.net Git - chorizo.git/blob - man1/lariza.usage.1
lariza.usage: Mention that web extensions get installed
[chorizo.git] / man1 / lariza.usage.1
1 .TH lariza 1 "2020-03-14" "lariza" "User Commands"
2 .\" --------------------------------------------------------------------
3 .SH NAME
4 lariza.usage \- extended usage hints
5 .\" --------------------------------------------------------------------
6 .SH DESCRIPTION
7 \fBlariza\fP is a simple web browser using GTK+ 3, GLib and WebKit2GTK+.
8 This manpage contains additional hints and pointers regarding its usage.
9 .\" --------------------------------------------------------------------
10 .SH "HOTKEYS"
11 .SS "Global hotkeys"
12 These hotkeys work when either the location bar or the web view is being
13 focused.
14 .TP
15 \fBMod1\fP + \fBx\fP
16 Launch the external handler for the currently loaded URI.
17 .TP
18 \fBMod1\fP + \fBq\fP
19 Close the current window. Quits the entire program if this was the last
20 window and if there are no more active downloads (download manager is
21 shown otherwise).
22 .TP
23 \fBMod1\fP + \fBw\fP
24 Go to your \(lqhomepage\(rq. See the environment variable
25 $\fBLARIZA_HOME_URI\fP.
26 .TP
27 \fBMod1\fP + \fBe\fP
28 Open a new window.
29 .TP
30 \fBMod1\fP + \fBr\fP
31 Reload the current page.
32 .TP
33 \fBMod1\fP + \fBd\fP
34 Open the download manager.
35 .TP
36 \fBMod1\fP + \fBl\fP
37 Focus the location bar.
38 .TP
39 \fBMod1\fP + \fBk\fP
40 Focus the location bar and set its text to \fB:/\fP, allowing you to
41 easily initiate a search.
42 .TP
43 \fBMod1\fP + \fB2\fP
44 .TQ
45 \fBMod1\fP + \fBn\fP
46 Repeat the last search (forward).
47 .TP
48 \fBMod1\fP + \fB3\fP
49 Repeat the last search (backward).
50 .TP
51 \fBMod1\fP + \fBc\fP
52 Reload trusted certificates.
53 .TP
54 \fBF2\fP / \fBF3\fP
55 Go backward and forward in current browser history.
56 .P
57 .SS "Main window \(em WebKit viewport focused"
58 .TP
59 \fBEscape\fP
60 Stop loading.
61 .TP
62 \fBMiddle mouse\fP
63 Open the link under the pointer in a new window.
64 .TP
65 \fBBackward\fP / \fBforward\fP (mouse keys 8 and 9)
66 Same as \fBF2\fP and \fBF3\fP.
67 .TP
68 \fBMod1\fP + \fBScroll up\fP
69 .TQ
70 \fBCtrl\fP + \fBScroll up\fP
71 Increase zoom level of the current page.
72 .TP
73 \fBMod1\fP + \fBScroll down\fP
74 .TQ
75 \fBCtrl\fP + \fBScroll down\fP
76 Decrase zoom level of the current page.
77 .TP
78 \fBMod1\fP + \fBScroll horizontally\fP
79 .TQ
80 \fBCtrl\fP + \fBScroll horizontally\fP
81 Reset zoom to $\fBLARIZA_ZOOM\fP.
82 .P
83 .SS "Main window \(em location bar focused"
84 .TP
85 \fBEscape\fP
86 Reset the content of the location bar to the current URI.
87 .TP
88 \fBReturn\fP
89 Commit, i.e. begin searching, do a keyword based search or open the URI.
90 .P
91 .SS "Download manager"
92 .TP
93 \fBMod1\fP + \fBd\fP
94 .TQ
95 \fBMod1\fP + \fBq\fP
96 Close the download manager. Active downloads are never aborted. However,
97 if there are no more active downloads and no more browsing windows, then
98 the entire program will quit.
99 .\" --------------------------------------------------------------------
100 .SH "DOWNLOAD MANAGER"
101 Open the download manager using the appropriate hotkey. A new window
102 listing your downloads will appear. Clicking on an item will remove it
103 from the list and \(em if needed \(em cancel the download.
104 .P
105 There's no file manager integration, nor does \fBlariza\fP delete,
106 overwrite or resume downloads. If a file already exists, it won't be
107 touched. Instead, the new file name will have a suffix such as \fB.1\fP,
108 \fB.2\fP, \fB.3\fP, and so on.
109 .\" --------------------------------------------------------------------
110 .SH "KEYWORD BASED SEARCHING"
111 In this file, you can configure keywords and the associated URIs:
112 \fI~/.config\:/lariza\:/keywordsearch\fP. Each line has to look like
113 this:
114 .P
115 \f(CW
116 .nf
117 \&wi https://en.wikipedia.org/w/index.php?title=Special:Search&search=%s
118 .fi
119 \fP
120 .P
121 \fBwi\fP is the keyword, so when opening \fBwi foo\fP, \fBlariza\fP
122 will search in Wikipedia. Note the \fB%s\fP at the end of the URI: This
123 is where your search term will be placed.
124 .P
125 Lines starting with \fB#\fP are ignored.
126 .\" --------------------------------------------------------------------
127 .SH "USER-SUPPLIED JAVASCRIPT FILES"
128 After a page has been successfully loaded, the directory
129 \fI~/.config\:/lariza\:/scripts\fP will be scanned and each file in it
130 ending with \fB.js\fP will be run as a JavaScript file in the context of
131 said page.
132 .P
133 During development, you will most likely want to run \fBlariza\fP with
134 $\fBLARIZA_ENABLE_CONSOLE_TO_STDOUT\fP enabled.
135 .\" --------------------------------------------------------------------
136 .SH "WEB EXTENSIONS"
137 On startup, WebKit checks \fI~/.local/share/lariza/web_extensions\fP for
138 any \fB.so\fP files. See
139 .UR http://\:blogs.igalia.com/\:carlosgc/\:2013/\:09/\:10/\:webkit2gtk-\:web-\:process-\:extensions/
140 this blog post
141 .UE
142 for further information on these extensions.
143 .P
144 \fBlariza\fP comes with the following extensions:
145 .TP
146 \fBwe_adblock.so\fP
147 Generic adblock. Reads patterns from the file
148 \fI~/.config/lariza/adblock.black\fP. Each line can contain a regular
149 expression. These expressions match case-insensitive and partially, i.e.
150 \fB.*foo.*\fP is the same as \fB.*FOO.*\fP and you can use anchors like
151 \fB^https?://...\fP. Please refer to
152 .UR https://\:developer.\:gnome.\:org/\:glib/\:stable/\:glib-\:regex-\:syntax.html
153 the GLib reference
154 .UE
155 for more details. Lines starting with \fB#\fP are ignored.
156 .P
157 Those bundled web extensions are automatically compiled when you run
158 \fBmake\fP and installed on \fBmake install\fP. To use them, though,
159 make sure to link them to the directory mentioned above.
160 .\" --------------------------------------------------------------------
161 .SH "EXTERNAL URI HANDLER"
162 \fBlariza\fP can launch an executable called
163 \fIlariza-external-handler\fP. It will be passed the \(lqselected\(rq
164 URI as a command line argument:
165 .P
166 .\f(CW
167 .nf
168 $ lariza-external-handler -u https://github.com
169 .fi
170 \fP
171 .P
172 This executable must be a user-supplied program. It can do anything it
173 wants to with that URI. \fBlariza\fP ignores the exit code of the
174 handler.
175 .P
176 The \fB\-u\fP will always be set. This allows you to use \fBgetopt\fP(1)
177 like parameter parsing in your program.
178 .P
179 You can either use the appropriate hotkey (see list above) to launch the
180 handler with the currently loaded URI, or you can perform a right click
181 on any link, image or media file to use that URI.
182 .P
183 This mechanism allows you to implement a variety of functions. You might
184 want to implement a bookmarking script or a password manager or you
185 might simply load the current URI in a different browser. That's up to
186 you.
187 .\" --------------------------------------------------------------------
188 .SH "TRUSTED CERTIFICATES"
189 By default, \fBlariza\fP trusts whatever CAs are trusted by WebKit, i.e. by
190 your GnuTLS installation. If you wish to trust additional certificates,
191 such as self-signed certificates, the first thing you should do is try
192 to add the appropriate CAs to your system-wide store.
193 .P
194 If you wish to add simple exceptions, you can grab the certificate and
195 store it in the directory \fI~/.config/lariza/certs\fP. The filename
196 must be equal to the hostname:
197 .P
198 .\f(CW
199 .nf
200 \&$ echo | openssl s_client -connect foo.de:443 | openssl x509 >foo.de
201 .fi
202 \fP
203 .P
204 This tells \fBlariza\fP to trust the given certificate when connecting
205 to host \fBfoo.de\fP.
206 .P
207 You can reload these certificates at runtime by pressing the appropriate
208 hotkey. Note that removed certificates will be kept in memory until you
209 restart \fBlariza\fP.
210 .P
211 Note: This is NOT equal to certificate pinning. WebKit ignores
212 user-specified certificates if the server's certificate can be validated
213 by any system-wide CA.
214 .\" --------------------------------------------------------------------
215 .SH "USING LARIZA WITH TABBED"
216 By default, \fBlariza\fP automatically launches an instance of suckless'
217 \fBtabbed\fP(1).
218 .P
219 You can turn this feature off (see command line arguments) or you can
220 specify a command line argument to embed \fBlariza\fP into an arbitrary
221 container (XEMBED). Note that \fBlariza\fP will also automatically embed
222 new windows in the same container.
223 .P
224 When using the automatically launched \fBtabbed\fP(1) instance, you
225 can't use \fBtabbed\fP(1)'s \fBCtrl + Shift + Return\fP hotkey. This is
226 because \fBtabbed\fP(1) is launched with \fB\-d\fP, so it knows nothing
227 about \fBlariza\fP. However, \fBlariza\fP provides its own hotkey to
228 launch a new window which will be embedded in the same instance of
229 \fBtabbed\fP(1).
230 .\" --------------------------------------------------------------------
231 .SH "WEBKIT LOCAL STORAGE"
232 WebKit does create files in your $\fBXDG_*\fP directories, i.e.
233 \fI~/.local/share\fP or \fI~/.cache\fP. It's up to you what you want to
234 do with this junk. I remove it regularly when no WebKit browser is
235 running. Another option would be to change the $\fBXDG_*\fP variables.
236 .P
237 I have explicitly not turned off the local storage feature in WebKit
238 because I don't know if this breaks web applications.
239 .\" --------------------------------------------------------------------
240 .SH "SEE ALSO"
241 .BR lariza (1).