Commit Graph

1180 Commits

Author SHA1 Message Date
Oliver Caldwell
54ff2aa46c Merge remote-tracking branch 'TheCompiler/master' into relax-editor-templating 2016-01-31 22:43:58 +00:00
Oliver Caldwell
e9128ebb2a Relax editor templating
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.
2016-01-26 09:18:43 +00:00
Jakub Klinkovský
4d7e39470e Added paste-primary command
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
2016-01-21 22:30:43 +01:00
Florian Bruhin
c02183652f Fix starting with -c "" and add test.
Fixes #1169.
2016-01-20 18:20:19 +01:00
Felix Van der Jeugt
7ad871fab1 Merge remote-tracking branch 'source/master' 2016-01-18 21:45:47 +01:00
Florian Bruhin
c8538bdbb8 Fix config validation for String types.
Fixes #1231.
2016-01-18 07:29:15 +01:00
Florian Bruhin
df03099468 Fix completion for String config type.
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.
2016-01-12 18:53:53 +01:00
Felix Van der Jeugt
362db3d986 fix remarks 2016-01-05 22:45:52 +01:00
Felix Van der Jeugt
e28c1bf9b8 allow config files to be optional 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
d0979b9fac fix pep8 and pylint errors
Though I quite disagree on some remarks, as usual.
2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
38803375f5 add dictionary config value and fix wrong variable 2016-01-05 20:43:29 +01:00
Florian Bruhin
a97ba9aa09 Merge branch 'pdfjs' of https://github.com/Kingdread/qutebrowser into Kingdread-pdfjs 2016-01-05 07:21:26 +01:00
Florian Bruhin
a5f2ac5f03 Adjust copyright years. 2016-01-04 07:12:39 +01:00
Daniel Schadt
3a13e46c25 disable pdfjs by default 2015-12-20 19:24:41 +01:00
Daniel Schadt
8b141037ef Add setting value to enable/disable pdf.js 2015-12-20 19:24:41 +01:00
Florian Bruhin
24607fda8b Mark tabs -> auto-hide as removed as well.
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.
2015-12-11 08:50:26 +01:00
Florian Bruhin
10dd1b50b9 Split ConfigManager.read from constructor. 2015-12-11 08:50:26 +01:00
dylan araps
1bc8d10ac7 Added config option to change tab title alignment 2015-12-07 19:43:43 +11:00
Corentin Jule
d8d873f044 Fix typo for Pep257 2015-12-04 00:28:58 +01:00
Corentin Jule
1941af8add Fix TypeError on ConfigManager.remove_option 2015-12-03 20:48:50 +01:00
Florian Bruhin
7df01440a3 pylint: Remove unsubscriptable-object workaround.
https://bitbucket.org/logilab/pylint/issues/685/ was fixed in pylint 1.5.1.
2015-12-02 17:55:46 +01:00
Florian Bruhin
150a83d8f4 pylint: Remove unneeded supressions. 2015-12-01 22:03:58 +01:00
Florian Bruhin
a156d51844 Don't use for-else when returning. 2015-12-01 21:56:38 +01:00
Florian Bruhin
5f13fd2ece Merge branch 'log-javascript-console' of https://github.com/flv0/qutebrowser into flv0-log-javascript-console 2015-11-30 08:08:31 +01:00
Florian Bruhin
f93785a0be Merge branch 'conf-remove-special' of https://github.com/flv0/qutebrowser into flv0-conf-remove-special 2015-11-30 07:42:04 +01:00
Florian Bruhin
6e392f0f09 Add workarounds for pylint/astroid update. 2015-11-30 07:16:12 +01:00
Patric Schmitz
a8b808819a update log-javascript-console option documentation 2015-11-29 19:24:09 +01:00
Patric Schmitz
b9aa40ea74 remove config types special variable 2015-11-29 18:53:37 +01:00
Patric Schmitz
98a454a428 log-javascript-console -> [none, debug, info] 2015-11-29 18:37:11 +01:00
Patric Schmitz
03ba38578e set valid_values after __init__ consistently, move type validation out of class into pytest 2015-11-28 18:29:51 +01:00
Patric Schmitz
fdde05569c remove redundant __init__ and rely on base class 2015-11-28 18:29:51 +01:00
Patric Schmitz
c322130dc0 style changes 2015-11-28 18:29:51 +01:00
Patric Schmitz
6f65397dfe always set valid_values in __init__ instead of class scope variable 2015-11-28 18:29:51 +01:00
Patric Schmitz
9b453aaad5 revert config transformation 2015-11-28 18:29:51 +01:00
Patric Schmitz
9aaf5c18c1 set valid_values in __init__ methods, except for BaseType s.t. variable is shared across derived class scopes 2015-11-28 18:29:51 +01:00
Patric Schmitz
55edd9cda7 add valid_values = None to config basetype 2015-11-28 18:29:51 +01:00
Patric Schmitz
2867df4c21 revert log-javascript-console changes 2015-11-28 18:29:51 +01:00
Patric Schmitz
6431542eba fixes to config types, remove unneeded derived __init__ and call base __init__ 2015-11-28 18:29:51 +01:00
Patric Schmitz
2a705e2eb6 Make non-specialized config types String. Closes #1103 2015-11-28 18:29:51 +01:00
Patric Schmitz
75f9f2af8d get rid of redundant option description 2015-11-28 18:29:51 +01:00
Patric Schmitz
ff6d3e05a6 log-javascript-console now String option: none, debug, info
Make BaseType.valid_values per-instance variable
2015-11-28 18:29:51 +01:00
Daniel Schadt
d082c248a8 Disallow empty values in url-incdec-segments 2015-11-25 19:35:37 +01:00
Florian Bruhin
c73de6ea4d Change "Added binding ..." logs to vdebug. 2015-11-23 21:41:31 +01:00
xd1le
b9163c5079 doc: Document <unbound> in keys.conf.
Closes #1117.
2015-11-20 00:55:33 +11:00
Florian Bruhin
f20ffca540 Merge branch 'issue923' of https://github.com/lamarpavel/qutebrowser into lamarpavel-issue923 2015-11-17 19:43:35 +01:00
Lamar Pavel
46d335cdee Update list of user agents with new script. 2015-11-14 16:06:45 +01:00
Lamar Pavel
d745819715 Improve script to print entries grouped by browser
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.
2015-11-14 15:57:24 +01:00
Florian Bruhin
1da7996c3b Style fixes. 2015-11-13 22:27:41 +01:00
Florian Bruhin
d99f9a3a20 Improve :set error messages. 2015-11-10 22:09:36 +01:00
Florian Bruhin
54e2cea460 Fix some corner cases with :set. 2015-11-10 21:27:42 +01:00
Florian Bruhin
3fcc27636a Improve documentation for general -> editor. 2015-11-06 07:02:17 +01:00
Florian Bruhin
6c20190473 Merge branch 'master' of https://github.com/forkbong/qutebrowser into forkbong-master 2015-11-04 07:12:32 +01:00
Florian Bruhin
702842c977 configtypes: Handle max. recursion depth for Regex. 2015-11-04 07:02:23 +01:00
Panagiotis Ktistakis
dc06787f83 Make key config migration for clearing downloads. 2015-11-04 01:01:27 +02:00
Panagiotis Ktistakis
7dadd97f01 Implement :download-clear command.
Fixes #1013.
2015-11-03 20:27:02 +02:00
Florian Bruhin
d9af27670b Transform remove-finished-downloads=true to 1s.
2s seems rather long.
2015-11-02 17:58:08 +01:00
skinnay
11e5774f46 Changed _get_value_transformer function to take a dictionary mapping old
values to new values as input.
Added entry for changing remove-finished-downloads setting to new int
value.
2015-10-30 19:37:43 -04:00
skinnay
5a34fdfd0c Changed the functionality of "remove-finished-downloads" setting.
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.
2015-10-29 13:44:28 -04:00
Jonas Schürmann
fe32b349a5 Use duckduckgo.com instead of www.duckduckgo.com 2015-10-27 20:31:10 +01:00
Florian Bruhin
381d857f2c Revert "Add workarounds for issues with pylint tip."
This reverts commit 1d2683993e.
This causes a bad-option-value issue with the current pylint.
2015-10-26 22:05:21 +01:00
Florian Bruhin
1d2683993e Add workarounds for issues with pylint tip. 2015-10-26 21:20:11 +01:00
Florian Bruhin
34cc2870f4 Fix indents in configdata.py. 2015-10-26 06:23:07 +01:00
Florian Bruhin
9b3987febb Add some completions for hints -> chars. 2015-10-25 21:22:19 +01:00
Florian Bruhin
bb5e5137cd configtypes: Allow completions for String. 2015-10-25 21:18:06 +01:00
Florian Bruhin
f614e5b98a Add none value for colors -> tabs.indicator.system. 2015-10-24 16:01:32 +02:00
Daniel
ef8a681fcc Add TimestampTemplate config type
No more crash when 'completion->timestamp-format' is set to '%'.

