Skip to content

Instantly share code, notes, and snippets.

View Lokaltog's full-sized avatar

Kim A. Ødegaard Lokaltog

View GitHub Profile
@Lokaltog
Lokaltog / gist:9365062
Created March 5, 2014 10:51
wkline segfault
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
@Lokaltog
Lokaltog / wm.c
Last active August 29, 2015 13:56
Dump window manager info to JSON (for usage with wkline)
#include <fcntl.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <webkit/webkit.h>
@Lokaltog
Lokaltog / em.py
Created August 25, 2013 11:26
EasyMotion 2 jump text proof-of-concept
#!/usr/bin/env python
text = '''
lorem ipsum dolor sit amet, consectetur adipiscing elit. suspendisse
sagittis sollicitudin cursus. proin quis nisl tempus, facilisis nisl
volutpat, consectetur ipsum. sed congue, mauris a vestibulum
condimentum, elit nulla lacinia arcu, id eleifend metus magna in lacus.
nam vel nisi a a a a a a a b b b b b ab ab ab ab ab consectetur,
aliquam ligula egestas, interdum mauris. maecenas in mauris quis velit
@Lokaltog
Lokaltog / fish_prompt.py
Created May 21, 2013 08:03
Powerline fish prompt renderer test
# vim:fileencoding=utf-8:noet
from powerline.renderer import Renderer
from powerline.colorscheme import ATTR_BOLD, ATTR_ITALIC, ATTR_UNDERLINE
def int_to_rgb(num):
r = (num >> 16) & 0xff
g = (num >> 8) & 0xff
b = num & 0xff
@Lokaltog
Lokaltog / client.py
Created March 12, 2013 14:37
Powerline client-server memoization test
from multiprocessing.connection import Client
import time
for i in range(1, 10):
conn = Client('/tmp/pl-mp-test')
print('**** Query server')
conn.send(['f1', dict(param='test')])
conn.send(['f2', dict()])
try:
while True:
@Lokaltog
Lokaltog / 10-powerline-symbols.conf
Created January 18, 2013 11:37
Powerline fontconfig
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>monospace</family>
<prefer><family>PowerlineSymbols</family></prefer>
</alias>
<alias>
<family>Droid Sans Mono</family>
@Lokaltog
Lokaltog / default.json
Created November 26, 2012 07:47
Proposed Powerline theme syntax
{
"name": "default",
"segments": {
"left": [
{
"type": "function",
"name": "mode"
},
{
"type": "function",
@Lokaltog
Lokaltog / colorscheme.py
Created November 13, 2012 08:53
Powerline config idea
class Colorscheme:
COLOR_LIGHTBLUE = 123
COLOR_MEDIUMBLUE = 123
COLOR_DARKBLUE = 123
COLOR_...
class SolarizedColorscheme(Colorscheme):
COLOR_LIGHTBLUE = 321
COLOR_...
# Contributor: Lokaltog <kimmern@lokaltog.net>
packager="slaveriq <arch@plassmann.biz>"
pkgname=wimp-no
pkgver=1.5.9
license='custom'
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="Adobe Air based streaming client for the Telenor Wimp service. Norwegian version, english language available."
url=('http://getwimp.com')