sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit eb25541d67c1d16742ea113821964016f2070fa1
parent 7de0428a8f89ee6e3ee4e9ce7e74c3a5df06a171
Author: luk <mail-login+gitlab@protonmail.com>
Date:   Sat, 28 Mar 2020 16:27:10 +0100

Added explanations for the usage of this patch

In order to make this good the enumeration was reformatted
and an additional example is provided

Diffstat:
Mdwm.suckless.org/patches/status2d/index.md | 35++++++++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/dwm.suckless.org/patches/status2d/index.md b/dwm.suckless.org/patches/status2d/index.md @@ -16,21 +16,42 @@ Download Usage ----- -* ^rx,y,w,h^: draw a rectangle. +* __^rx,y,w,h^__ + Draw a rectangle of width w and height h, with its top left corner at (x,y) relative the X drawing cursor. -* ^c#FF0000^: set foreground color. -* ^b#55cdfc^: set background color, only applies to text, use the ^r^ command to add backgrounds to your drawings +* __^c#FF0000^__ + Set foreground color. -* ^f11^: forward the x drawing cursor, only needed for drawings, not text. -* ^d^: reset colors to SchemeNorm. +* __^b#55cdfc^__ + Set background color, only applies to text, simply use the ^r^ command to change the background while drawing. + + +* __^f<px>^__ + Forward the X drawing cursor by <px> pixel. Please bear in mind that you have to move the cursor enough to + display your drawing (by the with of your drawing). + + +* __^d^__ + Reset colors to SchemeNorm. Example ------- -xsetroot -name "[status2d] ^c#FF0000^red text with blue +`xsetroot -name "[status2d] ^c#FF0000^red text with blue rectangle^c#55cdfc^^r3,3,14,14^^f20^^c#FFFFFF^^b#f7a8b8^ -and white text on pink background " +and white text on pink background "` + + +### Steps to draw a battery icon (ajust the values to fit your setup) +Draw the nose: `"^r00,07,02,04^"` +Draw the battery: `"^r02,04,22,10^"` +Fill it so that the border stays: `"^c#000000^^r03,05,20,08^"` +Fill it with the remaining capacaty: `"^c#ffffff^^r10,05,13,08^"` +Reset the colorscheme and forward the cursor: `"^d^^f24^"` + +Put it all together: +`xsetroot -name "^r0,7,2,4^^r2,4,22,10^^c#000000^^r3,5,20,8^^c#ffffff^^r10,5,13,8^^d^^f24^"` Authors -------