Re: [dev][project] soap - a simple xdg-open replacement

From: Branislav Blaskovic <branislav_AT_blaskovic.sk>
Date: Tue, 6 May 2014 14:06:21 +0200

Just take a look at ranger and it's sub-app rifle. It does what you
are describing but have a lot of more options.
http://ranger.nongnu.org/
Branislav Blaškovič
www.blaskovic.sk


On Sat, May 3, 2014 at 5:18 PM, FRIGN <dev_AT_frign.de> wrote:
> Good evening,
>
> unless you are using only terminals with dwm, you sooner or later get
> in touch with xdg-open. It's a tool which manages your default
> applications by assigning applications to mime-types.
> My colleague and I thought that it would be awesome to press a
> youtube-link in Skype to have it directly played back in youtube-viewer
> or a link to a gif, automatically downloaded and opened in gifview.
>
> Given xdg-open doesn't allow this flexibility, I wrote a C-program
> which does just that and can fall back to xdg-open.
> The functionality is simple and builds on the proven
> config.h-principle, allowing to check incoming requests with regexes
> and executing commands respectively.
>
> A configuration can look like this:
>
> { "\.mp3", "st -e mplayer %s" },
> { "\.(jpg|png|tiff)$", "feh %s" },
> { "\.gif", "wget -O /tmp/tmp.gif %s && gifview -a /tmp/tmp.gif" },
> { "^(http://|https://)?(www\.)?(youtube.com/watch\?|youtu\.be/)", "youtube-viewer %s" }
>
> where %s is the _shell-escaped_ argument given to xdg-open.
>
> Also included is a fully-functional Makefile, which manages a backup of
> xdg-open in /usr/bin/xdg-open_.
> Thus you can easily test it out via make install and go back with make
> uninstall.
> You can find the full source-code in the git-repository[0], published
> under the MIT/X Consortium License.
>
> Please let me know what you think!
>
> Cheers
>
> FRIGN
>
> [0]: https://github.com/FRIGN/soap
>
> --
> FRIGN <dev_AT_frign.de>
>
Received on Tue May 06 2014 - 14:06:21 CEST

This archive was generated by hypermail 2.3.0 : Tue May 06 2014 - 14:12:06 CEST