Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
require 'neatjson'
@hash = {}
begin
loop do
sleep 15
x = `xprop -id $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) _NET_WM_NAME`
x = x.match(/.*\"(.*)\"\n\z/)[1][0..60]
@hash[x] = @hash[x].to_f + 0.25
anonymous
anonymous / IRC client in pure bash 4
Created March 28, 2016 16:57
IRC client written in pure bash using only bash builtin commands and no other binaries.
#!/bin/bash
#no PATH, no way to accidently run any programs
PATH=''
#useful variables
term_height=0
term_width=0
term_scroll_height=0
status_line_row=0
@pachacamac
pachacamac / tiler.rb
Last active July 29, 2017 08:44
simple tiling script
#!/usr/bin/env ruby
# DESCRIPTION:
# This is a script to rearrange your windows like this:
# _________________________ _________________________
# | _________ | x| | | major x| minor x|
# | | major x |__| | | | |____________|
# | | | |_____| | --> | | minor x|
# | |_________| | ______ | | |____________|
# | |______|| x|| | | minor x|