View main.rs
use std::cmp; | |
use std::collections::HashSet; | |
use std::env; | |
use std::fs::File; | |
use std::io::{BufRead, BufReader}; | |
struct LengthScanner { | |
length: isize, | |
current: (isize, isize), | |
quadrant: usize, |
View battery-block
#!/usr/bin/env python3 | |
# | |
# Copyright (C) 2016 James Murphy | |
# Licensed under the GPL version 2 only | |
# | |
# A battery indicator blocklet script for i3blocks | |
import gi | |
import re | |
import pathlib |
View pomodoro
#!/usr/bin/env python | |
import os | |
from gi.repository import Gtk | |
from gi.repository import GLib | |
POMODORO_TIME = 25 | |
BREAK_TIME = 5 | |
LONG_BREAK_TIME = 15 | |
LONG_BREAK_OCCURENCE = 4 |
View run-tryton-test
#!/usr/bin/zsh | |
if [ -z $VIRTUAL_ENV ]; then | |
echo 'Set a virtualenv first!' | |
exit 1 | |
fi | |
source $VIRTUAL_ENV/bin/activate | |
TRYTOND_CONFIG=$HOME/.trytond_test.conf PYTHONPATH=$PWD/proteus:$PWD/trytond ./trytond/trytond/tests/run-tests.py $*; | |
RETURN_CODE=$? |
View config.py
def scratchpad(window): | |
window.floating = True | |
screen = window.group.screen | |
window.tweak_float( | |
x=int(screen.width / 4), | |
y=int(screen.height / 4), | |
w=int(screen.width / 2), | |
h=int(screen.height / 2), | |
) |