From 19167c2e555bd5901be866374adc0249b39982af Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Sun, 8 Mar 2015 19:45:47 +0100 Subject: [PATCH 1/3] 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; - } - } -} - From 72106b17b15a42d6db084143368c5d6583f773c7 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Sat, 14 Mar 2015 13:51:29 +0100 Subject: [PATCH 2/3] Change the project name to lemonbar --- Makefile | 34 +++++++++++++++++++++------------- README.pod | 22 +++++++++++----------- bar.c => lemonbar.c | 3 ++- 3 files changed, 34 insertions(+), 25 deletions(-) rename bar.c => lemonbar.c (99%) diff --git a/Makefile b/Makefile index 50fb285..24800a5 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,19 @@ -CC ?= gcc -CFLAGS = -Wall -std=c99 -Os -LDFLAGS = -lxcb -lxcb-xinerama -lxcb-randr -CFDEBUG = -g3 -pedantic -Wall -Wunused-parameter -Wlong-long\ - -Wsign-conversion -Wconversion -Wimplicit-function-declaration +# This snippet has been shmelessly stol^Hborrowed from thestinger's repose Makefile +VERSION = 1.1 +GIT_DESC=$(shell test -d .git && git describe --always 2>/dev/null) -EXEC = bar -SRCS = bar.c +ifneq "$(GIT_DESC)" "" + VERSION=$(GIT_DESC) +endif + +CC ?= gcc +CFLAGS += -Wall -std=c99 -Os -DVERSION="\"$(VERSION)\"" +LDFLAGS += -lxcb -lxcb-xinerama -lxcb-randr +CFDEBUG = -g3 -pedantic -Wall -Wunused-parameter -Wlong-long \ + -Wsign-conversion -Wconversion -Wimplicit-function-declaration + +EXEC = lemonbar +SRCS = lemonbar.c OBJS = ${SRCS:.c=.o} PREFIX?=/usr @@ -14,7 +22,7 @@ BINDIR=${PREFIX}/bin all: ${EXEC} doc: README.pod - pod2man --section=1 --center="bar Manual" --name "bar" --release="bar $(shell git describe --always)" README.pod > bar.1 + pod2man --section=1 --center="lemonbar Manual" --name "lemonbar" --release="lemonbar $(VERSION)" README.pod > lemonbar.1 .c.o: ${CC} ${CFLAGS} -o $@ -c $< @@ -29,12 +37,12 @@ clean: rm -f ./*.o ./*.1 rm -f ./${EXEC} -install: bar doc - install -D -m 755 bar ${DESTDIR}${BINDIR}/bar - install -D -m 644 bar.1 ${DESTDIR}${PREFIX}/share/man/man1/bar.1 +install: lemonbar doc + install -D -m 755 lemonbar ${DESTDIR}${BINDIR}/lemonbar + install -D -m 644 lemonbar.1 ${DESTDIR}${PREFIX}/share/man/man1/lemonbar.1 uninstall: - rm -f ${DESTDIR}${BINDIR}/bar - rm -f $(DESTDIR)$(PREFIX)/share/man/man1/bar.1 + rm -f ${DESTDIR}${BINDIR}/lemonbar + rm -f $(DESTDIR)$(PREFIX)/share/man/man1/lemonbar.1 .PHONY: all debug clean install diff --git a/README.pod b/README.pod index 2887a5b..afbed83 100644 --- a/README.pod +++ b/README.pod @@ -1,16 +1,16 @@ =head1 NAME -bar - bar ain't recursive +lemonbar - Featherweight lemon-scented bar =for HTML =head1 SYNOPSIS -I [-h | -g IBIB<+>IB<+>I | -b | -d | -f I | -p | -u I | -B I | -F I] +I [-h | -g IBIB<+>IB<+>I | -b | -d | -f I | -p | -u I | -B I | -F I] =head1 DESCRIPTION -B is a lightweight bar entirely based on XCB. Provides full UTF-8 support, basic formatting, RandR and Xinerama support and EWMH compliance without wasting your precious memory. +B (formerly known as B) is a lightweight bar entirely based on XCB. Provides full UTF-8 support, basic formatting, RandR and Xinerama support and EWMH compliance without wasting your precious memory. =head1 OPTIONS @@ -34,11 +34,11 @@ Force docking without asking the window manager. This is needed if the window ma =item B<-f> I -Comma separated list of fonts, bar supports a maximum of five fonts (the limit can be tweaked by changing the MAX_FONT_COUNT parameter in the source). +Comma separated list of fonts, lemonbar supports a maximum of five fonts (the limit can be tweaked by changing the MAX_FONT_COUNT parameter in the source). =item B<-p> -Make bar permanent, don't exit after the standard input is closed. +Make the bar permanent, don't exit after the standard input is closed. =item B<-u> I @@ -56,7 +56,7 @@ Set the foreground color of the bar. Accepts the same color formats as B<-B>. =head1 FORMATTING -bar provides a screenrc-inspired formatting syntax to allow full customization at runtime. Every formatting block is opened with B<%{> and closed by B<}> and accepts the following commands, the parser tries it's best to handle malformed input. +lemonbar provides a screenrc-inspired formatting syntax to allow full customization at runtime. Every formatting block is opened with B<%{> and closed by B<}> and accepts the following commands, the parser tries it's best to handle malformed input. =over @@ -86,7 +86,7 @@ Set the text foreground color. The parameter I can be I<-> or a color in =item BI -Set the font used to draw the following text. The parameter I is a 1-based index of the font list supplied to bar. Any other value (for example I<->) resets bar to normal behaviour (matching the first font that can be used for that character). If the selected font can't be used to draw a character, bar will fall back to normal behaviour for that character. +Set the font used to draw the following text. The parameter I is a 1-based index of the font list supplied to bar. Any other value (for example I<->) resets the bar to normal behaviour (matching the first font that can be used for that character). If the selected font can't be used to draw a character, lemonbar will fall back to normal behaviour for that character. =item BI @@ -98,7 +98,7 @@ Create a clickable area starting from the current position, when the area is cli Eg. I<%{A:reboot:} Click here to reboot %{A}> -The I