Specify what you want urlview to open your links with in ~/.urlview after COMMAND
. I.e. the line below will make urlview open all urls in Firefox.
COMMAND firefox
I use this link handler to be run by urlview. This will open images in feh, movies/gifs in mpv on loop, will download .pdfs and music files and will open everything else in my browser.
Tell me how to improve this script, since I literally just threw it together a couple days ago.
Here are the configurations I have to get URLview working on some of my main terminal programs.
This sets u to bring up urlview. IIRC it will give you all urls in the open document.
:noremap <leader>u :w<Home>silent <End> !urlview<CR>
urlview is a total life-saver in newsboat. I can browse even twitter feeds in the terminal with it with all multimedia. I map it to capital U here.
external-url-viewer "urlview"
bind-key U show-urls
Again, I map urlview to capital U in mutt as well.
macro index,pager U "<enter-command>set pipe_decode = yes<enter><pipe-message>urlview<enter><enter-command>set pipe_decode = no<enter>""view URLs"
Old thread, but I wanted
urlview
to work interminal
mode, since Github and others display PR URLs after push. None of these solutions work with terminal mode, unfortunately, becauseurlview
expects a file name, and terminal buffers aren't quite files (I'm not an expert by any stretch, but whatever type of thing terminal buffers are,urlview
doesn't like it).I came up with a kludge that works in terminal mode, by simply writing a temp file.