Fixes #1039.
2015-10-21 17:23:39 +02:00
Lamar Pavel
45f9e61815 Fix pylint error (line too long) 2015-10-20 18:17:12 +02:00
Lamar Pavel
7703fa217b Add some UAs manually for diversity
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.
2015-10-20 17:28:22 +02:00
Lamar Pavel
6ebb37aa17 Update UA list and add script to fetch UAs
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.
2015-10-20 02:52:11 +02:00
Florian Bruhin
9f11990efc Rename scrollbar.padding/scrollbar.width. 2015-10-19 05:15:52 +02:00
Nathan Isom
d326cc050e correct style string, file modeline. 2015-10-18 14:11:22 -05:00
Nathan Isom
ec3cafc293 resolve merge conflicts and merge branch scrollbar. 2015-10-18 11:42:56 -05:00
Nathan Isom
b18549bbed Remove fontdict wrapper 2015-10-16 11:42:46 -05:00
Nathan Isom
09b18fbc68 edit colordict to match. 2015-10-16 10:55:17 -05:00
Nathan Isom
19c27a04e5 Add completion scrollbar settings. 2015-10-15 13:18:32 -05:00
Nathan Isom
0e186487f5 Revert "Don't pass config to stylesheets."
This reverts commit dc0e8b4626.
2015-10-15 12:36:24 -05:00
Nathan Isom
6843e9c413 typo in configdata.py. 2015-10-14 13:37:24 -05:00
Nathan Isom
e78b00cce2 Fix configdata.py typos, use scheme from url. 2015-10-14 13:22:28 -05:00
Nathan Isom
d7d4c232d0 Initial shot at issue #691 2015-10-14 13:10:24 -05:00
Florian Bruhin
12a11a5931 Revert "Remove colors -> tabs.bg.bar setting."
This reverts commit 801d2ae8e6.

