urxvt - open urls smarter

This commit is contained in:
Felix Van der Jeugt 2015-01-10 10:31:29 +01:00
parent 14b52791ec
commit 3171048232
2 changed files with 6 additions and 1 deletions

View File

@ -104,7 +104,7 @@ urxvt.termName: rxvt-unicode
URxvt.perl-ext-common: default,matcher,tabbedex,font-size URxvt.perl-ext-common: default,matcher,tabbedex,font-size
! matcher: clickable urls ! matcher: clickable urls
URxvt.url-launcher: /usr/bin/firefox URxvt.url-launcher: /home/felix/.local/bin/open.sh
URxvt.matcher.button: 1 URxvt.matcher.button: 1
! tabbedex: tabs ! tabbedex: tabs

5
local/bin/open.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
curl -IL $1 \
| grep Content-Type \
| tail -n 1 \
| grep image && feh $1 || firefox $1