From 78db7d43845d3ea276b8028bec6d67b5a5641a1b Mon Sep 17 00:00:00 2001 From: NeodarZ Date: Wed, 21 Sep 2016 20:01:28 +0200 Subject: =?UTF-8?q?Ajout=20de=20la=20conf=20de=20vim=20+=20mise=20=C3=A0?= =?UTF-8?q?=20jour=20de=20la=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .i3-blocks/blocks/feed | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100755 .i3-blocks/blocks/feed (limited to '.i3-blocks/blocks/feed') diff --git a/.i3-blocks/blocks/feed b/.i3-blocks/blocks/feed deleted file mode 100755 index 0030939..0000000 --- a/.i3-blocks/blocks/feed +++ /dev/null @@ -1,31 +0,0 @@ -#!/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 '.*' | head -n 1 | sed 's/\(\|<\/title>\)//g') -FEED_LINK=$(echo "${FEED_CONTENT}" | grep -v "xmlns:atom" | grep -o '<link>.*</link>' | head -n 1 | sed 's/\(<link>\|<\/link>\)//g') - -if [[ "${FEED_TITLE}" = *404* ]]; then - echo "${FEED_URL}" - echo "${FEED_URL}" - echo "" - exit 33 -fi - -if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then - xdg-open "${FEED_LINK}" -fi - -echo "${FEED_TITLE}" -echo "${FEED_TITLE}" -echo "" \ No newline at end of file -- cgit v1.2.1