add autofocus_onload option
[xxxterm.git] / xxxterm.1
blob4225559911cc97d332ded7b19a268d5aefb24590
1 .\"     $xxxterm$
2 .\"
3 .\" Copyright (c) 2010, 2011 Marco Peereboom <marco@peereboom.us>
4 .\" Copyright (c) 2011 Jason McIntyre <jmc@openbsd.org>
5 .\"
6 .\" Permission to use, copy, modify, and distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
9 .\"
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .\"
18 .Dd $Mdocdate: October 14 2011 $
19 .Dt XXXTERM 1
20 .Os
21 .Sh NAME
22 .Nm xxxterm
23 .Nd lightweight web browser
24 .Sh SYNOPSIS
25 .Nm xxxterm
26 .Bk -words
27 .Op Fl nSTtV
28 .Op Fl f Ar file
29 .Op Fl s Ar session_name
30 .Op Ar url ...
31 .Ek
32 .Sh DESCRIPTION
33 .Nm
34 is a minimalistic web browser that tries to stay out of the way so that
35 valuable screen real estate can be used for much more important stuff.
36 It has sane defaults and does not require one to learn a language to do any
37 configuration.
38 It was written by hackers for hackers
39 and it strives to be small, compact, and fast.
40 .Pp
41 .Nm
42 is very simple in its use.
43 Most actions are initiated via key or mouse bindings.
44 Key bindings are based on those of the
45 .Xr vi 1
46 text editor,
47 giving web browsing a similar feel to navigating a text document.
48 The
49 .Sx KEY BINDINGS
50 section below documents the various defaults and possible customizations.
51 .Pp
52 The options are as follows:
53 .Bl -tag -width Ds
54 .It Fl f Ar file
55 Specify an alternative configuration file.
56 .It Fl n
57 Open a new tab in a running
58 .Nm
59 for each specified URL.
60 This option requires
61 .Cm enable_socket
62 to be enabled.
63 .It Fl e Ar command
64 Execute arbitrary command (see the
65 .Sx COMMAND MODE
66 section below) in a running
67 .Nm
68 instance. This option requires
69 .Cm enable_socket
70 to be enabled. Example run: xxxterm -e "tabnew openbsd.org"; xxxterm -e
71 tabclose; xxxterm -e wq.
72 .It Fl S
73 Disable the toolbar.
74 .It Fl s Ar session_name
75 Open session that was saved with ":session save" command.
76 .It Fl T
77 Disable visualization of tabs.
78 .It Fl t
79 Disable tabs.
80 .It Fl V
81 Display version and exit.
82 .El
83 .Sh FAST STARTUP
84 The following notation is used throughout this page:
85 .Pp
86 .Bl -tag -width Ds -offset indent -compact
87 .It Cm C-
88 Control
89 .It Cm S-
90 Shift
91 .It Cm M1-
92 Meta 1 (sometimes marked Alt)
93 .It Cm M2-
94 Meta 2
95 .It Cm M3-
96 Meta 3
97 .It Cm M4-
98 Meta 4 (sometimes marked Windows)
99 .It Cm M5-
100 Meta 2
101 .It Cm MB1
102 Mouse button 1
105 To browse to a specific address,
106 either use the mouse to click on the address bar
107 or press
108 .Cm F6
109 to shift the keyboard focus to the address bar.
110 The address is then entered manually.
112 The mouse can be used to navigate the page in the traditional manner,
113 or the keyboard can be used instead.
114 For example,
115 .Cm PageUp
117 .Cm PageDown
118 will scroll up and down the page.
120 To follow a link,
121 either click on it or use the
122 .Cm f
123 key and have
125 assign numbers to each link on the page;
126 entering that number on the keyboard will prompt
128 to follow the link.
129 .Sh KEY BINDINGS
131 provides many actions accessed via key or mouse bindings.
132 Most can be reprogrammed using a
133 .Cm keybinding
134 entry in the configuration file.
135 Each keyboard shortcut requires exactly one entry in the configuration file.
136 A shortcut can have multiple entries in the configuration file.
137 The format of the keybinding entry is as follows:
139 .D1 keybinding = action,(!)keystroke(s)
141 For example, "keybinding = tabnew,C-t" where
142 .Cm tabnew
143 is the action and
144 .Cm C-t
146 the keystrokes.
147 GTK has some default keybindings for manipulating text inside input
148 fields, such as the URI or search entry widget, for example
149 .Cm C-w
150 deletes a word. To override these defaults prefix your key with an
151 exclamation mark, like this: "keybinding = tabclose,!C-w".
153 .Cm clearall
154 key word is special and is meant to reset the key binding list to the GTK+
155 and WebKit defaults.
156 This keyword should be the first
157 .Cm keybinding
158 entry in the configuration file.
160 Shift should be used sparingly since it gets in the way of non-USA keyboards.
161 See the accompanying configuration file for examples.
163 The various bindings are documented below.
164 The relevant keybinding action is given afterwards, in parentheses.
165 .Ss Command mode
166 These commands are used to focus or unfocus input on the default input of a web
167 page.
169 .Bl -tag -width Ds -offset indent -compact
170 .It Cm ESC
171 Go to command mode; unfocus current entry on web page.
172 .Pq Cm command_mode
173 .It Cm i
174 Go to insert mode; focus on default entry on web page.
175 .Pq Cm insert_mode
177 .Ss Search Commands
178 These commands are used to search for text strings within a web page.
180 .Bl -tag -width Ds -offset indent -compact
181 .It Cm /
182 Start a search
183 .Pq Cm search
184 .It Cm \&?
185 Start a backwards search
186 .Pq Cm searchb
187 .It Cm n
188 Next item matching search
189 .Pq Cm searchnext
190 .It Cm N
191 Previous item matching search
192 .Pq Cm searchprev
194 .Ss Focus Commands
195 These commands are used to shift the focus of
197 from one area to another.
199 .Bl -tag -width Ds -offset indent -compact
200 .It Cm F6
201 Focus on address bar
202 .Pq Cm focusaddress
203 .It Cm F7
204 Focus on search entry
205 .Pq Cm focussearch
207 .Ss Command Aliases
208 These commands allow the user to map specific actions to specific keys.
209 It can be useful when the
210 .Fl S
211 option is used.
213 .Bl -tag -width Ds -offset indent -compact
214 .It Cm F1
215 Alias for ":help"
216 .It Cm F4
217 Alias for ":toplevel toggle"
218 .It Cm F9
219 Alias for ":open"
220 .Pq Cm promptopen
221 .It Cm F10
222 Alias for ":open current-uri"
223 .Pq Cm promptopencurrent
224 .It Cm F11
225 Alias for ":tabnew"
226 .Pq Cm prompttabnew
227 .It Cm F12
228 Alias for ":tabnew current-uri"
229 .Pq Cm prompttabnewcurrent
231 .Ss Navigation Commands
232 These commands allow the user to navigate web pages and,
233 to some extent,
234 control the browser.
236 .Bl -tag -width "Space, C-f, PageDownXXX" -offset indent -compact
237 .It Cm F5, C-r, C-l
238 Reload page
239 .Pq Cm reload
240 .It Cm Backspace, M-Left
241 Previous page
242 .Pq Cm goback
243 .It Cm S-BackSpace, M-Right
244 Forward page
245 .Pq Cm goforward
246 .It Cm j, Down
247 Next line on page
248 .Pq Cm scrolldown
249 .It Cm k, Up
250 Previous line on page
251 .Pq Cm scrollup
252 .It Cm G, End
253 Bottom of page
254 .Pq Cm scrollbottom
255 .It Cm gg, Home
256 Top of page
257 .Pq Cm scrolltop
258 .It Cm Space, C-f, PageDown
259 Page down
260 .Pq Cm scrollpagedown
261 .It Cm C-b, PageUp
262 Page up
263 .Pq Cm scrollpageup
264 .It Cm l, Right
265 Page right
266 .Pq Cm scrollright
267 .It Cm h, Left
268 Page left
269 .Pq Cm scrollleft
270 .It Cm $
271 Page far right
272 .Pq Cm scrollfarright
273 .It Cm 0
274 Page far left
275 .Pq Cm scrollfarleft
276 .It Cm M-f
277 Favorites
278 .Pq Cm fav
279 .It Cm M-j
280 Cookie jar
281 .Pq Cm cookiejar
282 .It Cm M-d
283 Download manager
284 .Pq Cm dl
285 .It Cm C-p
286 Print page
287 .Pq Cm print
288 .It Cm M-h
289 Global history
290 .Pq Cm history
291 .It Cm C-j
292 Toggle Java Script enabled for FQDN
293 .Pq Cm js
294 .It Cm C-s
295 Toggle source view
296 .Pq Cm togglesrc
297 .It Cm M-c
298 Toggle cookie enabled for FQDN
299 .Pq Cm cookie
301 .Ss Tab Manipulation
303 supports tabbed browsing.
304 That is, web pages may be opened in separate tabs,
305 allowing the user to quickly move from one page to another,
306 and back.
307 These commands then are used to create, destroy, and move between tabs.
309 .Bl -tag -width "C-plus, C-equalXXX" -offset indent -compact
310 .It Cm C-MB1
311 Open new tab with the clicked link
312 .It Cm C-t
313 Create new tab with focus in URL entry
314 .Pq Cm tabnew
315 .It Cm C-w
316 Destroy current tab
317 .Pq Cm tabclose
318 .It Cm U
319 Undo close tab
320 .Pq Cm tabundoclose
321 .It Cm C-Left
322 Go to the previous tab
323 .Pq Cm tabprevious
324 .It Cm C-Right
325 Go to the next tab
326 .Pq Cm tabnext
327 .It Cm C-[1..9]
328 Jump to page
329 .Ar N
330 .Pq Cm tabnext [1..9]
331 .It Cm C-minus
332 Zoom out by 4%
333 .Pq Cm focusout
334 .It Cm C-plus, C-equal
335 Zoom in by 4%
336 .Pq Cm focusin
337 .It Cm C-0
338 Set zoom level to 100%
339 .Pq Cm focusreset
341 .Ss Yanking and pasting
342 These commands copy and paste text to and from the clipboard.
344 .Bl -tag -width Ds -offset indent -compact
345 .It Cm p
346 Paste the contents of the clipboard into the address bar
347 .Pq Cm pasteuricur
348 .It Cm P
349 Paste the contents of the clipboard into a new tab
350 .Pq Cm pasteurinew
351 .It Cm y
352 Yank the current URL into the clipboard
353 .Pq Cm yankuri
355 .Ss Hyperlink Following
356 This allows the user to follow hyperlinks
357 without using a mouse.
358 Enter the corresponding number to follow the link.
359 Alternatively one can type the name of the link and when there are no more
360 possibilities
362 will follow the link.
364 .Bl -tag -width Ds -offset indent -compact
365 .It Cm f, '.'
366 Highlight all links and prefix them with a number.
367 .Pq Cm hinting
368 .It Cm F, ','
369 Highlight all links and prefix them with a number but open in a new tab.
370 .Pq Cm hinting_newtab
372 .Ss Exiting
373 Commands to exit the browser.
375 .Bl -tag -width Ds -offset indent -compact
376 .It Cm C-q
377 Quit
378 .Pq Cm quitall
380 .Ss Low-Contrast Color Scheme
381 This command toggles the page's style between the default CSS and a
382 low-contrast color scheme with light grey text on a dark grey background.
384 .Bl -tag -width Ds -offset indent -compact
385 .It Cm s
386 Toggle the current tab's style.
387 .Pq Cm userstyle
389 .Sh COMMAND MODE
390 Command mode works in a similar fashion to the
391 .Xr vi 1
392 editor;
393 it is entered by typing a colon and exited by typing Esc.
394 The commands and their descriptions are listed below.
395 .Bl -tag -width Ds -offset indent
396 .It Cm about , version
397 Show the "About" page.
398 .It Cm buffers , ls , tabs
399 Displays the currently open tabs and lets the user switch tab by typing
400 the tab number or using the mouse.
401 .It Cm ca
402 Display CA certificates.
403 .It Cm cert , cert show
404 Download and display certificates of domain on tab.
405 .It Cm cert save
406 Save certificate into a local store.
407 The next time the site is visited it is compared against the store.
408 If the certificate matches,
409 the address bar will be blue;
410 if it doesn't the bar will be red.
411 .It Cm cookie
413 .Cm cookie
414 command is used to manipulate the cookie whitelist.
415 Used by itself it expands to
416 .Cm cookie show all .
417 .It Cm cookiejar
418 Show cookie jar contents.
419 .It Cm cookie save, cookie save fqdn
420 Save the current fully qualified domain name (FQDN)
421 to the persistent whitelist.
422 For example,
423 the www.peereboom.us domain would result in saving .www.peereboom.us.
424 .It Cm cookie save domain
425 Save the top level domain name to the persistent whitelist.
426 For example,
427 the www.peereboom.us domain would result in saving .peereboom.us.
429 This action enables cookies if it is currently disabled for this entry.
430 .It Cm cookie show all
431 Show all persistent and session entries in the cookie whitelist.
432 .It Cm cookie show persistent
433 Show all persistent entries in the cookie whitelist.
434 .It Cm cookie show session
435 Show all session entries in the cookie whitelist.
436 .It Cm cookie toggle domain
437 Toggle cookie support for the current top level domain.
438 .It Cm cookie toggle, cookie toggle fqdn
439 Toggle cookie support for the current FQDN.
440 .It Cm dl
441 Show download manager.
442 .It Cm encoding <encoding>
444 .Cm <encoding>
445 is set the tab's encoding will be set to
446 .Cm <encoding>
449 reloads the tab.
451 .Cm <encoding>
452 is not set
454 will display the current tab encoding.
455 .It Cm fav
456 Show favorites.
457 .It Cm favadd
458 Add the current page to favorites.
459 .It Cm fullscreen , f
460 Toggle hiding tabs and url entry toolbar.
461 .It Cm h , hist , history
462 Show global history.
463 .It Cm help
464 Show help page.
465 .It Cm home
466 Go to home URL.
467 .It Cm js
469 .Cm js
470 command is used to manipulate the Java Script whitelist.
471 Used by itself it expands to
472 .Cm js show all .
473 .It Cm js save, save fqdn
474 Saves the FQDN to the persistent whitelist.
475 For example,
476 the www.peereboom.us domain would result in saving .www.peereboom.us.
477 .It Cm js save domain
478 Saves the top level domain name to the persistent whitelist.
479 For example,
480 the www.peereboom.us domain would result in saving .peereboom.us.
482 This action enables Java Script if it is currently disabled for this entry.
483 .It Cm js show all
484 Shows all persistent and session entries in the JS whitelist.
485 .It Cm js show persistent
486 Shows all persistent entries in the JS whitelist.
487 .It Cm js show session
488 Shows all session entries in the JS whitelist.
489 .It Cm js toggle, js toggle fqdn
490 Toggle Java Script execution for the current FQDN.
491 .It Cm js toggle domain
492 Toggle Java Script execution for the current top level domain.
493 .It Cm open , op , o URL
494 Open URL.
495 .It Cm plugin
497 .Cm plugin
498 command is used to manipulate the plugin whitelist.
499 Used by itself it expands to
500 .Cm plugin show all .
501 .It Cm plugin save, save fqdn
502 Saves the FQDN to the persistent whitelist.
503 For example,
504 the www.peereboom.us domain would result in saving .www.peereboom.us.
505 .It Cm plugin save domain
506 Saves the top level domain name to the persistent whitelist.
507 For example,
508 the www.peereboom.us domain would result in saving .peereboom.us.
510 This action enables plugins if they are currently disabled for this entry.
511 .It Cm plugin show all
512 Shows all persistent and session entries in the plugin whitelist.
513 .It Cm plugin show persistent
514 Shows all persistent entries in the plugin whitelist.
515 .It Cm plugin show session
516 Shows all session entries in the plugin whitelist.
517 .It Cm plugin toggle, plugin toggle fqdn
518 Toggle plugin execution for the current FQDN.
519 .It Cm plugin toggle domain
520 Toggle plugin execution for the current top level domain.
521 .It Cm print
522 Print page.
523 .It Cm qa , qall , quitall
524 Quit
525 .Nm .
526 .It Cm quit , q
527 Close current tab and quit
529 if it is the last tab.
530 .It Cm restart
531 Restart
533 and reload all current tabs.
534 .It Cm run_script [path_to_script]
535 Runs the script path_to_script with the current uri as the argument.
536 If path_to_script is not provided, the value of default_script is used
537 instead.
538 .It Cm session , Cm session show
539 Display the current session name.
540 By default the session name is main_session.
541 To create a new session use the
542 .Cm session save
543 command.
544 A session is defined as the lifetime of the browser application.
545 .It Cm session delete <session_name>
546 Delete session session_name from persistent storage.
547 If session_name is the current session then the session will revert to
548 main_session.
549 .It Cm session open <session_name>
550 Open session_name and close all currently open tabs.
551 Going forward this session is named session_name.
552 .It Cm session save <session_name>
553 Save current tabs to session_name session.
554 This will close the current session and going forward this session is named
555 session_name.
556 .It Cm set
557 The set command is used to inspect, clear or change runtime options.
558 There are 3 methods to use
559 .Cm :set .
560 When used by itself as
561 .Cm :set
562 the command displays all options as currently set.
564 To set a value use
565 .Cm :set option=value .
566 For example,
567 .Cm :set http_proxy=http://127.0.0.1:8080 .
569 To clear a value use
570 .Cm :set option= .
571 For example,
572 .Cm :set http_proxy= .
574 Note, not all options can be set at runtime.
575 .It Cm stats
576 Show blocked cookie statistics.
577 These statistics vary based on settings and are not persistent.
578 .It Cm statustoggle , statust
579 Toggle status bar.
580 .It Cm tabclose , tabc
581 Close current tab.
582 .It Cm tabhide
583 Hide tabs.
584 .It Cm tabnew , tabedit , tabe URL
585 Create new tab and optionally open provided URL.
586 .It Cm tabnext , tabn
587 Go to the next tab.
588 .It Cm tabprevious , tabp
589 Go to the previous tab.
590 .It Cm tabshow
591 Show tabs.
592 .It Cm toplevel , toplevel toggle
593 Toggle the top level domain name cookie and JS session whitelist.
594 This is to enable/disable short lived full site functionality without
595 permanently adding the top level domain to the persistent whitelist.
596 .It Cm urlhide , urlh
597 Hide url entry and tool bar.
598 .It Cm urlshow , urls
599 Show url entry and tool bar.
600 .It Cm w
601 Save open tabs to current session.
602 The tabs will be restored next time the session is opened.
603 See the session command for additional details.
604 .It Cm wq
605 Save open tabs and quit.
606 The tabs will be restored next time
608 the session is opened.
609 See the session command for additional details.
611 .Sh BUFFER COMMANDS
612 In addition to shortcuts and commands
614 provides buffer commands. Buffer commands are short, multi character
615 vi-like commands, often requiring an argument. Partial buffer commands
617 displayed in the buffer command statusbar element (see
618 .Cm statusbar_elems ) .
619 Pressing Esc or switching to another tab cancels a partially entered
620 buffer command. In the following list
621 .Cm arg
622 denotes the argument a buffer command accepts. Buffer commands are
623 defined as extended regular experssions.
624 Note that if a character is used as a shortcut it will not be interpreted
625 as the beginning of a buffer command. This is the case with
626 .Cm 0 .
628 .Bl -tag -width "['][a-zA-Z0-9]XXX" -offset indent -compact
629 .It Cm gg
630 go to the top of the page
631 .It Cm gG
632 go to the bottom of the page
633 .It Cm [0-9]+%
634 go to the
635 .Cm arg
636 percent of the page
637 .It Cm [0-9]*gU
639 .Cm arg
640 levels up. If
641 .Cm arg
642 is missing, 1 is assumed. Going a
643 level up means going to a uri obtained from the current one by removing
644 the last slash ('/') character and everything that follows it
645 .It Cm gh
646 open the home page in the current tab
647 .It Cm m[a-zA-Z0-9]
648 set a mark denoted by
649 .Cm arg
650 at the current page position. These marks behave like those in vi or
651 less.
652 .It Cm ['][a-zA-Z0-9]
653 go to the position where mark
654 .Cm arg
655 was set
656 .It Cm M[a-zA-Z0-9]
657 set the current uri as quickmark
658 .Cm arg
659 .It Cm go[a-zA-Z0-9]
660 open the uri marked as quickmark
661 .Cm arg
662 in the current tab
663 .It Cm gn[a-zA-Z0-9]
664 open the uri marked as quickmark
665 .Cm arg
666 in a new tab
667 .It Cm [0-9]+t
668 activate tab number
669 .Cm arg
670 .It Cm ZZ
671 quit
673 .It Cm ZR
674 restart
676 .It Cm zi
677 zoom in by 4%
678 .It Cm zo
679 zoom out by 4%
680 .It Cm z0
681 set zoom level to 100%
682 .It Cm [0-9]+Z
683 set zoom level to
684 .Cm arg
687 .Sh QUICKMARKS
688 Quickmarks are like bookmarks, except they are refered to by a single
689 character (a letter or a digit), instead of a longer name. See the
690 .Cm M[a-zA-Z0-9] ,
691 .Cm go[a-zA-Z0-9]
693 .Cm gn[a-zA-Z0-9]
694 buffer commands for usage. Quickmarks are stored in
695 .Pa ~/.xxxterm/quickmarks
696 and are saved automatically after each
697 .Cm M[a-zA-Z0-9]
698 buffer command.
699 .Sh ABOUT SCREENS
700 The about screens are internally generated web pages by
702 for user interaction.
703 These are entered in the address bar and the format is
704 .Cm about:screen
705 where screen is the desired screen to display.
706 For example about:favorites.
707 Any about screen can be used as the home page as specified by
708 .Cm home
709 in the configuration file.
711 .Bl -tag -width "downloadsXXX" -offset indent -compact
712 .It Cm about
713 show the about screen
714 .It Cm blank
715 show a blank screen
716 .It Cm cookiewl
717 show the cookie whitelist screen
718 .It Cm cookiejar
719 show the cookiejar screen
720 .It Cm downloads
721 show the downloads screen
722 .It Cm favorites
723 show the favorites screen
724 .It Cm help
725 show the help web page
726 .It Cm history
727 show the history screen
728 .It Cm jswl
729 show the Java Script whitelist screen
730 .It Cm set
731 show the settings screen
732 .It Cm stats
733 show the statistics screen
735 .Sh WHITELISTS
736 This section describes advanced usage settings.
737 Most users should use
738 .Cm browser_mode
739 instead to setup
741 and skip over this section.
744 has a number of whitelists to control blocking cookies and Java Script
745 execution for FQDNs or domains.
746 When properly enabled these whitelists require either the FQDN or top level
747 domain to exist in the whitelists in order to allow cookies to be stored or
748 Java Script to execute.
749 Both Java Script and cookies have two whitelists associated with them.
750 The whitelists are called session and persistent.
751 Items in the session whitelists are only allowed for the lifetime of the
753 instance.
754 Items in the persistent whitelists are stored on disk and are restored
755 upon restarting.
757 Setting up the whitelists is a little tricky due to intricacies of WebKit.
758 In fact the semantics are different for cookies and Java Script.
760 Cookie whitelist requires the following configuration to be set:
762 .Bl -tag -width "enable_cookie_whitelistXXX" -offset indent -compact
763 .It Cm cookies_enabled
764 This is a WebKit setting and must be set to
765 .Pa 1
766 (ENABLED)
767 in order to be able to use a
768 cookie whitelist.
769 .It Cm enable_cookie_whitelist
770 This needs to be set to
771 .Pa 1
772 to enable the cookie whitelist functionality.
773 .It Cm cookie_wl
774 These entries in the configuration file are the actual domains names in the
775 cookie whitelist.
778 Java Script whitelist requires the following configuration to be set:
780 .Bl -tag -width "enable_js_whitelistXXX" -offset indent -compact
781 .It Cm enable_scripts
782 This is a WebKit setting and must be set to
783 .Pa 0
784 (DISABLED)
785 in order to be able to use a
786 Java Script whitelist.
787 .It Cm enable_js_whitelist
788 This needs to be set to
789 .Pa 1
790 to enable the Java Script whitelist functionality.
791 .It Cm js_wl
792 These entries in the configuration file are the actual domains names in the
793 Java Script whitelist.
796 Plugin whitelist requires the following configuration to be set:
798 .Bl -tag -width "enable_plugin_whitelistXXX" -offset indent -compact
799 .It Cm enable_plugins
800 This is a WebKit setting and must be set to
801 .Pa 1
802 (ENABLED)
803 in order to be able to use a
804 plugin whitelist.
805 .It Cm enable_plugin_whitelist
806 This needs to be set to
807 .Pa 1
808 to enable the plugin whitelist functionality.
809 .It Cm pl_wl
810 These entries in the configuration file are the actual domains names in the
811 plugin whitelist.
814 See the
815 .Pa FILES
816 section for additional configuration file entries and details
817 that alter runtime behavior.
818 .Sh FILES
819 .Bl -tag -width "/etc/xxxterm.confXXX" -compact
820 .It Pa ~/.xxxterm.conf
822 user specific settings.
823 .It Pa ~/.xxxterm
825 scratch directory.
829 tries to open the user specific file,
830 .Pa ~/.xxxterm.conf .
831 If that file is unavailable,
832 it then uses built-in defaults.
834 The format of the file is \*(Ltkeyword\*(Gt = \*(Ltsetting\*(Gt.
835 For example:
837 .Dl http_proxy = http://127.0.0.1:8080
839 Enabling or disabling an option is done by using 1 or 0 respectively.
841 The file supports the following keywords:
843 .Bl -tag -width "enable_cookie_whitelistXXX" -offset indent -compact
844 .It Cm alias
845 Defines an alias for a given URL, so that the URL is loaded when the alias is
846 entered in the address bar.
847 If the aliased URL includes a %s format specifier, then any argument given after
848 the alias on the address bar is substituted.
849 For example, if g,http://www.google.com/search?q=%s is defined as an alias,
850 then the URL http://www.google.com/search?q=foo is loaded when navigating to
851 "g foo".
852 .It Cm allow_volatile_cookies
853 If set cookies are stored in the session cache but will be discarded once
855 exits.
856 Unfortunately enabling this does allow for some limited tracking on the web.
857 .It Cm append_next
858 When set a new tab is appended after the current tab instead of being appended
859 as the last tab.
860 .It Cm autofocus_onload
861 When set a tab that is loaded will attempt to autofocus the default input
862 entry.
863 This is only done for tabs that are currently visible.
864 .It Cm browser_mode
867 browser has 3 default operating modes:
868 .Pa normal
869 (the default),
870 .Pa whitelist
872 .Pa kiosk .
873 In the
874 .Pa normal
875 mode the browser allows all cookies, plugins and Java Script as any other
876 browser would.
877 This means that all cookies are saved to persistent storage and that all
878 Java Script and plugins run.
880 On the other hand, using the
881 .Pa whitelist
882 mode enables whitelists.
883 This requires the user to add all the required
884 .Pa cookie_wl ,
885 .Pa js_wl
887 .Pa pl_wl
888 items.
889 If a domain does not appear in the whitelists
891 disallows cookies, Java Script and plugin execution.
894 .Pa kiosk
895 mode the browse works just like
896 .Pa normal
897 mode however the toolbar only has the backward, forward and home button.
899 This setting must be the first entry in
900 .Pa ~/.xxxterm.conf
901 because it sets advanced settings that can be overridden later in the file.
902 See the default config file for more details.
903 .It Cm cmd_font
904 Set the command prompt font.
905 E.g.
906 .Pa cmd_font = monospace normal 9 .
907 .It Cm cookie_policy
908 This field delineates the cookie policy.
909 Possible values are: no3rdparty, reject 3rd party cookies.
910 accept, accept all cookies.
911 reject, reject all cookies.
912 .It Cm cookie_wl
913 This is a cookie whitelist item.
914 Use multiple times to add multiple entries.
915 Valid entries are for example *.moo.com and the equivalent .moo.com.
916 A fully qualified host is also valid and is for example www.moo.com.
917 .It Cm cookies_enabled
918 Enable cookies.
919 .It Cm ctrl_click_focus
920 Give focus in newly created tab instead of opening it in the background.
921 .It Cm default_script
922 Path to the script used as the default value for the run_script
923 command.
924 .It Cm default_zoom_level
925 Set the default browsing zoom level.
926 .It Cm download_dir
927 Locations where files are downloaded to.
928 This directory must exist and
930 validates that during startup.
931 .It Cm enable_cookie_whitelist
932 When enabled all cookies must be in the whitelist or they are rejected.
933 Additionally whitelisted cookies also enable HTML5 local storage for the
934 domain.
935 .It Cm enable_js_whitelist
936 When enabled all domains must be in the js whitelist in order to run Java
937 Script.
938 NOTE: Make sure
939 .Cm enable_scripts
940 is set to 0.
941 .It Cm enable_plugin_whitelist
942 When enabled all domains must be in the plugin whitelist in order to run
943 plugins.
944 NOTE: Make sure
945 .Cm enable_plugins
946 is set to 0.
947 .It Cm enable_plugins
948 Enable external plugins such as Flash and Java.
949 .It Cm enable_scripts
950 Enable Java Script.
951 .It Cm enable_socket
952 When enabled the first instance of
954 will create a socket in the
955 .Pa ~/.xxxterm
956 directory.
957 Using the -n url option on subsequent
959 invocations will cause the specified URL to be loaded in a new tab.
960 Only a user with identical UID and GID can use this option.
961 .It Cm enable_localstorage
962 Enable html5 Local Storage.
963 .It Cm enable_spell_checking
964 Enables spell checking. Preferred languages can be set using
965 .Cm spell_check_languages
966 option.
967 .It Cm encoding
968 Set the default encoding.
969 E.g.
970 .Pa encoding = ISO-8859-1 .
971 .It Cm fancy_bar
972 Enables a backward, forward, and stop button to the toolbar.
973 Additionally if
974 .Cm search_string
975 is set it'll enable an entry box for searches.
976 .It Cm guess_search
977 When enabled
979 will try to guess if the string you entered, in the URI entry widget or
980 the command widget, is term you want to search for using search_string
981 (see above).
982 If the string does not contain a dot nor a slash, is not a
983 path to a local file and does not resolves to an IP then it is assumed
984 to be a search term.
985 .It Cm history_autosave
986 When enabled
988 will save all command and search history.
989 Upon restarting
991 the saved command and search history will be restored.
992 .It Cm home
993 Homepage in URL format.
994 .It Cm http_proxy
995 Proxy server in URL format.
997 overrides
998 .Cm http_proxy
999 if it is specified as an environment variable.
1000 It must be noted that on older webkit versions one MUST use an IP address and
1001 not a FQDN.
1002 This works as expected with webkit 1.4.2.
1004 If one desires to use a socks proxy then an intermediary tool must be used.
1005 It has been reported that tsocks works with
1006 .Nm .
1007 .It Cm icon_size
1008 Permits icon sizes to be changed if
1009 .Cm fancy_bar
1010 is enabled.
1011 Size 1 is small; 2 is normal; 3 through 6 are progressively larger.
1012 .It Cm js_wl
1013 This is a Java Script whitelist item.
1015 .Cm cookie_wl
1016 for semantics and more details.
1017 .It Cm max_connections
1018 The maximum number of connections that
1020 can open at once.
1021 .It Cm max_host_connections
1022 The maximum number of connections that
1024 can open at once to a given host.
1025 .It Cm mime_type
1026 Sets an action for a specific or default MIME type.
1027 For example, to download and view a pdf using kpdf set
1028 .Pa mime_type = application/pdf,kpdf .
1029 To set a default value use *, for example,
1030 .Pa mime_type = video/*,mplayer .
1031 Note that the action is only passed the URL and not all applications are
1032 capable of dealing with a URL and therefore one might have to create a wrapper
1033 script to download the content first.  Alternatively one can add the
1034 .Pa @
1035 in front of the MIME type to indicate "download first".
1036 For example,
1037 .Pa mime_type = @application/pdf,xpdf .
1038 When
1039 .Pa @
1040 is use the file will be downloaded to the
1041 .Pa download_dir
1042 before the MIME handler is called.
1043 .It Cm oops_font
1044 Set the font used to display error messages.
1045 E.g.
1046 .Pa oops_font = monospace normal 9 .
1047 .It Cm pl_wl
1048 This is a plugin whitelist item.
1050 .Cm cookie_wl
1051 for semantics and more details.
1052 .It Cm read_only_cookies
1053 Mark cookies file read-only and discard all cookies once the session is
1054 terminated.
1055 .It Cm refresh_interval
1056 Refresh interval while in the download manager.
1057 The default is 10.
1058 .It Cm resource_dir
1059 Directory that contains various
1061 resources such as icons.
1062 This is OS-specific and should be handled by the porter.
1063 .It Cm save_global_history
1064 If set the global history will be saved to
1065 .Pa ~/.xxxterm/history
1066 when quitting
1067 and restored at startup.
1068 See the
1069 .Sx KEY BINDINGS
1070 section above for how the global history is accessed.
1071 Global history is not saved to disk by default.
1072 .It Cm save_rejected_cookies
1073 Saves rejected cookies in cookie format in {work_dir}/rejected.txt.
1074 All cookies are saved and unlike a cookie jar they are never replaced.
1075 Make sure there is enough disk space to enable this feature.
1076 .It Cm search_string
1077 Default search engine string.
1078 See the
1079 .Pa xxxterm.conf
1080 file for details.
1081 .It Cm session_autosave
1082 Enable session auto-saving when changing state (e.g. adding or removing a tab).
1083 The session name is what is currently in use and is described in the
1084 .Cm session save
1086 .Cm session open
1087 commands.
1088 .It Cm session_timeout
1089 This value is the time that is added in seconds to a session cookie.
1090 .It Cm show_tabs
1091 Enable or disable showing tabs.
1092 .It Cm show_url
1093 Enable or disable showing the url and toolbar.
1094 .It Cm show_statusbar
1095 Enable or disable showing the status bar.
1096 .It Cm single_instance
1097 If set and
1098 .Cm enable_socket
1099 is enabled only one
1101 will be permitted to run.
1102 If there is a URL specified it will be opened in a new tab in the already
1103 running
1105 session.
1106 .It Cm spell_check_languages
1107 The languages to be used for spell checking, separated by commas. For example,
1108 en_US.
1109 .It Cm ssl_ca_file
1110 If set to a valid PEM file
1111 all server certificates will be validated against it.
1112 The URL bar will be colored green (or blue when saved ) when the certificate is
1113 trusted and yellow when untrusted.
1116 .Cm ssl_ca_file
1117 is not set then the URL bar will color all HTTPS connections red.
1119 WebKit only supports a single PEM file.
1120 Many OS' or distributions have many PEM files.
1121 One can simply concatenate all separate files into one large one.
1122 E.g.
1123 .Cm for i in `ls`; do cat $i >> cert.pem; done
1124 and use the resulting cert.pem file as the input to
1125 .Cm ssl_ca_file .
1126 It is advisable to periodically recreate the cert.pem file.
1127 .It Cm ssl_strict_certs
1128 If this value is set connections to untrusted sites will be aborted.
1129 This value is only used if
1130 .Cm ssl_ca_file
1131 is set.
1132 .It Cm statusbar_elems
1133 Define the components of the status bar. The possible components are:
1134 .Bd -literal -offset indent
1135 | - separator
1136 P - page progress percent
1137 B - buffer command
1138 Z - page zoom level
1140 The default is "BP".
1141 These components show nothing if there is nothing worth showing, like
1142 zoom amount 100%.
1143 .It Cm statusbar_font
1144 Set the status bar font.
1145 E.g.
1146 .Pa statusbar_font = monospace normal 9 .
1147 .It Cm tab_style
1148 Set the tab style to either
1149 .Cm normal
1150 - the default gtk notebook tabs, or
1151 .Cm compact
1152 for an alternative.
1153 You can switch the tab style with the
1154 .Pa tabnextstyle
1155 command.
1156 .It Cm tabbar_font
1157 Set the compact tab bar font.
1158 E.g.
1159 .Pa tabbar_font = monospace normal 9 .
1160 .It Cm url_regex
1161 This is the regular expression that is used to match what constitutes a valid
1162 URL when using
1163 .Pa guess_search .
1164 .It Cm user_agent
1165 Set to override the default
1167 user-agent string.
1168 .It Cm window_height
1169 Set the default height of the browser window.
1170 .It Cm window_width
1171 Set the default width of the browser window.
1172 .It Cm work_dir
1173 Set the work directory where all
1175 scratch files are stored.
1176 Default is
1177 .Cm ~/.xxxterm .
1178 .It Cm xterm_workaround
1179 When enabled
1181 will look additionally at CUT_BUFFER0 if PRIMARY clipboard is empty.
1182 Additionally when the PRIMARY clipboard is cleared it will copy CUT_BUFFER0
1183 into the PRIMARY clipboard.
1184 Default is 0.
1186 .Sh HISTORY
1188 was inspired by vimprobable2 and the bloat in other
1190 web browsers.
1191 .Sh AUTHORS
1192 .An -nosplit
1194 was written by
1195 .An Marco Peereboom Aq marco@peereboom.us ,
1196 .An Stevan Andjelkovic Aq stevan@student.chalmers.se ,
1197 .An Edd Barrett Aq vext01@gmail.com ,
1198 .An Todd T. Fries Aq todd@fries.net ,
1199 .An Raphael Graf Aq r@undefined.ch ,
1201 .An Michal Mazurek Aq akfaew@jasminek.net .
1202 .Sh BUGS
1203 When
1204 .Cm save_global_history
1205 is enabled
1207 is supposed to, in addition to restoring the global history, color the
1208 visited links accordingly; however due to bug #51747 in WebKit this does
1209 not happen.