Re: [hackers] [surf] Add prompts for SETPROP || Quentin Rameau

From: <ssd_AT_mailless.org>
Date: Wed, 10 May 2017 09:38:15 +0200

hi Quentin,

* Quentin Rameau 2017-05-09 10:05
> Just out of curiosity, what kind of shortcuts do you use there?

shortcuts to bookmarks.

I maintain a bookmarks file in a format borrowed from uzbl long ago when
I switched to surf. It's formatted like

<url> <title>\t[:<shortcut> ][<tag1> [<tag2>]]
e.g.
        http://suckless.org suckless :s code
        http://dwm.suckless.org suckless :dwm code
        http://surf.suckless.org surf browser code
        http://st.suckless.org st terminal emulator code
        http://%s.suckless.org suckless :sl code good
        https://startpage.com/do/search?query=%s :default
        https://startpage.com/do/search?query=%s :sp

then, my SETURI invokes a script that does one of
- return the URI corresponding to a shortcut, if the first argument is a
  shortcut (substituting the rest of the arguments for %s in the URI),
- return the `:default` URI with all arguments (i.e. $_AT_) substituted for
  %s,
- return the argument itself if it's an URI.

I have also some tooling for filtering on tags (rather than shortcuts),
stripping domains, etc. I may find some time to organise them in a
public repo if anyone is interested.

On a side note: thanks for continuing the work on surf! I'm still on the
old branch but will switch to wk2 very soon.

cheers
--s
Received on Wed May 10 2017 - 09:38:15 CEST

This archive was generated by hypermail 2.3.0 : Wed May 10 2017 - 09:48:17 CEST