Commit graph

933 commits

Author SHA1 Message Date
Anton Vilhelm Ásgeirsson
5ddce6763b
Implement writerc native messenger call
This allows us to write the rc to OS. The only way to overwrite your current
rc file is to use mkt!, mktridactylrc! or mktridactylrc -f. mkt* commands
issued without the force/exclamation mark will not overwrite existing files.

Native messenger was updated to 0.1.11 and the mktridactylrc command is
unavailable in prior versions.

Fixed some random indentation errors that occurred in earlier commit.
2019-06-02 14:02:00 +01:00
Anton Vilhelm Ásgeirsson
9f80bc5561
Remove console logs 2019-06-02 14:01:52 +01:00
Anton Vilhelm Ásgeirsson
bdc6a39180
Hook mktridactylrc up to native messenger
Still need to doublecheck subconfigs and fallbacks.
Also need to make sure that ! overwrites and error out if it isn't
supplied.
2019-06-02 14:01:45 +01:00
Anton Vilhelm Ásgeirsson
07d1ed6586
Revive mktridactylrc and add autocontainer parsing
Partially written write function in the config_rc.
2019-06-02 14:01:21 +01:00
Oliver Blanthorn
cd466d98bf
Merge pull request #1639 from tridactyl/tagged_native
Make native{install,update} use corresponding tag for stable build
2019-05-31 15:41:26 +01:00
Oliver Blanthorn
ef9f02d0da
Make native{install,update} use corresponding tag for stable build
Beta builds will always use most recent messenger, which I think is probably fair;
old beta builds are unsupported.
2019-05-31 15:02:05 +01:00
glacambre
9ef99b0ab4
parsers/exmode.ts: replace macro-generated info with ts-generated info
I tested nearly all ex commands and this didn't seem to break anything.
2019-05-31 15:20:46 +02:00
Oliver Blanthorn
fdfe3447f4
Merge pull request #1629 from antonva/caesar
Nqq ebg13 shapgvbanyvgl.
2019-05-30 20:01:34 +01:00
Anton Vilhelm Ásgeirsson
78cd7ccf81 Nqq ebg13 shapgvbanyvgl.
Nqqrq gur ebg13 rkpzq naq rqvgbe pbzznaq. Gur rkpzq vf obhaq gb t? naq
genafsbezf nyy grkg abqrf ba n cntr. Lbh pna hfr `ovaq --zbqr=rk <P-l>
grkg.ebg13` gb sbe fbzr ernfba ebg gur pbagragf bs gur pbzznaqyvar vs
gung sybngf lbhe obng.
2019-05-30 19:45:46 +00:00
Oliver Blanthorn
773d661367
Add keyfeed command to feed fake keys to Tridactyl 2019-05-30 18:21:05 +01:00
Oliver Blanthorn
05f6fdc007
Fix #1600: try to massage bookmarks into proper URLs 2019-05-30 16:37:32 +01:00
Oliver Blanthorn
30d3eb8f73
Add user-definable modes 2019-05-30 15:37:06 +01:00
Oliver Blanthorn
8b2d311c05
Document keytranslatemodes 2019-05-29 18:11:02 +01:00
Oliver Blanthorn
269a37bef1
Fix #1114: move get_current_url to alias 2019-05-29 17:13:02 +01:00
Oliver Blanthorn
06b013b38e
Fix #1572: flip pref to make FF look for userChrome 2019-05-29 17:06:38 +01:00
Oliver Blanthorn
982455a1ef
Fix #1485: add shellescape command for native sanitisation 2019-05-29 15:29:47 +01:00
Oliver Blanthorn
50ce658d36
Merge branch 'fix_find_sucking' 2019-05-29 13:12:58 +01:00
glacambre
96cc6f6100
finding.ts: Make find re-use last search pattern if needed 2019-05-29 10:01:53 +02:00
Oliver Blanthorn
f798492237
Merge pull request #1608 from tridactyl/fix_find_sucking
finding.ts: fix `:find` and `:findnext` sucking hard
2019-05-28 23:07:03 +01:00
glacambre
c65477486c
finding.ts: fix :find and :findnext sucking hard
This is a complete rewrite of `:find` and `:findnext`.
2019-05-28 23:37:33 +02:00
Oliver Blanthorn
402763b41b
Fix #1303: make no_mouse_mode boring 2019-05-28 17:08:13 +01:00
Oliver Blanthorn
191d2da164
Merge pull request #1603 from tridactyl/typed_config_get
Add type checking to first arg of config.get
2019-05-28 13:20:28 +01:00
Oliver Blanthorn
f6794dbcce
Merge branch 'real_hint_mode' 2019-05-28 13:11:44 +01:00
Oliver Blanthorn
51c73d028e
Document hint mode binds 2019-05-28 13:08:48 +01:00
Oliver Blanthorn
905f0c50fe
Add unchecked gets for runtime usage.
Also make config.getAsync use the same type checking
and document a hitherto undocumented setting that it
surfaced.
2019-05-28 12:49:45 +01:00
glacambre
f050f68740
Turn hint mode into a real mode
This commit turns hint mode into a real mode. This required several
changes:
- In `src/content/hinting.ts`: create a function named getHintCommands
  which returns an object containing functions that can be used as ex
  commands.
- In `src/content/hinting.ts`: rewriting the `parser` function to have
  it check the `hintmaps` object in the config and trigger these if
  they're bound to anything. We can't use a generic parser because
  vimperator hints need to catch every single keypress, even the ones
  that aren't bound to anything and act on them.