This is still useful/needed for vertical tab bars.
2015-10-04 17:49:52 +02:00
Florian Bruhin
7ff881c3e3 Merge branch 'incdec-setting' of https://github.com/Kingdread/qutebrowser into Kingdread-incdec-setting 2015-10-04 17:04:40 +02:00
Florian Bruhin
801d2ae8e6 Remove colors -> tabs.bg.bar setting.
This isn't needed anymore after the recent tab width fix, as the tabbar color
is invisible now.
2015-10-04 16:32:45 +02:00
Florian Bruhin
d229e90724 Fix some splelling mistakes. 2015-10-04 15:41:42 +02:00
Daniel
73ba3ddaee Add all possible combinations to FlagList.complete 2015-10-02 18:53:03 +02:00
Florian Bruhin
7761dd5af4 configtypes: Disallow ValidValues without values. 2015-10-02 11:37:41 +02:00
Florian Bruhin
d6301beb2a Improve configtypes.Regex tests and docs. 2015-10-01 23:24:27 +02:00
Florian Bruhin
16ac3baf2e configtypes: Handle invalid escapes in regexes. 2015-10-01 23:11:48 +02:00
Florian Bruhin
e4a216e7cf configtypes: Refactor regex validation. 2015-10-01 22:29:24 +02:00
Daniel
8228a96180 Stylistic changes, more testing for incdec 2015-10-01 20:57:08 +02:00
Daniel
4881d81444 Add new configtype: FlagList
This class contains validation code shared by ConfirmQuit and
URLSegmentList, that is it checks for duplicate values and compares
each value to valid_values.
2015-10-01 00:40:21 +02:00
Florian Bruhin
7fcbbc98f6 Merge branch 'scroll_in_title' of https://github.com/averrin/qutebrowser into averrin-scroll_in_title 2015-09-30 21:16:36 +02:00
Daniel
1bdb012b2c Add a config option for navigate_incdec
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'.
2015-09-30 19:18:00 +02:00
Alexey Nabrodov
75d53e2879 and again 2015-09-29 12:19:47 +03:00
Florian Bruhin
5db4ed0ed1 Add fallback argument to ConfigManager.get.
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.
2015-09-29 08:22:33 +02:00
Alexey Nabrodov
7cd7b43e7a fix docs 2015-09-28 19:53:55 +03:00
Alexey Nabrodov
1b6860b748 add scroll_pos to window title && fix signals 2015-09-28 19:43:50 +03:00
Alexey Nabrodov
717298e423 add scroll_pos to title-format 2015-09-25 19:14:52 +03:00
Florian Bruhin
f96de5a598 Add config for tab colors for odd/even sel. tabs. 2015-09-19 21:45:57 +02:00
Florian Bruhin
d9bad853e7 Merge branch 'wayland-deco' of ssh://tonks/qutebrowser 2015-09-17 21:00:17 +02:00
Florian Bruhin
ac27f46170 Add piwik.org to default whitelist. 2015-09-17 06:38:24 +02:00
Daniel
ccdb59cce1 Add adblock host whitelisting
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.
2015-09-16 16:31:17 +02:00
Florian Bruhin
f83f4a6a1a Add setting. 2015-09-16 08:52:51 +02:00
Florian Bruhin
ab9c046d54 Adjust default keybinding to clear-keychain on Esc.
Fixes #917.
2015-09-03 11:14:05 +02:00
Florian Bruhin
8d7249ebc6 Implement statusbar padding. 2015-08-27 22:12:39 +02:00
Florian Bruhin
355074f248 Add a . for spatial-navigation docs. 2015-08-20 11:11:31 +02:00
Florian Bruhin
a79c139aa4 Revert "style: Check for QColor when setting in ColorDict."
This reverts commit 9b82fae6fb.
2015-08-19 20:48:19 +02:00
Florian Bruhin
1d5cae3146 style: Use a collection.UserDict. 2015-08-19 20:46:02 +02:00
Florian Bruhin
b3395a1a9c style: Fix logging in ColorDict. 2015-08-19 20:39:31 +02:00
Florian Bruhin
9b82fae6fb style: Check for QColor when setting in ColorDict. 2015-08-19 20:39:16 +02:00
Florian Bruhin
dc0e8b4626 Don't pass config to stylesheets. 2015-08-19 20:38:19 +02:00
Florian Bruhin
45e7be4940 Increase default hint size a bit.
See #871.
2015-08-19 06:40:43 +02:00
Florian Bruhin
c55cb5b16b config.textwrapper: Remove *args.
textwrap.TextWrapper only takes kwargs.
2015-08-12 07:01:21 +02:00
Florian Bruhin
705544cb05 Merge branch 'gt' of git://github.com/t-wissmann/qutebrowser into t-wissmann-gt 2015-08-11 21:58:53 +02:00
Florian Bruhin
2980bc808e Remove dead configtypes code. 2015-08-11 20:15:42 +02:00
Thorsten Wißmann
da6d12a657 Make tab-focus (bound to gt) behave as in VIM
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
2015-08-11 10:50:27 +02:00
Florian Bruhin
fe3eb30892 Reorganize exceptions in urlutils.
- Instead of ValueError, a new InvalidUrlError is raised with invalid URLs.
- FuzzyUrlError got removed as it's basically the same as InvalidUrlError.
2015-08-09 18:48:32 +02:00
Florian Bruhin
5f122759db Fix config migration for tab position values. 2015-08-07 11:59:31 +02:00
Alexander Cogneau
8ffe73cc5f Change 'prompt-download-location' setting to 'prompt-download-directory' 2015-08-06 16:44:58 +02:00
Alexander Cogneau
9a85b66452 Merge remote-tracking branch 'upstream/master' 2015-08-06 16:40:48 +02:00
Florian Bruhin
c6c14e967d Change Position conftypes to top/bottom/left/right. 2015-08-05 23:37:51 +02:00
Florian Bruhin
15e854237e Fix exception on ":set -p foo bar!". 2015-08-04 23:50:43 +02:00
Alexander Cogneau
e43a1e6444 Added config option for prompting the user for a download location. 2015-08-04 16:30:55 +02:00
Florian Bruhin
7f3070f793 Remove : for configexc.NoOptionError. 2015-08-02 01:29:24 +02:00
Florian Bruhin
d8017a04a8 Mark old tabbar hide settings as removed. 2015-08-01 22:36:59 +02:00
Florian Bruhin
6b98158d64 Fix lint. 2015-08-01 22:21:08 +02:00
Artur Shaik
e58735f1d7 'Tabs show' recommendations applied. 2015-08-01 22:21:08 +02:00
Artur Shaik
b4d5f9e7a6 Tabs->show option.
Issue #771
Implemted common option for tab bar show strategy.
Options: always, never, multiple, switching.
2015-08-01 22:21:08 +02:00
Florian Bruhin
d6585202fd Remember the last used download directory.
Thanks to @Carpetsmoker for the original PR.

