tats / w3m

Debian's w3m: WWW browsable pager
https://tracker.debian.org/pkg/w3m
Other
865 stars 92 forks source link

Print in search box #226

Open alexandre1985 opened 2 years ago

alexandre1985 commented 2 years ago

I am trying to create a way for w3m to accept passwords from my password generator. I have a script that receives certain arguments and then prints the correspondent password. So I am thinking of implementing my password manager script as a w3m cgi script.

I have already created/modified some w3m cgi scripts about searching using the URL prompt.

But I don't know how to make a cgi script print into the current text box (into the html password text box) and how to make the call to that script (maybe from the current html password text box?).

I need help

gotbletu commented 2 years ago

maybe open the current text box in a text editor like vim then u can do some vim binding to send the password you want

e.g

  1. go to text box, hit enter
  2. hit ctrl-o to use vim (make sure your $EDITOR is set)
  3. run your vim hotkey to paste in whatever password
rkta commented 1 month ago

If have a first draft for this, see https://git.sr.ht/~rkta/w3m/commit/2941e528f46048be67a5ba606ef5acc95a072b66

With this commit, you have a new command PASS, which either takes an argument like PASS 2 or when bound to a key can be prefixed with a number (vim-style). PASS calls the program defined in passwd_cmd passing the current host name as argument, e.g. github.com (see 'Password store' in the options panel).

PASS will read the first line or the line given as argument and insert it into the field under the cursor. Any other text is discarded.