]> git.armaanb.net Git - chorizo.git/blob - man1/lariza.usage.1
7c00b6d20ed129dcd83b66d39d43b5b291696508
[chorizo.git] / man1 / lariza.usage.1
1 .TH lariza 1 "2020-04-24" "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\:/user-scripts\fP will be scanned and each file in
130 it ending with \fB.js\fP will be run as a JavaScript file in the context
131 of 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 .P
136 \fBlariza\fP comes with the following scripts:
137 .TP
138 \fBhints.js\fP
139 Press \fBf\fP (open link in current window) or \fBF\fP (open in new
140 window) to activate link hints. After typing the characters for one of
141 them, press \fBEnter\fP to confirm. Press \fBEscape\fP to abort.
142 .P
143 Those bundled scripts are automatically installed on \fBmake install\fP.
144 To use them, though, make sure to link them to the directory mentioned
145 above.
146 .\" --------------------------------------------------------------------
147 .SH "WEB EXTENSIONS"
148 On startup, WebKit checks \fI~/.config/lariza/web_extensions\fP for any
149 \fB.so\fP files. See
150 .UR http://\:blogs.igalia.com/\:carlosgc/\:2013/\:09/\:10/\:webkit2gtk-\:web-\:process-\:extensions/
151 this blog post
152 .UE
153 for further information on these extensions.
154 .P
155 \fBlariza\fP comes with the following extensions:
156 .TP
157 \fBwe_adblock.so\fP
158 Generic adblock. Reads patterns from the file
159 \fI~/.config/lariza/adblock.black\fP. Each line can contain a regular
160 expression. These expressions match case-insensitive and partially, i.e.
161 \fB.*foo.*\fP is the same as \fB.*FOO.*\fP and you can use anchors like
162 \fB^https?://...\fP. Please refer to
163 .UR https://\:developer.\:gnome.\:org/\:glib/\:stable/\:glib-\:regex-\:syntax.html
164 the GLib reference
165 .UE
166 for more details. Lines starting with \fB#\fP are ignored.
167 .P
168 Those bundled web extensions are automatically compiled when you run
169 \fBmake\fP and installed on \fBmake install\fP. To use them, though,
170 make sure to link them to the directory mentioned above.
171 .\" --------------------------------------------------------------------
172 .SH "EXTERNAL URI HANDLER"
173 \fBlariza\fP can launch an executable called
174 \fIlariza-external-handler\fP. It will be passed the \(lqselected\(rq
175 URI as a command line argument:
176 .P
177 \f(CW
178 .nf
179 $ lariza-external-handler -u https://github.com
180 .fi
181 \fP
182 .P
183 This executable must be a user-supplied program. It can do anything it
184 wants to with that URI. \fBlariza\fP ignores the exit code of the
185 handler.
186 .P
187 The \fB\-u\fP will always be set. This allows you to use \fBgetopt\fP(1)
188 like parameter parsing in your program.
189 .P
190 You can either use the appropriate hotkey (see list above) to launch the
191 handler with the currently loaded URI, or you can perform a right click
192 on any link, image or media file to use that URI.
193 .P
194 This mechanism allows you to implement a variety of functions. You might
195 want to implement a bookmarking script or a password manager or you
196 might simply load the current URI in a different browser. That's up to
197 you.
198 .\" --------------------------------------------------------------------
199 .SH "TRUSTED CERTIFICATES"
200 By default, \fBlariza\fP trusts whatever CAs are trusted by WebKit, i.e.
201 by your GnuTLS installation. If you wish to trust additional
202 certificates, such as self-signed certificates, the first thing you
203 should do is try to add the appropriate CAs to your system-wide store.
204 .P
205 If you wish to add simple exceptions, you can grab the certificate and
206 store it in the directory \fI~/.config/lariza/certs\fP. The filename
207 must be equal to the hostname:
208 .P
209 \f(CW
210 .nf
211 \&$ echo | openssl s_client -connect foo.de:443 | openssl x509 >foo.de
212 .fi
213 \fP
214 .P
215 This tells \fBlariza\fP to trust the given certificate when connecting
216 to host \fBfoo.de\fP.
217 .P
218 You can reload these certificates at runtime by pressing the appropriate
219 hotkey. Note that removed certificates will be kept in memory until you
220 restart \fBlariza\fP.
221 .P
222 Note: This is NOT equal to certificate pinning. WebKit ignores
223 user-specified certificates if the server's certificate can be validated
224 by any system-wide CA.
225 .\" --------------------------------------------------------------------
226 .SH "WEBKIT LOCAL STORAGE"
227 WebKit does create files in your $\fBXDG_*\fP directories, i.e.
228 \fI~/.local/share\fP or \fI~/.cache\fP. It's up to you what you want to
229 do with this junk. I remove it regularly when no WebKit browser is
230 running. Another option would be to change the $\fBXDG_*\fP variables.
231 .P
232 I have explicitly not turned off the local storage feature in WebKit
233 because I don't know if this breaks web applications.
234 .\" --------------------------------------------------------------------
235 .SH "SEE ALSO"
236 .BR lariza (1).