[dev] sprop: simple xprop replacement

From: Connor Lane Smith <cls_AT_lubutu.com>
Date: Mon, 5 Apr 2010 02:08:45 +0000

Hey all,

Mostly for fun, here's a simple replacement for xprop. It's 64 LOC,
compared to xprop's god-knows-how-many. It needs to be linked with
Xlib. Something like:
$ cc -o sprop sprop.c -lX11

It doesn't have the same arguments as xprop, but it can replace xprop
in surf's config.h like so:

12,13c12
< "prop=\"`xprop -id $1 $0 | cut -d '\"' -f 2 | dmenu`\" &&" \
< "xprop -id $1 -f $0 8s -set $0 \"$prop\"", \

---
> "prop=\"`sprop $1 $0 | dmenu`\" && sprop $1 $0 \"$prop\"", \
(If you pull dmenu tip you can also use flags like "-e $1 -l 1", which
is awesome.)
There is no real point besides "less is more".
Happy Easter!
cls

Received on Mon Apr 05 2010 - 02:08:45 UTC

This archive was generated by hypermail 2.2.0 : Mon Apr 05 2010 - 02:12:02 UTC