Commit graph

642 commits

Author SHA1 Message Date
glacambre
e9aabaa865
Slightly improve documentation
This commit removes unnecessary documentation, tries to make the
introduction shorter and fleshes out the documentation of a few
under-documented functions.
2018-10-09 15:57:36 +02:00
glacambre
884b8fbe6d
Make :help configoption work
This commits makes getting to the help page of a configuration option
easier.
2018-10-09 15:57:10 +02:00
glacambre
7375f8b7db
Fix default config doc path
3ec27fd broke the path to the default config documentation when moving
directories around. This commits fixes that.
2018-10-09 15:01:49 +02:00
Oliver Blanthorn
d5de3bf91c
Revert "Turn :bmarks into a proper excmd"
This reverts commit ad5e9db562.

Fixes broken `tabopen -c [container] [url]`.
2018-10-08 22:01:15 +01:00
glacambre
771ce6f983
excmds.ts: Fix loadtheme breaking when loading some themes
When trying to load a theme named `test.css`, `loadtheme()` would
attempt to store it in the config as `test.css`. But the config stored
it as an object named `test` which contained a key named `css` and this
broked everything. This is fixed by making sure that users do not
specify the `.css` part of the theme themselves, instead it will be
automatically added when trying to load the file.

Documentation has been updated accordingly.
2018-10-08 14:47:31 +02:00
glacambre
9788600d5d
colourschemes: Add various small improvements
- Update the readme to mention `colors $theme` rather than `set theme
  $theme` because `colors` is more powerful than `set theme`.
- Update the doc
- Version bump native messenger and nativegate check
2018-10-08 14:47:27 +02:00
glacambre
113fd9ef80
Implement loading themes from disk.
This fixes https://github.com/cmcaine/tridactyl/issues/491.
2018-10-08 14:47:06 +02:00
glacambre
ad5e9db562
Turn :bmarks into a proper excmd
Turning `:bmarks` into a proper excmd has several advantages: it will
show up in the `:help` pages, be available for excmd completions and
enbales adding specific arguments (such as "-t") in order to open
bookmarks in other tabs.

Doing this required moving tabopen and some of its dependencies to the
content script.

Closes https://github.com/tridactyl/tridactyl/issues/902.
2018-10-08 09:53:20 +02:00
glacambre
42908799ae
Fix :set noiframeon
`:set noiframeon` has been broken since at least 1a1588a8 because of the
use of target.concat instead of target.push. This caused subsequent
config.set() calls to interpret every url except the last as being part
of the keys that needed to be set in the config rather that as urls that
should be saved in the noiframeon setting.
2018-10-07 13:52:48 +02:00
glacambre
e48951ca3c
excmds.ts: Display error messages when setclip/getclip fails
This commit makes {set,get}clip display error messages when they fail to
interact with the X selection. Somehow exceptions are lost somewhere so
we use fillcmdline manually. This problem will disappear once these
functions are moved to the content script.

