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