29 |
#include <unistd.h> |
#include <unistd.h> |
30 |
#include <sys/sysinfo.h> |
#include <sys/sysinfo.h> |
31 |
#include <time.h> |
#include <time.h> |
32 |
|
#include <X11/extensions/shape.h> |
33 |
|
#include "pixmask.xbm" |
34 |
|
|
35 |
/* This is a debug marking function. */ |
/* This is a debug marking function. */ |
36 |
#define ARBUG \ |
#define ARBUG \ |
129 |
char *hostname=getenv("HOSTNAME"); |
char *hostname=getenv("HOSTNAME"); |
130 |
|
|
131 |
get_values(); |
get_values(); |
|
arshell_set_foreground(215, 215, 215); |
|
|
XFillRectangle(display, iconwin, gc, 0, 0, 64, 64); |
|
132 |
getloadavg(load, 3); |
getloadavg(load, 3); |
133 |
arshell_set_foreground(0, 0, 0); |
arshell_set_foreground(0, 0, 0); |
134 |
XFillRectangle(display, iconwin, gc, 4, 4, 56, 56); |
XFillRectangle(display, iconwin, gc, 4, 4, 56, 56); |
213 |
/*XTextProperty name;*/ |
/*XTextProperty name;*/ |
214 |
XGCValues gcv; |
XGCValues gcv; |
215 |
unsigned long gcm; |
unsigned long gcm; |
216 |
|
Pixmap pixmask; |
217 |
|
|
218 |
display=XOpenDisplay((char*)getenv("DISPLAY")); |
display=XOpenDisplay((char*)getenv("DISPLAY")); |
219 |
if(display == NULL) |
if(display == NULL) |
272 |
gcv.background = WhitePixel(display, DefaultScreen(display)); |
gcv.background = WhitePixel(display, DefaultScreen(display)); |
273 |
gcv.graphics_exposures = 0; |
gcv.graphics_exposures = 0; |
274 |
gc = XCreateGC(display, DefaultRootWindow(display), gcm, &gcv); |
gc = XCreateGC(display, DefaultRootWindow(display), gcm, &gcv); |
275 |
|
|
276 |
|
pixmask = XCreateBitmapFromData(display, window, |
277 |
|
(const char*)pixmask_bits, |
278 |
|
pixmask_width, pixmask_height); |
279 |
|
XShapeCombineMask(display, window, ShapeBounding, 0, 0, |
280 |
|
pixmask, ShapeSet); |
281 |
|
XShapeCombineMask(display, iconwin, ShapeBounding, 0, 0, |
282 |
|
pixmask, ShapeSet); |
283 |
|
|
284 |
mywmhints.initial_state = WithdrawnState; |
mywmhints.initial_state = WithdrawnState; |
285 |
mywmhints.icon_window = iconwin; |
mywmhints.icon_window = iconwin; |
286 |
mywmhints.icon_x = mysizehints.x; |
mywmhints.icon_x = mysizehints.x; |