diff --git a/Makefile b/Makefile index 5de8e52..adc88e5 100644 --- a/Makefile +++ b/Makefile @@ -28,13 +28,13 @@ OBJS = grabc.o rm -f $@ $(CC) $(CFLAGS) -c $*.c -all: $(PROGNAME) +all: $(PROGNAME) doc $(PROGNAME) : $(OBJS) $(CC) $(CFLAGS) -o $(PROGNAME) $(OBJS) $(LIBS) doc: - pod2man grabc.pod > grabc.1 + pod2man -cSlackBuilds.org -r1.0.2 grabc.pod > grabc.1 install: installdirs install-bin install-man diff --git a/grabc.pod b/grabc.pod index 85f2c2f..627bc22 100644 --- a/grabc.pod +++ b/grabc.pod @@ -4,42 +4,75 @@ grabc - A tool to identify a pixel color of an X Window. =head1 SYNOPSIS - grabc v1.0.2 - A program to identify a pixel color of an X Window - by muquit@muquit.com https://www.muquit.com/ - - Usage: grabc [options] - Where the options are: - -v - show version info - -h - show this usage - -hex - print pixel value as Hex on stdout - -rgb - print pixel value as RGB on stderr - -W - print the Window id at mouse click - -w id - window id in hex, use -l +x+y - -l +x+y - pixel co-ordinate. requires window id - -d - show debug messages - -a - Print all 16 bits of color. Default is high order 8 bits - Example: - * Print pixel color in hex on stdout: - $ grabc - * Show usage: - $ grabc -h - * Print Window Id (Note the upper case W): - $ grabc -W - * Print pixel color of Window iwith id 0x13234 at location 10,20 - $ grabc -w 0x13234 -l +10+20 +grabc [B<-v>] [B<-h>] [B<-W>] [B<-d>] [B<-a>] [B<-hex>] [B<-rgb>] [B<-w> I] [B<-l> +I+I] + +=head1 OPTIONS + +=over 4 + +=item B<-v> + +Show version info and exit. + +=item B<-h> + +Show usage and exit. + +=item B<-hex> + +Print pixel value as Hex on B. + +=item B<-rgb> + +Print pixel value as RGB on B. + +=item B<-W> + +Print the window id at mouse click. + +=item B<-w> I + +Window id in hex, use with B<-l> I<+x+y>. + +=item B<-l> I<+x+y> + +Pixel co-ordinate. Requires window id. + +=item B<-d> + +Show debug messages. + +=item B<-a> + +Print all 16 bits of color. Default is high order 8 bits. + +=back =head1 DESCRIPTION -grabc is a simple but very useful program to determine the color string in +B is a simple but very useful program to determine the color string in hex (or in RGB components) by clicking on a pixel on the screen. While web -browsing, lots of time you find a nice color and wonder what color is that. -Well just use grabc! +browsing, lots of times you find a nice color and wonder, "What color is that"? +Well, just use B! When this program is run, the mouse pointer is grabbed and changed to a cross hair and when the mouse is clicked, the color of the clicked pixel is written to stdout in hex prefixed with #. +=head1 EXAMPLES + +Print pixel color in hex on stdout: + + $ grabc + +Print Window Id (Note the upper case W): + + $ grabc -W + +Print pixel color of window with id 0x13234 at location 10,20 + + $ grabc -w 0x13234 -l +10+20 + =head1 LICENSE MIT @@ -47,4 +80,7 @@ MIT =head1 AUTHOR grabc is written by Muhammad Muquit Emuquit@muquit.comE. + +=head1 SEE ALSO + Homepage: L.