Closes #745.
Closes #37.
2015-08-01 14:19:06 +02:00
Florian Bruhin
81c3c2d15f Small config rewording. 2015-08-01 13:35:30 +02:00
Florian Bruhin
27f65be860 Merge branch 'referer-header' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-referer-header
Conflicts:
      tests/utils/test_urlutils.py
2015-08-01 12:44:57 +02:00
Florian Bruhin
451477593f Always require 4 values for padding. 2015-08-01 00:34:09 +02:00
Florian Bruhin
be88ba6f05 Remove indicator-space setting. 2015-07-31 18:55:17 +02:00
Florian Bruhin
fdcb69f5d4 Fix indicator layout and make it configurable. 2015-07-31 18:52:31 +02:00
Florian Bruhin
754c31850b Add configurable tab padding. 2015-07-31 17:24:35 +02:00
Florian Bruhin
452c4115d3 Add a Padding config type. 2015-07-31 15:38:41 +02:00
Florian Bruhin
16ac877227 Add default keybindings for loading bookmarks.
See #13, #681.
2015-07-26 16:42:47 +02:00
Florian Bruhin
b52a41ac6f Merge branch 'master' of https://github.com/antoyo/qutebrowser into antoyo-master
Conflicts:
      .gitignore
2015-07-26 15:08:58 +02:00
Florian Bruhin
c750ff3f50 configtypes: Handle invalid format syntax. 2015-07-26 13:56:46 +02:00
Florian Bruhin
4bdf00b148 configtypes: Handle {1} correctly. 2015-07-26 13:56:40 +02:00
Florian Bruhin
cbed62cafc Remove dead code.
This will already be checked by WebKitBytes._basic_validation.
2015-07-24 18:23:17 +02:00
Florian Bruhin
694fbe053d Fix lint. 2015-07-24 18:11:52 +02:00
Florian Bruhin
44bf4ae883 configtypes: Fix ' ' value with Command. 2015-07-24 17:56:12 +02:00
Florian Bruhin
b19852b6e7 configtypes: Add _basic_validation() to BaseType.
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.
2015-07-24 17:39:02 +02:00
Florian Bruhin
1fd386e57e configtypes: Get rid of typestr.
Closes #819.
2015-07-24 14:18:41 +02:00
Florian Bruhin
730a8afc6b configtypes: Handle empty values in ConfirmQuit 2015-07-24 00:24:04 +02:00
Florian Bruhin
e145d73852 configtypes: Add a MappingType base class. 2015-07-24 00:11:52 +02:00
Florian Bruhin
0b1704d829 configtypes: Add a __repr__ to ValidValues. 2015-07-24 00:11:52 +02:00
Florian Bruhin
a558f666bc configtypes: Be case-insensitive for Position. 2015-07-23 23:13:58 +02:00
Florian Bruhin
85e748df4f configtypes: Add else-branch to QtFont. 2015-07-23 16:57:28 +02:00
Florian Bruhin
b0c3f5381b configtypes: Add none_ok param to UserStyleSheet. 2015-07-23 16:57:14 +02:00
Florian Bruhin
c46abd8f89 Fix none_ok for RegexList and PercList. 2015-07-23 14:08:34 +02:00
Florian Bruhin
88416db6a3 configtypes: Make none_ok work for IntList. 2015-07-21 15:20:23 +02:00
Florian Bruhin
073504abb4 configtypes: Make none_ok public. 2015-07-21 15:17:28 +02:00
Florian Bruhin
1b643ff55f Handle empty values for ConfirmQuit conftype. 2015-07-21 13:00:01 +02:00
Antoni Boucher
fe829699be Merge remote-tracking branch 'upstream/master' 2015-07-11 17:40:43 -04:00
Florian Bruhin
11e88fbd12 Don't bind backspace by default.
Fixes #789.
2015-07-06 13:18:05 +02:00
Martin Tournoij
f806eefba6 Merge branch 'master' into referer-header 2015-06-27 20:43:54 +02:00
Florian Bruhin
bf4e968c67 Add new completion -> auto-open option.
Closes #557.
2015-06-27 19:55:04 +02:00
Florian Bruhin
ddf7f202d8 Set default for new-instance-open-target to tab. 2015-06-26 22:40:16 +02:00
Florian Bruhin
b7c3e7b959 Disallow {foo} in search engine URLs.
This causes an KeyError otherwise when trying to use str.format to insert the
search term.
2015-06-24 07:46:15 +02:00
Florian Bruhin
1cc6a6669b Bind <Alt-Backspace> to rl-unix-word-rubout. 2015-06-18 15:02:30 +02:00
Florian Bruhin
f17131f6c2 Change Qt links to point to qt.io. 2015-06-12 16:59:33 +02:00
Florian Bruhin
9b7b97d626 Improve docs. 2015-06-10 21:10:59 +02:00
Florian Bruhin
ab27612139 Merge branch 'more-color-settings' of https://github.com/ProtractorNinja/qutebrowser into ProtractorNinja-more-color-settings 2015-06-10 20:05:23 +02:00
Austin Anderson
3be9a9b051 Catalogued a configuration option change for updates. 2015-06-10 08:16:15 -04:00
Florian Bruhin
108e722c85 Add config migration. 2015-06-08 20:48:35 +02:00
Florian Bruhin
3b4fe97dbc Merge branch '3rd-party-cookies' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-3rd-party-cookies 2015-06-08 20:38:19 +02:00
Florian Bruhin
b5cd082e43 config: Make it possible to migrate values.
Needed for #729.
2015-06-08 19:34:11 +02:00
Florian Bruhin
5a2d909607 Update user-stylesheet docs. 2015-06-08 18:50:09 +02:00
Florian Bruhin
171a0f201b Merge branch 'relapaths' of https://github.com/lamarpavel/qutebrowser into lamarpavel-relapaths 2015-06-08 18:48:11 +02:00
Lamar Pavel
7f27c183be Include expandvars in File.validate
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.
2015-06-08 13:18:16 +02:00
Lamar Pavel
0e50760b70 Differentiate exceptions; remove obsolete test
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.
2015-06-08 12:53:59 +02:00
Antoni Boucher
57a72a7120 Refactored bookmark removal to use a command. 2015-06-07 19:36:19 -04:00
Antoni Boucher
cf4b89efe3 Merge remote-tracking branch 'upstream/master' 2015-06-07 14:38:17 -04:00
Florian Bruhin
6b94dc5279 Add continue to default next-regexes. 2015-06-07 17:20:52 +02:00
Florian Bruhin
def41e70bf Fix some spelling mistakes. 2015-06-07 01:24:02 +02:00
Lamar Pavel
5bacbc9d38 Remove obsolete try-except block 2015-06-06 14:07:57 +02:00
Lamar Pavel
de0686c50a Error messages and explicit test for None
Error messages for validate() are more specific.

