Those were added in #443, inspired by luakit.
However, all other bindings follow dwb's defaults, and dwb uses `gt` for
showing buffers. To be consistent, let's rebind gt to show :buffer.
Before, in fonts -> _monospace we preferred Liberation Mono to Courier and
Courier New. Unfortunately, that font looks horrible on Windows if it's
installed, so let's avoid using it if possible.
On Linux, hopefully Courier New/Courier isn't available, and Liberation Mono
will get picked up instead (or one of the other alternatives).
I tried to set my editor to `termite -e "vim -f {}"`, termite being a
pretty cool and light terminal I use within my i3wm Arch linux box.
So when I open my editor I want it to launch a terminal with Vim inside
instead of GVim for various reasons.
The validation rejected this at first because it was looking for '{}'
inside ['foo', 'bar', 'baz {}'], essentially. So I need it to look
inside the sub-strings, not just the list.
Then after validation I need to perform the '{}' replacement inside the
sub-string too, not just replacing the whole string.
The Shift+Ins key should arguably insert primary selection, not the
clipboard selection as every Qt program does. This commit makes it
possible via the hidden paste-primary command (enabled by default).
Unfortunately QtWebKit does not provide any straightforward way to
insert text at cursor position into editable fields, so we work around
this by executing a JavaScript snippet - inspired by this SO answer:
http://stackoverflow.com/a/11077016
Since 2a705e2eb6 non-specialized config types are
String. However, String had an overloaded complete() which defaulted to
returning None.
Now we use the normal complete() which relies on valid_values if completions
isn't given instead.
Fixes#1223.
tabs -> hide-auto was removed in d8017a04a8
because it was easier to do so compared to transforming it correctly when tabs
-> show was introduced. However, tabs -> auto-hide (the even older version)
wasn't removed, breaking config migration from earlier versions.
Fixes#1171.
The ua_fetch.py has been re-written entirely to find specific entries for
each browser based on diversity rather than sole popularity. The output
is now formatted to print the entries for each browser grouped together.
Instead of being a boolean value indicating whether or not to instantly remove
downloads when they finish, it's now an integer value representing the
number of milliseconds to wait before removing downloads when they
finish. The default value, -1, means that the downloads will not be
removed when they finished. This is the same behavior as the previous
default value of false.
The automatically fetched list includes popular user-agents but does not
guarantee any kind of diversity, so there are now a few statically
printed UAs from mobile browsers.
The script is based on a gist posted by @averrin and has been modified
to print the output according to the format expected by qutebrowser,
ready to be pasted into configtypes.py.
This class contains validation code shared by ConfirmQuit and
URLSegmentList, that is it checks for duplicate values and compares
each value to valid_values.
Also known as Ctrl-A/Ctrl-X. You can now specify which parts of the URL
should be searched for numbers.
The setting is general->url-incdec-segments and it's a set with valid
values of 'host', 'path', 'query' and 'anchor'.
This is needed for interpolation since this change in Python 3.4:
https://hg.python.org/cpython/rev/267422f7c927
This broke qutebrowser in Debian experimental when updating python from
3.4.3-8 to 3.4.3-9 as they pulled from hg.
Fixes#968.
The config option "content host-blocking-whitelist" may contain comma
separated domains that are exempt from host blocking.
The listed domains may contain the wildcards "*" and "?" to match many
and one character, respectively.
You need to run :adblock-update after modifying the list.
If no count or index is given, tab-focus switches to the next tab (using
tab-next internally). So the keychain gt behaves as gt in vim:
- gt focuses the next tab
- 1gt focuses the first tab
- <n>gt (e.g. 5gt) focuses the n'th (e.g. fith) tab
This has a few implications:
- Checking for empty/none_ok is now easier as _basic_validation() does this.
- To make things easier, WebKitBytes and WebKitBytesList now need to have
none_ok passed as well instead of assuming True.
- _basic_validation() checks for unprintable chars and raises ValidationError
if they occur, so this gets checked for all types.
I thought I put this in here before, but apparently I did not. So here it is,
together with a new test to verify it. Other tests needed to be updated with a
mock for os.path.expandvars.
In function File.validate the try-except block has been re-written to
differentiate raised errors.
In function File.transform there was a check for validity of the file path that
is alraedy performed by File.validate under the same conditions. This check has
been removed.
Error messages for validate() are more specific.
Return of standarddir.conf() is explicitly tested for None to avoid ambiguity
with other falsey values.
... As I want to copy only the domain fairly frequently.
I also changed the message in the statusline to show the actual text being
copied, which I find helpful. But if you disagree, then just undo it (it's not
that important or anything).
This sets the third-party cookie policy.
- I created a new ThirdPartyCookiePolicy() class, since this setting seems to be
unique in the way it is set...
- I set the default to 'never', which is the most secure/private setting, but
*may* break *some* features of a (very) limited number of sites; these are
usually "non-critical" features.
For example, on Stack Exchange sites you're logged in all 200+ sites if you
sign in on one of them, this features required 3rd party cookies. You can
still sign in with out, but you have to do so 200+ times (this is actually the
only example I've ever noticed).
AFAIK all "major" browsers accept 3rd-party cookies by default, except for
Safari. Firefox also made this change, but reversed it (see:
https://brendaneich.com/2013/05/c-is-for-cookie/), but they don't offer any
good arguments to *not* have it IMHO, at least not that I could find.
In any case, in my humble opinion "secure and private by default" is the best
way to ship. But you're of course free to change it if you disagree ;-)
There were no tests regarding the return value of standarddir.config() and thus
it wasn't caught that it returned None in some cases. This is now fixed by
checking the return of standdarddir.config before calling it and modifying the
corresponding test_validate_exists_rel as well as adding a new
test_validate_rel_config_none.
In UserStyleSheet.transform os.path.isabs was replaced with os.path.exists, a
more fitting condition. Accordingly two test cases needed to include mocks for
os.path.exists and QUrl.fromLocalFile.
The code from function validate in class UserStyleSheet has been migrated to
class File. One test had to be modified due to different expected behaviour.
My logic in the validate function of class UserStyleSheet was faulty and
caused the check for encoding to be skipped. This is now fixed and all
tests run successfully.
Function transform is not supposed to raise exceptions, so I wrapped the
call to os.path.join in an if-clause to test if standarddir.config
returns a valid value.
The last commit removed two lines in function validate of class
UserStyleSheet that were expanding the path. As it turns out those two
lines are needed by validate as well as transform, so I outsourced them
to the function they both call at that point.
The former version of UserStyleSheet never actually loaded the css file,
this is now fixed. The changes to class File were rolled back as its
functions are overloaded by UserStyleSheet; a general solution in
classes File and Directory can be implemented when the changes in
UserStyleSheet meet the expectation.
This ist just a first draft to approach issue622
(https://github.com/The-Compiler/qutebrowser/issues/622) and my very
first babysteps with python.
With this change it is possible to set a user-stylesheet with a relative
path, eg.:
:set ui user-stylesheet mystyle.css
where mystyle.css is in the ~/.config/qutebrowser/.
When trying to add a new binding with multiple values, the bindings were added
immediately and the next _is_new() check returned False because the command was
already bound.
With this change, the new bindings first get added to a temporary dict so
_is_new() returns the correct result.
See #653.
When trying to add a new binding with multiple values, the bindings were added
immediately and the next _is_new() check returned False because the command was
already bound.
With this change, the new bindings first get added to a temporary dict so
_is_new() returns the correct result.
See #653.