Commit graph

1849 commits

Author SHA1 Message Date
Saul Reynolds-Haertle
90fa242e84 fix name of content state script to fit style 2018-09-02 16:25:34 -07:00
Saul Reynolds-Haertle
48f433c6a5 Clean up controller_content a bit more 2018-09-02 16:25:34 -07:00
Oliver Blanthorn
b5845d3f03 Add key suppression back 2018-09-02 16:25:34 -07:00
Saul Reynolds-Haertle
d1e6a86539 Janky proof of concept for per-tab state, incl mode and parsers
I've been programming on pure instinct for like five hours and I'm not
sure what exactly I did any more. I *think* that what I did was
something like:
* Split `state.ts` into `state.ts` and `content_state.ts`, then
  removed mode from state and moved it to content_state.
* Made the types in content_state.ts a hair more powerful
* Fixed all errors resulting from those two changes, in the process
  swapping state out for content_state wherever appropriate.
* Moved a couple excmds from background into content since they
  depended heavily on the mode and should live with the mode
* Split the controller in half, moving the parser logic to the content
  script and leaving acceptExCmds in the background
  version. content_controller forwards excmds to background script
  using messaging.
* Nuked the keydown_* code, since we no longer need to forward keys to
  the background.
* Went around fixing everything resulting from *those* changes, mostly
  the various perversions of keydown listeners
* Various tweaks here and there that probably didn't do anything but I
  was just changing things at random a third of the time and I really
  need to go through this and clean it up.

Things that work:
* excmds are nice now. each tab has its own commandline; they stay
  open when you navigate between tabs and you can come back to them
  after doing stuff in another tab and finish your command line input.
* keybinds that don't don't involve mode switching: `[[`, `]]`, `j`,
  `k`, `r`, etc, all still functional.
* You can turn on hinting mode and, again, navigate to another tab
  which will *not* be in hinting mode, do whatever you need to do
  there including excmds or more hinting, and then come back to finish
  the hint you started in the first tab
* You can exit hint mode by pressing escape. :P

Things that I broke:
* ...Actually quite a bunch of stuff, I think.
* I don't seem to be able to *finish* a hint any more. Sometimes I
  can't even get one key in.
2018-09-02 16:25:34 -07:00
Oliver Blanthorn
97416e3510
Merge pull request #967 from glacambre/fix_installnative
config.ts: Fix broken `:installnative` command
2018-09-02 14:41:22 +01:00
glacambre
0840c9eacb
config.ts: Fix broken :installnative command
https://github.com/tridactyl/tridactyl/pull/964 broke `:installnative`
because I forgot to convert both `nativeinstallcmd` and
`win_nativeinstallcmd` to the new format. This commit fixes that.
2018-09-02 15:18:31 +02:00
Oliver Blanthorn
0aa919f73d
Fix link to configuration 2018-09-02 11:08:26 +01:00
glacambre
8b8e8375b4
config.ts: Small improvements to doc/types
This commit turns tts settings into strings and adds documentation where
needed.
2018-09-02 11:52:21 +02:00
Oliver Blanthorn
b109e8d0a8
Make truncation clearer 2018-09-01 22:55:56 +01:00
glacambre
3e9c212b3e
Implement typechecking for known settings
This commit implements typechecking in the `:set` excmd. It uses metadata
to make sure the given argument is valid.

Some of the settings were stored as numbers in the config while they
were passed as strings to `:set()`. This prevented them from being
configurable. This has been fixed by turning them into string in the
config and ensuring that they are correctly deserialized when retrieved
from the config.

Note that there still are a few settings that are stored as int in the
config (namely the tts ones). This should probably be fixed at some
point but is not urgent as it has always been impossible to configure
them and nobody ever complained about it.
2018-09-01 22:45:48 +02:00
glacambre
a7f85f2f73
completions/Settings.ts: Add type and documentation to completion opts 2018-09-01 22:03:19 +02:00
glacambre
d705cbe8dc
gen_metadata.ts: Add metadata generation for classes
We now generate doc/type metadata for classes. In order to do this, we
added a level of indirection to the metadata object, this makes telling
the difference between classes and functions easier.
2018-09-01 21:51:08 +02:00
glacambre
cdb5d0ce83
build.sh: Improve compiler pass
This commit makes sure typescript targets es2016 when compiling
gen_metadata.ts and than when generating metadata, only the necessary
files are parsed (src/excmds.ts and src/config.ts for now). This
slightly improves build time.
2018-09-01 21:23:18 +02:00
glacambre
5c31e031cf
config.ts: Add type information to default_config
This commit adds type information to multiple default_config attributes.
This enables removing the "permitted values" bit in some of the comments
as TypeDoc displays type information when available.
2018-09-01 19:33:53 +02:00
glacambre
6d5f07b345
config.ts: Turn default_config into a class
This commit turns default_config into a class. This is useful because
TypeDoc's layout for classes is better than the one for object literals.

On top of that, default_config being a class will help with adding type
information to settings, which will in turn let us generate config
metadata that we will then be able to use to typecheck `:set` and to
provide more information in completions.
2018-09-01 19:16:45 +02:00
Oliver Blanthorn
2ae20799f2
Merge pull request #963 from glacambre/ignore_bg_errors
background.ts: Ignore errors when TabLeft/TabEnter can't be triggered
2018-09-01 17:19:36 +01:00
glacambre
d9069d5a02
background.ts: Ignore errors when TabLeft/TabEnter can't be triggered
When switching to or from a tab, Tridactyl sends a message to the
previously and newly-active tabs in order to trigger the TabLeft and
TabEnter autocommands.