- Creating `src/background/hinting.ts`, which just wraps ex commands
  from src/content/hintings.ts in a proxy which will forward calls to the
  content script.
2019-05-28 12:41:40 +02:00
Oliver Blanthorn
b098e760e9
Merge branch 'vlmarek-master' 2019-05-27 19:37:57 +01:00
Oliver Blanthorn
7717c18e92
Add type checking to first arg of config.get
Also document noiframeon, which I discovered was undocumented
because of the type checking.

It makes splatted config.gets rather uglier with `...args` ->
`args[0] as keyof config.default_config, args.slice(1)...`.

It has apparently also broken config completions.
2019-05-27 19:27:52 +01:00
Oliver Blanthorn
afbf4e2e50
Prevent bmark from guessing title for manually specified URLs 2019-05-27 14:47:47 +01:00
reversebreak
6a15b99c2e
Make bmark use page title if none is supplied 2019-05-27 14:13:32 +01:00
Vladimír Marek
76f7100987 Add RegExp capability to text filtered hinting 2019-05-27 14:57:07 +02:00
Oliver Blanthorn
81b5639084
Merge branch 'fix_taball_moving_to_wrong_tab' 2019-05-27 10:57:37 +01:00
glacambre
486958f7fc
excmds.ts: Fix taball moving to tab in wrong window
This commit fixes a bug reported by cmcaine. The issue was that when you
have multiple windows on multiple workspaces, taball wouldn't switch
focus to the right tab. This happened because taball relied on
browser.windows.update(id, {focused: true}) having switched to the right
window before calling idFromIndex. This didn't always work because
sometimes window managers will keep the current window focused.
2019-05-27 10:16:06 +02:00
Saul Reynolds-Haertle
031883e85c browser.extension.getURL -> browser.runtime.getURL
Function is deprecated:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extension/getURL

Replacement has essentially identical functionality:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/getURL

I'm sure that there's _some_ difference between the "path in install
directory" and "path relative to manifest.json", but I don't think
that we're going to be the ones running into it.
2019-05-26 22:03:34 -07:00
Colin Caine
d0a0e79e35 hinting: improve hint -f help 2019-05-26 11:46:51 +01:00
Vladimír Marek
11c26212d5 Implement text filtering of hints 2019-05-26 11:46:51 +01:00
Vince Au
4fd6463203
Rename addQueryValue to setQueryValue 2019-05-25 09:08:44 +10:00
Vince Au
bea1852e1a
Add url query if it does not exist 2019-05-24 22:59:12 +10:00
glacambre
e9236a65b6
excmds.ts: Fix :nativeopen breaking on windows 2019-05-22 18:31:29 +02:00
Oliver Blanthorn
83ca843dd3
Expose getclip ex-command 2019-05-22 10:51:05 +01:00
glacambre
2dcf853340
excmds.test.ts: Add :guiset test
This test makes sure guiset has completions and actually writes
something in the user's userChrome.
Writing this test made me discover that `-profile` was a valid firefox
argument and so I added support for that in native.ts. This made me
realize that the profile detection code didn't handle profiles that
aren't described in `profile.ini` and so I fixed that.
2019-05-19 17:00:52 +02:00
Oliver Blanthorn
81d43fa0ab
Merge pull request #1518 from saulrh/synchronize-repeat
Make repeat wait for completion of each excmd before continuing
2019-05-09 11:06:39 +01:00
Jan Hruban
f66d8f290f Fix tridactylrc location in documentation 2019-05-08 17:41:36 +02:00
Saul Reynolds-Haertle
4640799603 Make repeat wait for completion of each excmd before continuing 2019-05-07 23:08:29 -07:00
Saul Reynolds-Haertle
21670ebcfc Unbreak composite 2019-04-26 01:21:02 -07:00
Saul Reynolds-Haertle
25d64258e2 Move all of the update* configs to an update namespace
updatenag => update.nag, etc.
2019-04-22 22:03:17 -07:00
Saul Reynolds-Haertle
ec48314d7c Refactor update-checking logic so we can check more frequently
We couldn't have just invoked "check for updates" on every single
operation because it would've gone out to the RSS every time. This
refactor permits it to cache a highest known version for a
configurable interval. It should be safe to invoke this new
update-checking logic as frequently as desired.
2019-04-22 22:01:58 -07:00
Saul Reynolds-Haertle
587b498684 Refine explanation of background vs content in docs for repeat 2019-04-21 11:16:13 -07:00
Saul Reynolds-Haertle
2e5fdfb63c Run excmds in content. 2019-04-21 02:42:59 -07:00
glacambre
973ec07f92
Remove BGSELF
BGSELF was a hack that I used when implementing ex commands for the
command line. It consisted of having .excmds_background.generated.ts
import itself as BGSELF in order to dynamically add commands to it. This
let us define excmds in other files while not changing anything in
parsers/exmode.ts.

This was awful so I decided to remove it. This required performing the
following changes:
- Moving text.* and ex.* command definitions to their own files where
  they have zero side effects. While this was easy for text commands, ex
  commands rely a lot on side effects. In order to work around this,
  lib/commandline_cmds exports a single function, getCommandlineFns(),
  which expects an object representing the commandline's state as
  parameter.
- In the background script, import our side effect free files and wrap
  them in proxys that will send "commandline_cmd" and "editorfn_content"
  messages to tabs when needed.
- In the content script, add a listener that will either execute an
  editor function or forward it to the command line when it receives an
  "editorfn_content" message.
- In the commandline script, add a listener that will execute exmode
  commands.
2019-04-21 10:33:05 +02:00