This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# put in ~/.byobu/bin | |
REDSHIFT=/usr/bin/redshift | |
ELEVATION=$($REDSHIFT -pv | grep "Solar elevation" | sed -e 's/.*: //') | |
COLOR=$(echo $ELEVATION | awk '{ if ($0 > 6.0) { printf("gk"); } else if ($0 > -6.0) { printf("yk"); } else { printf("rk"); } }') | |
echo $ELEVATION $COLOR | awk '{ printf("\005{= %s}%.2f\xb0\005{-}\n", $2, $1); }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, os | |
import poppler | |
import cairo | |
if __name__ == '__main__': | |
uri = 'file://%s' % os.path.abspath(sys.argv[1]) | |
prefix = sys.argv[2] | |
width = int(sys.argv[3]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, math | |
import cairo | |
if __name__ == '__main__': | |
master = cairo.ImageSurface.create_from_png(sys.argv[1]) | |
dest_width = int(sys.argv[2]) if len(sys.argv) > 2 else 256 | |
dest_height = int(sys.argv[3]) if len(sys.argv) > 3 else 256 | |
min_zoom = int(sys.argv[4]) if len(sys.argv) > 4 else 0 |
NewerOlder