This didn't work with privileged tabs as these tabs do not have a
content script. Instead, an exception was thrown. This commit adds
exception handling for these exceptions.
2018-09-01 17:20:34 +02:00
Oliver Blanthorn
1e24424cb5
Fix shebang, mark II 2018-08-31 15:52:34 +01:00
Oliver Blanthorn
ffd82223de
Fix shebang 2018-08-30 22:03:35 +01:00
Oliver Blanthorn
c1a7dfbab1
Merge branch 'configdocs' 2018-08-30 21:40:38 +01:00
Oliver Blanthorn
1f831cde48
Update config help, reset to master's CSS 2018-08-30 21:39:01 +01:00
Colin Caine
7b8fada4d3 Fix doc typo for :help 2018-08-30 13:47:35 +01:00
Colin Caine
a58f8a3439 scripts/pretty warn when we modify working copy 2018-08-29 11:32:07 +01:00
Colin Caine
8387846cda scripts/pretty prettify working tree copy if it matches staged version 2018-08-29 11:24:34 +01:00
Oliver Blanthorn
18c4c54b8a
Fix #937: Unset completion 2018-08-29 11:20:22 +01:00
Oliver Blanthorn
7e40a538cd
Remove conflict markers
CSS needs to be sanity checked - I have not done so
2018-08-29 11:17:33 +01:00
Oliver Blanthorn
3d7dbe1c1a
Update config 2018-08-29 11:07:12 +01:00
Oliver Blanthorn
fd218e060b
Merge branch 'master' of github.com:cmcaine/tridactyl into configdocs 2018-08-29 10:58:34 +01:00
Oliver Blanthorn
1afa2d77f6
Use glacambre's typedoc theme fork 2018-08-29 10:54:24 +01:00
Colin Caine
093f065580 scripts/pretty no longer modify working tree
Trying to avoid race conditions with your editor both in reading the
working tree and modifying the index (git staging area).
2018-08-29 10:34:03 +01:00
Oliver Blanthorn
48dfc0f3e7
Merge pull request #958 from quinoa42/fix-wrong-invocation-of-urlmodify
Fix the incorrect invocation of urlmodify in the tridactylrc example
2018-08-29 09:57:25 +01:00
quinoa42
a2a328aff7
Fixed the wrong invocation of urlmodify in the tridactylrc example 2018-08-29 10:00:53 +08:00
Oliver Blanthorn
15140b1bea
Fix #948: set newtab about:home kinda works subject to usual caveats 2018-08-28 15:44:04 +01:00
Oliver Blanthorn
3e41a5cb7d
Merge pull request #946 from willghatch/profiledir
Honor config.profiledir in getProfileDir
2018-08-28 13:04:40 +01:00
Oliver Blanthorn
4d37381253
Fix #954: only prevent / from being stolen in normal mode 2018-08-28 11:39:16 +01:00
Oliver Blanthorn
f2be755729
Merge pull request #949 from novel/bsd-native-install-sh
FreeBSD support for native install
2018-08-25 17:55:00 +01:00
Roman Bogorodskiy
d80ac1a32b FreeBSD support for native install
Handle FreeBSD's OSTYPE (which has "freebsdX.Y" format). While here,
convert OSTYPE check to use 'case' instead of if's/elif's.

For unknown OSTYPE fallback to the default Linux location.
2018-08-25 20:33:31 +04:00
Oliver Blanthorn
4f779c7df2
Merge pull request #947 from willghatch/env
use /usr/bin/env to find bash
2018-08-24 21:44:12 +01:00
William G Hatch
e77e2a07fb use /usr/bin/env to find bash 2018-08-24 13:38:49 -06:00
William G Hatch
d9a2fee6f1 Honor config.profiledir in getProfileDir 2018-08-24 13:35:53 -06:00
Oliver Blanthorn
a5d1686901
Merge pull request #942 from nbirnel/native-install-opensuse-941
fix native install on opensuse - issue 941
2018-08-23 23:04:42 +01:00
Noah Birnel
50fd234da2 fix native install on opensuse - issue 941
check $OSTYPE against "linux" as well as "linux-gnu"
2018-08-23 14:05:07 -07:00
Oliver Blanthorn
9c68598b06
release 1.13.3 2018-08-21 21:35:12 +01:00
Oliver Blanthorn
8b590b2635
Update changelog for 1.13.3 2018-08-21 21:34:48 +01:00
Oliver Blanthorn
3b6cddf971
Improve setting completion styling 2018-08-21 21:28:36 +01:00
Oliver Blanthorn
683bb1b2f1
Update changelog for 1.13.3 2018-08-21 20:12:02 +01:00
Oliver Blanthorn
ede3936b82
Add rudimentary settings completion
Obvious enhancements: allow for setting.key.subkey completion; add docstrings; add all options for settings.
2018-08-21 20:06:13 +01:00
Oliver Blanthorn
dda64e567d
Update changelog for 1.13.3 2018-08-21 19:15:10 +01:00
Oliver Blanthorn
2877cf139b
Merge branch 'make_excmd_completion_types_simpler' 2018-08-20 19:17:25 +01:00
Oliver Blanthorn
ed0f1ed20e
Remove excmd arguments on completion 2018-08-20 19:17:03 +01:00