Return of standarddir.conf() is explicitly tested for None to avoid ambiguity
with other falsey values.
2015-06-06 14:04:45 +02:00
Martin Tournoij
463e85ff5d Add referer-header setting, #712 2015-06-05 18:00:21 +02:00
Florian Bruhin
5fb23f1373 Also migrate older search calls. 2015-06-05 17:45:38 +02:00
Martin Tournoij
dfada850e0 Update code after refactor, and add migration 2015-06-05 16:52:33 +02:00
Martin Tournoij
fc4c7bd2e4 Merge the cookies-accept and third-party-cookie-policy settings 2015-06-05 16:20:50 +02:00
Lamar Pavel
402aa66756 Merge branch 'master' of github.com:The-Compiler/qutebrowser 2015-06-05 16:10:55 +02:00
Martin Tournoij
fa65f345ac Perhaps fix it more properly after all :-) 2015-06-05 15:19:40 +02:00
Martin Tournoij
0132bea42b Add --domain to yank to yank only the domain
... 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).
2015-06-04 12:20:43 +02:00
Martin Tournoij
78e159cb27 Add referer-header settng, #712 2015-06-04 01:26:00 +02:00
Martin Tournoij
472071c047 Add setting: 'content.third-party-cookie-policy', fixes #607
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 ;-)
2015-06-04 00:26:39 +02:00
Antoni Boucher
c8bbef0ab0 Fixed bookmark command name in config. 2015-06-01 19:49:32 -04:00
Florian Bruhin
d8e58b5886 Fix some typos. 2015-06-01 22:45:40 +02:00
Florian Bruhin
1bf036d1ba Add setting for the webpage bg color to use.
Fixes #719.
2015-06-01 22:27:15 +02:00
Florian Bruhin
b5a70dbdec Spelling fix. 2015-06-01 13:43:40 +02:00
Florian Bruhin
6c2fe3417e Accept numpad-enter as return in default bindings.
See https://bbs.archlinux.org/viewtopic.php?pid=1523326#p1523326
2015-06-01 13:39:13 +02:00
Antoni Boucher
1698c60124 Merge remote-tracking branch 'upstream/master' 2015-05-31 15:59:46 -04:00
Florian Bruhin
018d7a87be Merge branch 'modal-js-dialogs' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-modal-js-dialogs 2015-05-31 21:39:47 +02:00
Martin Tournoij
4204a8de9a Add ui.modal-js-dialog to restore the default JS dialogs 2015-05-31 21:32:16 +02:00
Antoni Boucher
c0b6aef774 Fixed command name. 2015-05-31 12:50:28 -04:00
Austin Anderson
b59dc8e89b Merge branch 'master' into more-color-settings 2015-05-30 15:56:11 -04:00
Austin Anderson
fed2cdad4e Cleaned up download configuration options. 2015-05-30 15:22:00 -04:00
Antoni Boucher
a56a14fb70 Added the possibility to open a selected link in a new tab. 2015-05-30 13:15:53 -04:00
Antoni Boucher
6ca541d359 Fixed issue #401. 2015-05-30 10:37:25 -04:00
Lamar Pavel
63c9e6a444 Another indentation-related fix 2015-05-28 13:20:00 +02:00
Lamar Pavel
f5d299d8c7 Fix intents 2015-05-28 13:05:12 +02:00
Lamar Pavel
b5eea81e2e Fix File.validate and corresponding tests
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.
2015-05-28 12:14:12 +02:00
Lamar Pavel
4851a3d442 Replace isabs with exists in transform
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.
2015-05-27 15:39:58 +02:00
Lamar Pavel
e12dce9d55 Include expandvars in File.transform, adjust test 2015-05-27 14:40:07 +02:00
Lamar Pavel
f326fa28a6 Merge branch 'master' into relapaths
Sync with upstream/master before creating a pull request
2015-05-27 11:57:13 +02:00
Lamar Pavel
f1129460d8 Class File now validates relative paths
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.
2015-05-26 13:54:27 +02:00
Lamar Pavel
c54c637ccc Class File not transforms relative paths
The code from function transform in class UserStyleSheet is now migrated to
class File.
2015-05-26 12:38:04 +02:00
Austin Anderson
a8d2dbfdfb Added downloads bar fg customization, and refactored the download's color-picking. 2015-05-25 20:47:16 -04:00
Austin Anderson
0553094494 Added explanation of *.system values to settings page. 2015-05-25 19:20:33 -04:00
Tobias Patzl
45dea54e3c Add setting to disable mousewheel tab switching.
See #374.
2015-05-25 15:23:14 +02:00
Antoni Boucher
ad763685e5 Added bookmark command default key binding. 2015-05-24 19:26:23 -04:00
Lamar Pavel
ad7920dda1 Fix bug; all tox tests succeed
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.
2015-05-23 16:49:40 +02:00
Lamar Pavel
93b92f4aab Fix tox failure regarding exceptions in transform
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.
2015-05-23 16:09:44 +02:00
Lamar Pavel
61f32b3e9b Revert some changes, trying to get rid of the tox failures 2015-05-22 18:40:56 +02:00
Lamar Pavel
14ba20670b Fix potential bug with missing path-expansion
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.
2015-05-22 17:31:37 +02:00
Lamar Pavel
29b25206f6 Fix UserStyleSheet, roll back File
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.
2015-05-22 17:21:00 +02:00
Lamar Pavel
58f031630c user-stylesheet can be read from relative paths
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/.
2015-05-22 14:44:04 +02:00
Florian Bruhin
b78d5f57aa Make new-instance-open-target docs more clear. 2015-05-19 06:13:29 +02:00
Florian Bruhin
9a1cf2b03a Fix deprecated config. 2015-05-18 22:36:10 +02:00
Florian Bruhin
8941b5dc96 Merge branch 'visual' 2015-05-18 21:43:25 +02:00
Florian Bruhin
3f98bf372e Merge branch 'smoke'
Conflicts:
      doc/qutebrowser.1.asciidoc
      qutebrowser/app.py
      qutebrowser/config/config.py
      qutebrowser/qutebrowser.py
      tox.ini