Fixes https://github.com/tridactyl/tridactyl/issues/959
2018-10-05 10:36:37 +02:00
WorldCodeCentral
38d83ed323
Correct * href to a href 2018-10-04 19:37:39 +02:00
glacambre
f937a29e8a
Update metadata names
3ec27fd broke the commandline by moving config.ts while
metadata-generation/using code relied on its path. This commit updates
the path. A proper fix is to stop using paths and use names instead.
2018-10-04 17:57:44 +02:00
Oliver Blanthorn
3ec27fd40c
Merge branch 'reorganize-directories' 2018-10-04 13:59:19 +01:00
Oliver Blanthorn
2a05a2ffc7
Merge branch 'performance-counters' 2018-10-04 13:25:11 +01:00
glacambre
666f9cfc51
Implement {bind,unbind,reset}url 2018-10-04 13:18:12 +01:00
glacambre
1d8edb5a4b
excmds.ts: Remove profile-finding code in guiset
:guiset implemented a bit of its own profile-finding code (checking for
auto, making sure it's using the right platforms...) which isn't really
necessary since all of these checks (and more!) are already implemented
in Native.getProfileDir().

Closes https://github.com/tridactyl/tridactyl/issues/705.
2018-10-04 12:35:13 +02:00
glacambre
c4fc5cc8fe
Rename ffargs to ff_cmdline() and remove constraint on profile name
The rename of ffargs to a more sensible ff_cmdline was suggested in
https://github.com/tridactyl/tridactyl/pull/510#discussion_r188589211

The constraint on profile names was that the `find` command tridactyl
ran looked for profiles the name of which contained a dot. While all
profiles generated by firefox contain a dot in their path, users can
easily rename them to something that doesn't contain a dot, provided
that they also modify their profile.ini file.
2018-10-04 10:04:20 +02:00
glacambre
c7c152bc33
excmds.ts: Fix guiset profile not found error being overwritten 2018-10-04 09:28:03 +02:00
Saul Reynolds-Haertle
35605d3bf9 Add more logging and debug output to perf counters
Also, present a friendly error string instead of an opaque crash if no
samples are avilable for perfhistogram.
2018-09-30 12:01:07 -07:00
Saul Reynolds-Haertle
b98e0af7c0 Rename dumpcounters to perfdump to maintain pseudo-namespacing 2018-09-30 12:01:07 -07:00
Saul Reynolds-Haertle
77832fd8a2 Add documentation for perf counts library and clean up the interface
Most importantly, provide some convenience functions for hooking up
listeners and messaging.
2018-09-30 12:01:07 -07:00
Saul Reynolds-Haertle
b8e0459e6b Build a performance counters system so I can start optimizing things
Complete a circular buffer so we don't log too much data, config
settings for turning it on and off (default off, becuase performance)
and for changing the size of the buffer, an excmd for dumping the raw
json so you can pore over it, and for when you just want to
sanity-check yourself instead of groveling over your data for six days
with a deep learning toolkit and three hundred CPUs of compute, an
excmd for pretty-printing your stats in a nice histogram.

I didn't think far enough ahead and only implemented the easy way to
instrument a function, which is with a decorator. I'm getting _really_
angry at typescript not being able to handle decorators on free
functions. bah. I'll figure out a good way to wrap free
functions. Maybe just go the stupid route and make you change
`export async function foo(args)` to `export foo = measured(async
function(args) ...`. But that would break excmd parsing, so... :/

I think that I already want to do a refactor to break excmd.ts into a
bunch of one-line wrappers referencing implementations spread
throughout a bunch of libraries. This would go nicely with that.

Other things I did while I was here:
* Fix the ugliness we had with (window as any).tri by monkey-patching
  the tri property into the window object in tridactyl.d.ts
2018-09-30 12:01:07 -07:00
Oliver Blanthorn
bbc305c5cf
Merge branch 'readline_excmds' 2018-09-30 19:00:51 +01:00
Oliver Blanthorn
b6573a88f8
Merge branch 'add_saveas' 2018-09-30 18:57:07 +01:00
Oliver Blanthorn
f8fcaf452a
Add disclaimer to saveas help 2018-09-30 18:56:56 +01:00
Saul Reynolds-Haertle
f95a33d76c Fix remaining relative imports 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
a9367f479b move src/keyseq.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
8670ed1136 move src/dom.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
9df56bbd64 move src/url_util.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
7769d6db1b move src/text_to_speec.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
073a0a7454 move src/state_content.ts into src/content 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
2d16c4d925 move src/scrolling.ts into src/content 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
16f95261f1 move src/number.mod.ts to src/lib 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
3100dca4a3 move src/number.clamp.ts to src/lib 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
eeb74c95c6 move src/native_background.ts to src/background/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
a4274d3839 move src/metadata.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
3160137c57 move src/messaging.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
c02ef5a90e Move src/itertools.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
e635034f9e Move src/hinting.ts to src/content/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
b255712970 Move src/finding.ts to src/content/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
a9486ae6ad Move src/css_util.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
de860eddb8 Move src/controller_background.ts to src/background/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
a4b822336f Move src/config_rc.ts to src/background/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
c531aa5481 Move src/config.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
539fcb18c1 Move src/commandline_content.ts to src/content/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
9dad2e4ae8 Move src/commandline_background.ts to src/background/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
11e28ce1fc Move src/aliases.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
10248f4cee Move src/logging.ts to src/lib/ 2018-09-29 18:03:36 -07:00
glacambre
484fcd946a excmds.ts: Add im_{forward,backward}_word
im_{forward,backward}_word are functions meant to be used when in
insert/input mode. They should be functionnally equivalent to readline's
{forward,backward}-word. They move the cursor one word forward or
backward.
2018-09-29 20:28:06 +02:00
glacambre
24974eb17a excmds.ts: Add im_{forward,backward}_char
im_{forward,backward}_char are functions meant to be used when in
insert/input mode. They should be functionnally equivalent to readline's
{forward,backward}-char. They move the cursor one character forward or
backward.
2018-09-29 20:18:33 +02:00