about summary refs log tree commit diff stats
path: root/xxxterm.1
blob: 312ad5ef535229d056422366bceb08a6513c6177 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight
.\"	$xxxterm$
.\"
.\" Copyright (c) 2010 Marco Peereboom <marco@peereboom.us>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate$
.Dt XXXTERM 1
.Os
.Sh NAME
.Nm xxxterm
.Nd Lightweight web browser with vi key bindings
.Sh SYNOPSIS
.Nm xxxterm [-STVft] [uri ...]
.Sh DESCRIPTION
.Nm
is a minimalistic web browser that tries to stay out of the way so that
valuable screen real estate can be used for much more important stuff.
It has sane defaults and does not require one to learn a language to do any
configuration.
It was written by hackers for hackers and it strives to be small, compact and
fast.
.Pp
When
.Nm
starts up, it reads settings from its configuration file,
.Pa xxxterm.conf .
See the
.Sx CONFIGURATION FILES
section below.
.Pp
The following notation is used throughout this page:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It Cm M
Meta
.It Cm S
Shift
.It Cm C
Control
.It Cm M1
Mouse button 1
.El
.Pp
.Nm
is very simple in its use.
Most of the actions are initiated via key or mouse bindings.
See the
.Sx BINDINGS
section below for defaults and customizations.
.Sh CONFIGURATION FILES
.Nm
tries to open the user specific file,
.Pa ~/.xxxterm.conf .
If that file is unavailable,
it then uses built-in defaults.
.Pp
The format of the file is \*(Ltkeyword\*(Gt = \*(Ltsetting\*(Gt.
For example:
.Pp
.Dl http_proxy = http://127.0.0.1:8080
.Pp
Enabling or disabling an option is done by using 1 or 0 respectively.
.Pp
The file supports the following keywords:
.Pp
.Bl -tag -width "title_class_enabledXXX" -offset indent -compact
.It Cm ctrl_click_focus
Give focus in newly created tab instead of opening it in the background.
.It Cm read_only_cookies
Mark cookies file read-only and discard all cookies once the sessions is
terminated.
.It Cm cookies_enabled
Enable cookies.
.It Cm enable_scripts
Enable scripts.
.It Cm enable_plugins
Enable plugins.
.It Cm default_font_size
Set the default browsing font size.
.It Cm http_proxy
Proxy server in URI format.
.It Cm download_dir
Locations where files are downloaded to.
This directory must exist and
.Nm
validates that during startup.
.It Cm fancy_bar
Enables a backward, forward and stop button to the toolbar.
Additionally if search_string is set it'll enable an entry box for searches.
.It Cm search_string
Default search engine string.
See xxxterm.conf file for details.
.El
.Pp
.Nm
overrides http_proxy if it is specified as an environment variable.
.Sh BINDINGS
.Nm
provides many functions (or actions) accessed via key or mouse bindings.
.Pp
The current mouse bindings are described below:
.Pp
.Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
.It Cm C-M1
Open new tab with the clicked link.
.El
.Pp
The default key bindings are described below:
.Pp
.Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
.It Cm C-Q
quit
.It Cm F6
Focus on URI entry
.It Cm F5
Refresh page
.It Cm Backspace
Previous page
.It Cm M-Left
Previous page
.It Cm S-BackSpace
Forward page
.It Cm M-Right
Forward page
.It Cm j
Next line on page
.It Cm Down
Next line on page
.It Cm k
Previous line on page
.It Cm Up
Previous line on page
.It Cm G
Bottom of page
.It Cm End
Bottom of page
.It Cm gg
Top of page
.It Cm Home
Top of page
.It Cm Space
Page down
.It Cm PageDown
Page down
.It Cm PageUp
Page up
.It Cm l
Page right
.It Cm Right
Page right
.It Cm h
Page left
.It Cm Left
Page left
.It Cm $
Page far right
.It Cm 0
Page far left
.It Cm C-T
Create new tab with focus in URI entry
.It Cm C-W
Destroy current tab
.It Cm C-[1..0]
Jump to page N
.El
.Pp
Note: WebKit & GTK+ have many default key bindings that are not overruled and
therefore are available as-is.
.Pp
Command mode is entered by typing a colon and exited by typing Esc.
The commands and descriptions are listed below:
.Pp
.Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
.It Cm qa, qa!, q!
Quit
.Nm
.It Cm open, op, o <URI>
Open URI
.It Cm tabnew, tabedit, tabe [URI]
Create new tab and optionally open provided URI
.It Cm tabclose, tabc
Close current tab
.It Cm quit, q
Close current tab and quit
.Nm
if it is the last tab
.It Cm tabprevious, tabp
Go to the previous tab
.It Cm tabnext, tabn
Go to the next tab
.El
.Pp
.Sh FILES
.Bl -tag -width "/etc/xxxterm.confXXX" -compact
.It Pa ~/.xxxterm.conf
.Nm
user specific settings.
.It Pa ~/.xxxterm
.Nm
scratch directory.
.El
.Sh HISTORY
.Nm
was inspired by vimprobable2 and the bloat in other UNIX web browsers.
.Sh AUTHORS
.An -nosplit
.Pp
.Nm
was written by
.An Marco Peereboom Aq marco@peereboom.us
raise def block_input(self, sec=0): self.input_blocked = sec != 0 self.input_blocked_until = time() + sec def input_is_blocked(self): if self.input_blocked and time() > self.input_blocked_until: self.input_blocked = False return self.input_blocked def copy_config_files(self): if not (ranger.arg.clean or os.path.exists(self.confpath('scope.sh'))): import shutil shutil.copy(self.relpath('data/scope.sh'), self.confpath('scope.sh')) def confpath(self, *paths): """returns the path relative to rangers configuration directory""" if ranger.arg.clean: assert 0, "Should not access relpath_conf in clean mode!" else: return os.path.join(ranger.arg.confdir, *paths) def relpath(self, *paths): """returns the path relative to rangers library directory""" return os.path.join(ranger.RANGERDIR, *paths) def loop(self): """ The main loop consists of: 1. reloading bookmarks if outdated 2. letting the loader work 3. drawing and finalizing ui 4. reading and handling user input 5. after X loops: collecting unused directory objects """ self.env.enter_dir(self.env.path) gc_tick = 0 # for faster lookup: ui = self.ui throbber = ui.throbber loader = self.loader env = self.env has_throbber = hasattr(ui, 'throbber') try: while True: loader.work() if has_throbber: if loader.has_work(): throbber(loader.status) else: throbber(remove=True) ui.redraw() ui.set_load_mode(loader.has_work()) ui.handle_input() gc_tick += 1 if gc_tick > TICKS_BEFORE_COLLECTING_GARBAGE: gc_tick = 0 env.garbage_collect(TIME_BEFORE_FILE_BECOMES_GARBAGE) except KeyboardInterrupt: # this only happens in --debug mode. By default, interrupts # are caught in curses_interrupt_handler raise SystemExit finally: self.bookmarks.remember(env.cwd) self.bookmarks.save()