commit 219e4acb38307492bb71956e21d9b1ff0719b86b parent 4f319da678e4b631491b276ddabde6d9b5fd48d4 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Wed, 6 Jan 2021 14:11:11 +0100 .profile: news(): show DR newsfeed with sfeed by default Diffstat:
M | .profile | | | 14 | ++++++++++++-- |
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/.profile b/.profile @@ -122,17 +122,27 @@ alias w3mtor='torsocks w3m -B "$@"' ddg() { w3m "https://duckduckgo.com/lite?q=$*&fd=-1" } +sacc() { + if [ $# -eq 0 ]; then + /usr/local/bin/sacc gopher://adamsgaard.dk/1/tmp/bookmark.gph + else + /usr/local/bin/sacc "$@" + fi +} alias wanip='hurl gopher://bitreich.org/0/ip' news() { - if [ $# -eq 0 ] || [ "$1" = "npr" ]; then + if [ $# -eq 0 ] || [ "$1" = "dr" ]; then + hurl https://www.dr.dk/nyheder/service/feeds/allenyheder | \ + sfeed | sfeed_curses + elif [ "$1" = "npr" ]; then url="https://text.npr.org" elif [ "$1" = "cnn" ]; then url="https://lite.cnn.io/en" else url="$1" fi - w3m "$url" + [ -n "$url" ] && w3m "$url" || : } #weather() { curl "wttr.in/?m"; }