aboutsummaryrefslogtreecommitdiff
path: root/i3/bin/setbg-cloogle
blob: 97e81547e43ccc21fa41e4683ee5921aeb647fe7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

# Test internet
timeout 4 wget -q --spider http://cloogle.org || setbg-backup

stdbuf -i0 -o0 -e0 cloogle_stats.py | while read request
do
	if [ "$request" == "Opened connection." ] || [ "$request" == "Lost connection" ]; then
		continue
	fi
	echo "$request" | pygmentize -l clean -O line_numbers=false -o /tmp/bg-cloogle.png
	feh -B white --bg-center /tmp/bg-cloogle.png
done &