#!/bin/bash # WARNING: This has a LIMIT of 32 characters for now! # If your URL is longer you should use an URL shortener # Caused by https://github.com/vivien/i3blocks/blob/01a4f4a9ca1e3d0b3c95d1d62000ad8506bdff1a/include/block.h#L50 # Example: https://goo.gl/ FEED_URL="${BLOCK_INSTANCE:-https://www.archlinux.org/feeds/news/}" if [[ "${FEED_URL}" = "" ]]; then exit fi # Follows redirects! FEED_CONTENT=$(curl ${FEED_URL} -s -L) FEED_TITLE=$(echo "${FEED_CONTENT}" | grep -v "xmlns:atom" | grep -o '