diff options
Diffstat (limited to 'i3')
-rwxr-xr-x | i3/bin/askpass | 3 | ||||
-rwxr-xr-x | i3/bin/cloogle_stats.py | 50 | ||||
-rwxr-xr-x | i3/bin/dualmon | 5 | ||||
-rwxr-xr-x | i3/bin/dualmon-dp | 5 | ||||
-rwxr-xr-x | i3/bin/nowplaying | 2 | ||||
-rwxr-xr-x | i3/bin/setbg-cloogle | 13 | ||||
-rwxr-xr-x | i3/bin/setbg-pgfplots | 24 | ||||
-rwxr-xr-x | i3/bin/setbg-texample | 40 | ||||
-rwxr-xr-x | i3/bin/singlemon | 7 | ||||
-rwxr-xr-x | i3/bin/singlemon-dp | 5 |
10 files changed, 0 insertions, 154 deletions
diff --git a/i3/bin/askpass b/i3/bin/askpass deleted file mode 100755 index e37b29a..0000000 --- a/i3/bin/askpass +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -p=$(echo -e "GETPIN\nBYE\n" | pinentry | grep D) -echo "${p:2}" diff --git a/i3/bin/cloogle_stats.py b/i3/bin/cloogle_stats.py deleted file mode 100755 index a572207..0000000 --- a/i3/bin/cloogle_stats.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python3 -import json -import ssl -import sys -import time -import websocket - -def print_and_flush(s): - print(s) - sys.stdout.flush() - -def format_query(query): - if 'className' in query: - return 'class ' + query['className'] - elif 'typeName' in query: - return 'type ' + query['typeName'] - elif 'unify' in query: - if 'name' in query and query['name'] != '': - return query['name'] + ' :: ' + query['unify'] - else: - return ':: ' + query['unify'] - else: - return query['name'] - -def on_message(ws, msg): - try: - print_and_flush(format_query(json.loads(msg))) - except: - pass - -def on_open(ws): - print_and_flush('Opened connection.') - -def on_error(ws, err): - print_and_flush(err) - -def on_close(ws): - print_and_flush('Lost connection.') - time.sleep(3) - start() - -def start(): - ws = websocket.WebSocketApp('wss://cloogle.org:31216', - subprotocols=['cloogle-stats'], - on_message=on_message, - on_open=on_open, on_error=on_error, on_close=on_close) - ws.run_forever(sslopt={'cert_reqs': ssl.CERT_NONE}) - -if __name__ == '__main__': - start() diff --git a/i3/bin/dualmon b/i3/bin/dualmon deleted file mode 100755 index c14e380..0000000 --- a/i3/bin/dualmon +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -xrandr --output eDP1 --below HDMI2 --primary --output HDMI2 --auto -xinput disable Atmel -setbg -xsetwacom set 'Wacom Intuos S Pen stylus' MapToOutput HDMI2 2>/dev/null diff --git a/i3/bin/dualmon-dp b/i3/bin/dualmon-dp deleted file mode 100755 index c8de3c0..0000000 --- a/i3/bin/dualmon-dp +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -xrandr --output eDP1 --auto --below DP1 --primary --output DP1 --auto -xinput disable Atmel -setbg -xsetwacom set 'Wacom Intuos S Pen stylus' MapToOutput DP1 2>/dev/null diff --git a/i3/bin/nowplaying b/i3/bin/nowplaying deleted file mode 100755 index 650e6e8..0000000 --- a/i3/bin/nowplaying +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -cmus-remote -Q | grep '^tag \(artist\|album\|title\) ' | cut -d' ' -f 3- | tr '\n' '\t' | awk 'BEGIN { FS = "\t" } ; { print $3 " (" $2 ", " $1 ")" }'; echo -n ' ' diff --git a/i3/bin/setbg-cloogle b/i3/bin/setbg-cloogle deleted file mode 100755 index f205a80..0000000 --- a/i3/bin/setbg-cloogle +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# Test internet -timeout 4 wget -q --spider http://cloogle.org || setbg-backup || exit 1 - -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 & diff --git a/i3/bin/setbg-pgfplots b/i3/bin/setbg-pgfplots deleted file mode 100755 index bd66b4e..0000000 --- a/i3/bin/setbg-pgfplots +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -SCR_WIDTH=1980 -SCR_HEIGHT=1080 -PADDING=50 -FONT_SIZE=20 - -let "SCR_WIDTH -= 2 * $PADDING" -let "SCR_WIDTH /= 2" -let "SCR_HEIGHT -= 2 * $PADDING" - -NR=$RANDOM -let "NR %= 524" - -# Test internet -timeout 4 wget -q --spider http://cloogle.org || setbg-backup || exit 1 - -wget -qO- "http://pgfplots.sourceforge.net/example_$NR.pdf" | convert -size "x$SCR_HEIGHT" -density 300 - /tmp/bg.png -wget -qO- "http://pgfplots.sourceforge.net/gallery.html" | sed -n "/example_$NR\.pdf/,/<\/div>/p" | tail -n +6 | head -n -1 | pygmentize -l latex -O font_size=$FONT_SIZE -o /tmp/bg-src.png - -montage -geometry "+$PADDING+$PADDING" /tmp/bg-src.png /tmp/bg.png "/tmp/bg-$NR.png" -rm /tmp/bg{,-src}.png - -feh -B white --bg-max "/tmp/bg-$NR.png" diff --git a/i3/bin/setbg-texample b/i3/bin/setbg-texample deleted file mode 100755 index c1968a5..0000000 --- a/i3/bin/setbg-texample +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -SCR_WIDTH=1980 -SCR_HEIGHT=1080 -PADDING=50 -FONT_SIZE=20 - -CURL="curl -s" - -# Test internet -timeout 4 wget -q --spider http://texample.net || setbg-backup || exit 1 - -let "SCR_WIDTH -= 2 * $PADDING" -let "SCR_WIDTH /= 2" -let "SCR_HEIGHT -= 2 * $PADDING" - -PAGE=$RANDOM; let "PAGE %= 22"; let "PAGE += 1" - -echo "TeXample page: http://texample.net/tikz/examples/all/?page=$PAGE" - -# Fetch list of texamples -cd /tmp -$CURL -o texample.html "http://texample.net/tikz/examples/all/?page=$PAGE" || setbg-backup || exit 1 - -EXAMPLES="$(grep '^<dl' texample.html | wc -l)" -awk -v n=0 "BEGIN{srand();n=int(rand()*$EXAMPLES)+1} /^<dl/{l++} (l==n){print} END{}" texample.html | sponge texample.html - -PDF="$(grep '\/media\/tikz\/examples\/PDF' texample.html | sed "s/.*<a href=\"\([^\"]*\)\">PDF<\/a>.*/\1/")" -TEX="$(grep '\/media\/tikz\/examples\/TEX' texample.html | grep -v overleaf | sed "s/.*<a href=\"\(.*\)\">TEX<\/a>.*/\1/")" - -echo "PDF: $PDF" -echo "TeX: $TEX" - -$CURL "http://texample.net$PDF" | convert -size "x$SCR_HEIGHT" -density 300 - /tmp/bg-page-%d.png -$CURL "http://texample.net$TEX" | sed -n '/\\begin{document}/,/\\end{document}/p' | pygmentize -l latex -O font_size=$FONT_SIZE -o /tmp/bg-src.png - -montage -geometry "+$PADDING+$PADDING" /tmp/bg-src.png /tmp/bg-page-0.png "/tmp/bg-$PAGE.png" -rm /tmp/bg-{page-*,src}.png || setbg-backup || exit 1 - -feh -B white --bg-max "/tmp/bg-$PAGE.png" diff --git a/i3/bin/singlemon b/i3/bin/singlemon deleted file mode 100755 index 05ccbed..0000000 --- a/i3/bin/singlemon +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -xrandr --output eDP1 --primary --auto \ - --output HDMI2 --off \ - --output DP1 --off -xinput enable Atmel -setbg -xsetwacom set 'Wacom Intuos S Pen stylus' MapToOutput eDP1 2>/dev/null diff --git a/i3/bin/singlemon-dp b/i3/bin/singlemon-dp deleted file mode 100755 index 82893b7..0000000 --- a/i3/bin/singlemon-dp +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -xrandr --output eDP1 --off --output DP1 --auto --primary -xinput disable Atmel -setbg -xsetwacom set 'Wacom Intuos S Pen stylus' MapToOutput DP1 2>/dev/null |