Skip to content

Instantly share code, notes, and snippets.

View lytithwyn's full-sized avatar
💭
Closing dumb notifications that say I can set my status

Matthew Morgan lytithwyn

💭
Closing dumb notifications that say I can set my status
View GitHub Profile
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <assert.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
Display *dpy = XOpenDisplay(NULL);
require 'coderay'
language = "auto";
if(ARGV.length > 0)
language = ARGV[0];
end
codeToHighlight = `xsel --clipboard`
highlightedCode = CodeRay.scan(codeToHighlight, language.intern()).div