2015-05-17 00:28:56 +02:00
Florian Bruhin
9be5992a9a Smoke test WIP 2015-05-16 23:43:34 +02:00
Florian Bruhin
c762340a0c Add --datadir/--cachedir arguments. Closes #136. 2015-05-16 22:12:27 +02:00
Florian Bruhin
ad338e7a17 Add setting to enable/disable hyperlink auditing.
See #612.
2015-05-16 00:46:39 +02:00
Florian Bruhin
0cabedfeef Add settings to enable/disable CSS regions.
See #612.
2015-05-16 00:46:27 +02:00
Florian Bruhin
cd53318c7f Add setting to enable/disable WebGL.
See #612.
2015-05-16 00:31:13 +02:00
Florian Bruhin
f855d5f349 Add support for smooth scrolling.
See #612.
2015-05-15 23:53:08 +02:00
Florian Bruhin
f49dba6e38 Use fake key events for scrolling.
Closes #669.
Fixes #218.

See #246, #534.
2015-05-15 19:02:33 +02:00
Florian Bruhin
f8f8699ab8 Fix key config migration for rapid hinting. 2015-05-13 10:45:20 +02:00
Florian Bruhin
f6ef657952 Fix default search binding. 2015-05-13 08:26:56 +02:00
Florian Bruhin
a93bf184aa Fix lint. 2015-05-13 08:05:33 +02:00
Florian Bruhin
f59a147589 Leave mode when yanking by default.
See #653.
2015-05-13 07:58:33 +02:00
Florian Bruhin
866b299fef Fix adding of new default section to keyconf.
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.
2015-05-13 07:55:49 +02:00
Florian Bruhin
a74a9c8a21 Fix adding of new default section to keyconf.
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.
2015-05-13 07:54:06 +02:00
Florian Bruhin
88fc186402 Add tmux-like Enter binding.
See #653.
2015-05-13 07:29:59 +02:00
Florian Bruhin
dd0e230a32 Re-add v keybinding for toggle-selection.
See #653.
2015-05-13 07:29:59 +02:00
Austin Anderson
0d66647918 Set extra foreground colors to match the default by default. 2015-05-11 22:35:44 -04:00
Austin Anderson
1a2a57d59e Added command mode color configuration options.
Including necessary tracker variable _command_active.
2015-05-11 22:27:21 -04:00
Florian Bruhin
a36c0fcd4c Fix lint. 2015-05-11 20:32:27 +02:00
Florian Bruhin
d3c6ebcf15 Rename caret_selection to caret-selection. 2015-05-11 20:21:01 +02:00
Austin Anderson
244d2753df Reordered fg/bg statusbar color options
Options are now all fg, bg for each variant.
2015-05-10 15:33:58 -04:00
Florian Bruhin
99a4765e75 Fix confusing websetting log output. 2015-05-10 14:50:56 +02:00
Austin Anderson
69f729dbe5 Added foreground color settings for statusbar messages. 2015-05-09 18:07:40 -04:00
Artur Shaik
d936be450b Add jumps through text blocks in caret mode. 2015-05-07 12:19:35 +06:00
Florian Bruhin
9ceb43ec44 Make F (:hint tab) honour background-tabs.
Fixes #621.
2015-05-06 23:25:42 +02:00
Florian Bruhin
21dfcf1e1b Add some bindings to switch hint modes.
Fixes #613.
2015-05-06 22:38:41 +02:00
Florian Bruhin
9a5839650c Allow 'yes' value for geolocation/notifications.
Fixes #655.
2015-05-06 22:21:11 +02:00
Florian Bruhin
deb3c31f2f Merge branch 'refactor' 2015-05-06 21:51:04 +02:00
Florian Bruhin
2d91ff3f5d Fix line lengths. 2015-05-06 16:47:52 +02:00
Fritz V155 Reichwald
b98bafaefe Add C-M and C-J for every command that got Return as key 2015-05-06 16:33:12 +02:00
Fritz V155 Reichwald
8806aac362 Add Ctrl-M as keybind for command-accept 2015-05-06 16:11:30 +02:00
Artur Shaik
489c913e58 Implement caret selection and positioning
Added option to webview for selection enabled caret mode.
In status bar checking value of this option to identificate about it.

