This file contains 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/bash | |
i3-msg -t get_workspaces | jq -r 'map(select(.focused))[0].rect["width","height"]' | |
i3-msg -t get_workspaces | jq -r 'map(select(.focused))[0].output' |
This file contains 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 | |
# ██ ██ ██ ██ ██ | |
# ░██ ░░ ░██ ░██ ░██ | |
# ██████ ██ ░██ █████ ██████ █████ ██████ ██████ █████ ██████ | |
# ░░░██░ ░██ ░██ ██░░░██ █████ ██░░░░ ██░░░██░░░██░ ░░░██░ ██░░░██░░██░░█ | |
# ░██ ░██ ░██░███████░░░░░ ░░█████ ░███████ ░██ ░██ ░███████ ░██ ░ | |
# ░██ ░██ ░██░██░░░░ ░░░░░██░██░░░░ ░██ ░██ ░██░░░░ ░██ | |
# ░░██ ░██ ███░░██████ ██████ ░░██████ ░░██ ░░██ ░░██████░███ | |
# ░░ ░░ ░░░ ░░░░░░ ░░░░░░ ░░░░░░ ░░ ░░ ░░░░░░ ░░░ | |
# Aids in setting stupid tiles as X11 background; tints and tiles; |
This file contains 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 python2.7 | |
#based on https://gist.github.com/hhatto/6405956 from hhato | |
import sys | |
new_vim_color = [] | |
xtermMap = { | |
'0': '#000000', '1': '#800000', '2': '#008000', '3': '#808000', '4': '#000080', | |
'5': '#800080', '6': '#008080', '7': '#c0c0c0', '8': '#808080', '9': '#ff0000', | |
'10': '#00ff00', '11': '#ffff00', '12': '#0000ff', '13': '#ff00ff', '14': '#00ffff', |
This file contains 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 i3 | |
outputs = i3.get_outputs() | |
workspaces = i3.get_workspaces() | |
# figure out what is on, and what is currently on your screen. | |
workspace = list(filter(lambda s: s['focused']==True, workspaces)) | |
output = list(filter(lambda s: s['active']==True, outputs)) |
This file contains 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 | |
# based on http://stackoverflow.com/questions/7052947/split-95mb-json-array-into-smaller-chunks | |
# usage: python json-split filename.json | |
# produces multiple filename_0.json of 1.49 MB size | |
import json | |
import sys | |
with open(sys.argv[1],'r') as infile: | |
o = json.load(infile) |
This file contains 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
*background: #1e2132 | |
*foreground: #c6c8d1 | |
! black | |
*color0: #2a3158 | |
*color8: #444b71 | |
! red | |
*color1: #e27878 | |
*color9: #e2a478 | |
! green | |
*color2: #89b8c2 |
This file contains 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 i3 | |
def getCurrentScreen(): | |
workspace = [ws for ws in i3.get_workspaces() if ws['focused']][0] | |
screen_w =str(workspace['rect']['width']) | |
screen_h =str(workspace['rect']['height']) | |
print(screen_w, screen_h); |
This file contains 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 i3 | |
import re | |
import sys | |
from time import sleep | |
import json | |
#resize <grow|shrink> <direction> [<px> px [or <ppt> ppt]] | |
barHeight = 18 |
This file contains 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 | |
find ~/.config/OpenRCT2/Scenarios/ -iname "*sc6" -print0 | while IFS= read -r -d '' path; do | |
name=$(basename "$path") | |
$(openrct2 screenshot "$path" /tmp/Scenarios/"$name".png 1024 1024 0 50 3 0) | |
done |
This file contains 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
<h2 id="examples">Examples</h2> | |
<p><strong><a href="http://www.ted.com/talks/nicholas_christakis_how_social_networks_predict_epidemics.html">Nicholas Christakis: How social networks predict epidemics</a></strong></p> | |
<p><img src="http://www.well.com/user/abs/Cyb/archive/c3m_1101_pix/EpidemicViz.jpg" alt="The Spread of Flu, Harvard College, 2009" title=""></p> | |
<blockquote> | |
<p>Want to predict the next big epidemic? Map real-life social networks, <br> | |
like friendships and workplace relationships. In this talk from <br> | |
TED@Cannes, Nicholas Christakis shows how monitoring the friends of <br> |
NewerOlder