arcnmx / luakit-pass

pass plugin for luakit
14 stars 4 forks source link

Error: Falied to read [passentry] #11

Open SIR-unit opened 2 years ago

SIR-unit commented 2 years ago

I go to a site and type ":pass", and it fails with the error in the title. luakit-pass finds the correct entry (as [passentry] is correct), but I don't get a pinentry prompt. It could be that I have not installed it properly? The readme isn't really clear. I tried the following ~/.config/luakit/userconf.lua files:

dofile("/path/to/luakit-pass/init.lua")
dofile("/path/to/luakit-pass/init.lua")
dofile("/path/to/luakit-pass/wm.lua")

and

dofile("/path/to/luakit-pass/wm.lua")
dofile("/path/to/luakit-pass/init.lua")

I'm trying to get this to work to dicide if switching to luakit is worth it, so I'm not very familiar with lua

NOTE: running pass anywhere else works fine (emacs, tty, terminal emulator, qutebrowser)

SIR-unit commented 2 years ago

Based on some things I read, I infered that the "standard" way to add plugins is to clone them into ~/.config/luakit/plugins. I did this and changed my userconf.lua to just require "plugins.luakit-pass". This gave the same result

arcnmx commented 2 years ago

Sorry, I haven't used luakit in quite some time now. You may want to check that the config fields are correct (which you can set on the module returned by require) - particularly check the path to pass? Running luakit in a terminal that makes it easy to see log messages might also help tell you what's wrong.

SIR-unit commented 2 years ago

Thanks. I was able to change executable from "/usr/bin/pass" to "pass" and now I can see passwords with :pshow. However, :pass doesn't seem to be able to fill that data into any webpage :(

arcnmx commented 2 years ago

Yeah, I expected that to be a problem. Notice how this require does not say "plugins.luakit-pass.wm". You could:

  1. move pass directly into ~/.config/luakig instead of under plugins (and remove the luakit- prefix)
  2. Use something along the lines of modifying package.path in your luakit config to help it find pass
  3. edit the module directly to change the require path

Based on some things I read, I infered that the "standard" way to add plugins is to clone them into ~/.config/luakit/plugins. I did this and changed my userconf.lua to just require "plugins.luakit-pass".

afaik this is standard practice for using the luakit-plugins repo, not necessarily for luakit plugins in general.

SIR-unit commented 2 years ago

moving init.lua and wm.lua to .config/luakit/pass did the job. Password filling now works as expected! Thanks.