Added bindings: <Space> for toggle selection mode, <Ctrl+Space> drop
selection and keep selection mode enabled.

In webview added javascript snippet to position caret at top of the
viewport after caret enabling. This code mostly was taken from cVim sources.
2015-05-05 12:21:48 +06:00
Florian Bruhin
d3a7b2e4ca Big refactoring of app.py. 2015-04-30 07:37:25 +02:00
Florian Bruhin
32562c6878 Fix lint. 2015-04-28 16:50:42 +02:00
Florian Bruhin
640f758605 Merge branch 'master' into visual
Conflicts:
	qutebrowser/browser/commands.py
2015-04-28 15:54:26 +02:00
Florian Bruhin
6ca39dd851 Handle --relaxed-config for keys.conf as well. 2015-04-21 22:48:45 +02:00
Florian Bruhin
6c8e073dc8 Merge branch 'caret_visual_mode' of https://github.com/artur-shaik/qutebrowser into visual
Conflicts:
      qutebrowser/browser/commands.py
      qutebrowser/browser/webview.py
      qutebrowser/config/configdata.py
2015-04-21 21:29:00 +02:00
Florian Bruhin
3164ee06eb Handle new sections in KeyConfgParser._is_new(). 2015-04-21 18:32:32 +02:00
Florian Bruhin
9ee74253e4 Remove name annotation for cmdutils.register.
See #637.
2015-04-20 22:25:27 +02:00
Florian Bruhin
7439586334 Move special params to cmdutils.register decorator
See #637.
2015-04-20 19:33:05 +02:00
Florian Bruhin
508993ac68 Add a special <unbound> command for the keyconf.
When a default keybinding is unbound it'd get readded, so we add a new special
<unbound> "command" to the config, and keys listed there won't get rebound
automatically.

Also, :unbind now maps the key to <unbound> if it exists in the default config.

See #525.
2015-04-16 07:49:27 +02:00
Florian Bruhin
980b3506a3 Don't unnecessarily mark the key config as dirty. 2015-04-16 07:48:57 +02:00
Florian Bruhin
3cf6d1c185 Add missing new keybindings to config.
See #525.
2015-04-16 06:41:00 +02:00
Florian Bruhin
d8d29449ca Improve error message on duplicate keychains. 2015-04-14 07:13:52 +02:00
Florian Bruhin
982733e1f4 Allow commands with ;; with :bind. 2015-04-13 21:21:26 +02:00
Artur Shaik
a6443231e5 Add statusbar coloring for caret and visual modes 2015-04-13 19:50:27 +06:00
Artur Shaik
941eac848e Remove "c" key from normal -> caret mode key bindings 2015-04-13 18:37:33 +06:00
Florian Bruhin
c071bcbec8 Clean up loggers. 2015-04-13 08:49:04 +02:00
Florian Bruhin
d700d18780 Fix handling of no_cmd_split cmds with args.
When we have something like ":bind x foo;;bar" it wasn't recognized "bind" is a
no_cmd_split command because we tried to look up "bind x foo" in cmd_dict.

