[qutebrowser] How to run a userscript in Windows

Florian Bruhin me at the-compiler.org
Wed Sep 14 07:08:36 CEST 2016

* David Nebauer <davidnebauer3 at bigpond.com> [2016-09-14 00:15:36 +0930]:
> On 11/09/16 12:50, David Nebauer wrote:
> > > 
> > > >      command called: spawn ['--userscript', 'hello.bat']
> > > > [...]
> > > >      Userscript to run:
> > > > C:\Users\ME\AppData\Local\qutebrowser\data\userscripts\hello.bat
> > > I'm guessing the hello.bat is in that location?
> > 
> > Well, no, as it turns out. The bat file was in:
> > 
> >     C:\Users\ME\AppData\Local\qutebrowser\userscripts\hello.bat
> Might be worth mentioning that I used the wrong userscript directory because
> I misunderstood the documentation. It says userscripts need to be, "stored
> in your data directory under 'userscripts'". On the Windows platform I took
> "data directory" to be a reference to qutebrowser's install location under
> "AppData/Local" and formed the rest of the path based on the unix userscript
> path (which does not include the 'data' subdirectory).

That's because the XDG standard (which is at least commonly used on
Linux) has separate paths for config (~/.config) and data
(~/.local/share), while Windows doesn't - so on Windows, we simply
have separate data/ and cache/ subdirs in there.

> I suggest the documentation could explicitly state the Windows userscript
> path. Even better would be if 'qute:version' output included the full
> userscripts directory ||path, in the same way that it currently includes the
> "Desktop" path in unix and "Imported from" path in Windows. That way the
> information would be available on every platform qutebrowser runs on.

Just a small clarifiction: That's not the desktop path, that's what
desktop environment the user is using (i.e., the DESKTOP_SESSION
environment variable).

I agree it'd make sense to display at least the
config/data/runtime/cache directories in qute:version though.


http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/qutebrowser/attachments/20160914/db11db2c/attachment.asc>

More information about the qutebrowser mailing list