diff --git a/Makefile b/Makefile index a12c4de..4e7cbb5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ TARGET=fiboBG +DEST=$(HOME)/.local/bin SRC=main.c # DEBUG=-g DEBUG= $(TARGET): main.c config.h gcc -Wall -Wextra $(DEBUG) $(SRC) `pkg-config --cflags --libs cairo x11` -o $(TARGET) -lm +install: + cp $(TARGET) $(DEST)/ +uninstall: + rm $(DEST)/$(TARGET) diff --git a/README.md b/README.md index c35ba9e..f084e49 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,16 @@ make ``` ## Usage -In xinitrc run the compiled program in background before window manager. -*Optional* +In xinitrc, run the compiled program in background before window manager! If you have a compositor (only compton tested) you can make a dynamical background more usable with setting your terminal alpha parameter. +The program was tested in a system which uses compton, dwm (with ewmhtags, fakefullscreen, and pertag patches), st (with alpha patch). ## Implementation +The program uses only Xlib and Cairo library beside of the standards. It draws the Fibonacci clock with Cairo into a Pixmap, and directly onto the root window (in case of missing compositor). After writing the root window _\_XROOTPMAP\_ID_ property (char* casted Pixmap*) the compositor automatically draws this Pixmap onto the root window (it will be the background). + +Thanks richardgv's comment on this [issue](https://github.com/chjj/compton/issues/225), it helped a lot. Without this comment I would not have known how to draw background when using compositor. + +Figuring out all parameters and usage of XChangeProperty was really hard. Here reading the source code of feh helped a lot. + +