From 19167c2e555bd5901be866374adc0249b39982af Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Sun, 8 Mar 2015 19:45:47 +0100 Subject: [PATCH] Remove the now useless palette.pl script --- palette.pl | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100755 palette.pl diff --git a/palette.pl b/palette.pl deleted file mode 100755 index 3a82fca..0000000 --- a/palette.pl +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env perl -# -# palette.pl -# -# Converts your .Xdefault/.Xresources colors into a ready to paste palette -# for bar. It takes your foreground/background settings into account and if -# it cant find them it leaves COLOR0/COLOR1 undefined. -# - -use strict; -use warnings; - -open (F, "<".$ARGV[0]) || die "Can't open!"; - -our %vars = (); - -while () { - # Don't match comments - if ($_ !~ m/^\s*!/) { - # It's a define! - if ($_ =~ m/^\s*#define\s+(\w+)\s+#([0-9A-Fa-f]{1,6})/) { - $vars{"$1"} = hex($2); - } - elsif ($_ =~ m/^\s*\w*\*(background|foreground|color\d)\s*:\s*([\w\d#]+)/) { - my ($name, $value) = (uc $1, $2); - # Check if it's a color - if (substr($value, 0, 1) eq '#') { - $value = hex(substr($value, 1)); - } else { - $value = $vars{"$value"}; - } - printf "#define $name 0x%06x\n", $value; - } - } -} -