update README.md

This commit is contained in:
Roland Hollós 2020-11-23 11:26:51 +01:00
parent ca64c5b835
commit 93b434ff7b
2 changed files with 14 additions and 2 deletions

View File

@ -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)

View File

@ -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.