dotfiles

custom dotfiles
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit 7fd951d3b2ddf8bedc10aee4ab315716d68b8dc5
parent 65729552d68f21a9ad39018190a20dffacc96c1f
Author: pyratebeard <root@pyratebeard.net>
Date:   Thu, 25 Feb 2021 15:46:37 +0000

colours and style. add webimg for opening images in sxiv. add podboat player

Diffstat:
Abin/bin/webimg | 42++++++++++++++++++++++++++++++++++++++++++
Mnewsboat/.newsboat/config | 34++++++++++++++++++++--------------
2 files changed, 62 insertions(+), 14 deletions(-)

diff --git a/bin/bin/webimg b/bin/bin/webimg @@ -0,0 +1,42 @@ +#!/bin/sh +# +# requires `identify` from imagemagick + +img="/tmp/webimg" +image=$(xsel -b) + +if [ -f ${img} ] ; then + rm -f ${img} +fi + +function notify() { + msg=$1 + notify-send -u 'normal' "webimg: ${msg}" +} + +function show_img() { + if [[ ${image} = *w3mtmp* ]] ; then + img=${image} + elif [[ ${image} =~ .*gif$ ]] ; then + img="${img}.gif" + curl -s "${image}" --output ${img} + else + image="${image/http\:/https\:}" + curl -s "${image}" --output ${img} + fi + + if identify ${img} >/dev/null 2>1 ; then + if identify ${img} | grep GIF >/dev/null 2>1 ; then + mv "${img}" $(echo "${img}".gif) + img="${img}.gif" + fi + sxiv -ba "${img}" 2>/dev/null + else + notify "not an image file" + exit 1 + fi +} + +[ $# -eq 1 ] && image="$1" ; show_img || show_img + +rm -f ${img} diff --git a/newsboat/.newsboat/config b/newsboat/.newsboat/config @@ -5,7 +5,7 @@ auto-reload no browser w3m save-path ~/tmp -notify-program notify-send +notify-program /usr/bin/notify-send player mpv # interface @@ -13,19 +13,23 @@ text-width 0 max-items 20 # interface colours -color info blue black -color listfocus_unread color6 color0 -color listfocus color12 color0 - -# feed headers colours -highlight feedlist ".*-----.*" color13 default - -# article colours +color info white black +color listfocus_unread color7 color5 +color listfocus color0 color15 +color listnormal_unread color10 default + +# feedlist format and colours +feedlist-format "%?T? │ %2i %t & ├─── %t?" +highlight feedlist ".*─────.*" color59 default + +# article format and colours +#articlelist-format "%?T? │ %2i %f %t?" +articlelist-format " │ %2i %t" highlight article "^Feed:.*" color5 default -highlight article "^Title:.*" color6 default -highlight article "^Author:.*" color4 default -highlight article "^Date:.*" color5 default -highlight article "^Link:.*" color10 default +highlight article "^Title:.*" color3 default +highlight article "^Author:.*" color7 default +highlight article "^Date:.*" color15 default +highlight article "^Link:.*" color15 color236 # key bindings bind-key j down @@ -37,7 +41,9 @@ bind-key l open macro ; open-in-browser macro m set browser "mpv %u" ; open-in-browser ; set browser w3m macro r set browser "~/bin/newstuir %u" ; open-in-browser ; set browser w3m +macro f set browser "~/bin/webimg" ; open-in-browser ; set browser w3m # podboat -download-path "~/lib/aud/podcasts/%h/%n" +download-path "~/lib/audio/podcasts/%h/%n" max-downloads 3 +player "mpv --no-audio-display"