See #615.
2015-04-13 07:39:18 +02:00
Florian Bruhin
6b0c16f109 Fix default 'ga' binding. 2015-04-11 13:20:56 +02:00
Florian Bruhin
31bcc70efb Treat commands using ;; in key config as valid. 2015-04-10 19:45:59 +02:00
Florian Bruhin
8d98868ccd Fix deprecated default keybindings.
Those were auto-corrected with the next run, but still are bad...
2015-04-09 20:36:11 +02:00
Florian Bruhin
f77ba5744b Add a ui -> hide-mouse-cursor option. 2015-04-09 19:59:16 +02:00
Artur Shaik
695712e50c Basic caret and visual modes implementation
Allow user switch in caret mode for browsing with caret, and visual mode
for select and yank text with keyboard.

Default keybindings is c or v for caret mode, and again v for visual mode. All
basic movements provided by WebAction enum implemened with vim-like
bindings. Yanking with y and Y for selection and clipboard respectively.

There is bug/feature in WebKit that after caret enabled, caret doesn't
show until mouse click (or sometimes Tab helps). So I add some workaround
for that with mouse event. I think should be better aproach.

Signed-off-by: Artur Shaik <ashaihullin@gmail.com>
2015-04-09 22:55:42 +06:00
Joel Torstensson
12c83b721f Fixed some style errors. 2015-04-09 12:49:32 +02:00
Joel Torstensson
cc2c7c09ea Changing position without restart now possible. 2015-04-09 11:47:35 +02:00
Joel Torstensson
2fa66ba250 Added option for downloadview placement. 2015-04-09 11:44:59 +02:00
Florian Bruhin
1345a13a71 Add startpage/default-page to tabs -> last-close. 2015-04-07 17:36:19 +02:00
Florian Bruhin
20f0ef7ccc Ignore ;; for splitting with some commands.
Fixes #405.
2015-04-06 17:00:52 +02:00
Florian Bruhin
2876ba5cfa Pass a parent to global QObjects. 2015-04-06 00:10:37 +02:00
Florian Bruhin
9b8f5e3ff0 Make the default session name configurable.
See #523.
2015-04-05 23:30:43 +02:00
Florian Bruhin
476ccd8fe1 Add tab-bg{,-silent} to new-instance-open-target. 2015-04-05 21:34:41 +02:00
Florian Bruhin
1fdd7051c3 config: Filter docs for change_filter. 2015-04-04 22:03:28 +02:00
Florian Bruhin
57158e7191 Don't make default config a mutable global.
Before, configdata.DATA only existed once - that means when something
manipulated it, instantiating a new ConfigManager actually gave us the
*modified* rather than the default data.

There's still a (now readonly) configdata.DATA for performance reasons -
before, the settings completion model called data() many times, which caused
initializing of it taking a few (instead of nearly 0) seconds.

See https://github.com/hackebrot/qutebrowser/pull/16#discussion-diff-27770433
2015-04-04 22:01:02 +02:00
Florian Bruhin
b2df5a5b47 docs: Make it clear cache settings are global.
Closes #602.
2015-04-04 15:31:12 +02:00
Florian Bruhin
18dea8c7cb Add note about about:blank to default-page docs. 2015-04-04 15:10:22 +02:00
Florian Bruhin
217e788f4b Add 'cd' shortcut to clear downloads. 2015-04-04 15:02:08 +02:00
Florian Bruhin
068947ba7e Fix search engine syntax documentation.
We changed the syntax in 68398035ef but didn't
adjust the documentation.

See #14.
2015-04-03 20:54:27 +02:00
Florian Bruhin
6917c3b32d set-cmd-text: Add -s/--space argument.
We need this because quotes are ignored now, so there'd be no way to set the
text to ":open -t " for example.
2015-04-03 19:07:29 +02:00
Florian Bruhin
3b3b55234b Add a signal to KeyConfigParser to save config.
Before, we used the 'changed' signal for the SaveManager - however, that also
was emitted when only the internal structure changed. Now we add a new signal
for that.
2015-04-03 19:07:29 +02:00
Florian Bruhin
630a827afc Change CHANGED_KEY_COMMANDS to be regexes.
Break after first regex
2015-04-03 19:03:30 +02:00
Florian Bruhin
4e0712622b Clear search when :search without args is given.
Needed for #564 because :search "" won't work anymore.
2015-04-03 14:40:26 +02:00
Florian Bruhin
1dcc5a32d6 Correct keybindings to deprecated commands.
Needed for #564 (because of :search "").
Also see #525.
2015-04-03 14:14:20 +02:00
Florian Bruhin
18b5512fe9 Remove 'fooled' from state file. 2015-04-02 14:58:34 +02:00
Florian Bruhin
953119ef75 Revert "Minor QWebSettings fix."
Happy April's fools!

This reverts commit a98060e020.

Conflicts:
	qutebrowser/app.py
	qutebrowser/misc/utilcmds.py
2015-04-02 14:56:42 +02:00
Florian Bruhin
6e435ad215 Add state config sections when initializing. 2015-04-01 18:26:45 +02:00
Florian Bruhin
8ebac8d38c Various spelling fixes. 2015-03-31 21:11:47 +02:00
Florian Bruhin
a98060e020 Minor QWebSettings fix.
If you're reading the diff, congrats. Please be quiet and don't spoil the fun
for others though! :)
2015-04-01 00:06:34 +02:00
Florian Bruhin
2f629befc3 Add an option to disable host blocking. 2015-03-30 18:33:10 +02:00