dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit 46ad84cdea4ee4a181bdd479976e05e506d1496f
parent a7596dd38fa0927e48c580a14d89642b4a5e64ae
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 11 Jan 2021 14:55:39 +0100

move news into own script

Diffstat:
A.local/bin/news | 12++++++++++++
M.profile | 13-------------
2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/.local/bin/news b/.local/bin/news @@ -0,0 +1,12 @@ +#!/bin/sh +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 +[ -n "$url" ] && w3m "$url" || : diff --git a/.profile b/.profile @@ -131,19 +131,6 @@ sacc() { } alias wanip='hurl gopher://bitreich.org/0/ip' -news() { - 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 - [ -n "$url" ] && w3m "$url" || : -} #weather() { curl "wttr.in/?m"; } t_add() { transmission-remote --add --download-dir "$PWD" --encryption-required "$@"; }