1
0
mirror of https://github.com/gryf/wmtemp.git synced 2026-05-10 16:33:03 +02:00

20 Commits

Author SHA1 Message Date
gryf 8a1776fe09 Moved makefile to the top directory. Version bump. 2017-12-11 10:16:53 -08:00
gryf 2fbe3c59e5 Get rid of wmgeneral directory.
For now 'wmgeneral' was used for accessing common dockapps functions.
Those functions was extracted to the library called libdockapp[1]. This
patch removes wmgeneral directory and make use of libdockapp library.

[1] http://www.dockapps.net/libdockapp
2017-12-11 10:15:33 -08:00
gryf e89b081f45 Fix for commented out paths for temperature input in config 2017-01-04 10:53:09 +01:00
gryf bc93777806 Fixed typo in readme 2016-12-25 19:24:42 +01:00
gryf 68c7c63532 Renamed project to wmtemp 2016-07-03 10:40:00 +02:00
gryf 95550e120a Added possibility to read config from file 2016-07-03 08:45:55 +02:00
gryf 53b145f044 re-added repaint of the fields, added sane limits for the i7 cpu 2014-01-19 19:19:45 +01:00
gryf 4e87d06d7e Fixed compiler warnings 2014-01-19 16:55:52 +01:00
gryf 2615761d59 Four core version 2014-01-19 16:52:07 +01:00
gryf fb2374178c README update 2013-10-06 16:23:23 +02:00
gryf d029966151 Added option for reading GPU temperature from sysfs 2013-10-06 16:19:28 +02:00
gryf 85bd74b4f5 Updated README 2013-03-23 12:33:57 +01:00
gryf e707cf4d33 fixed typo 2012-05-30 11:28:46 +02:00
gryf c8ac94080c Added tag 0.1 for changeset 7e2b77c0fa7f 2012-05-30 11:23:30 +02:00
gryf 53e3358e73 Added tag 0.4 for changeset 4d9dcd7e2dca 2012-05-30 11:23:22 +02:00
gryf 4e3058820d removed hgtags 2012-05-30 11:22:48 +02:00
gryf ac503a1ee5 Using NVCtrlLib library instead of nvidia-settings program. Refactoring and
code cleanup. Changed version to 0.4.0
2012-05-30 11:21:27 +02:00
gryf 4e92b6f5ca Added tag help for changeset 1ebdda9bbf87 2012-05-30 11:18:59 +02:00
gryf 0c442e8e90 Reverted code to nvidia-settings approach since nvclock stopped working with
nvidia drivers 295.40. To conserve resources there is delay in running
nvidia-settings utility in contrast to CPU temp readings.
2012-05-30 11:04:50 +02:00
gryf 28d2a7fd2e Attempt to use nvclock code for reading GPU temperature, since running
nvidia-settings couple of times for a second is highly inefficient.
2012-05-30 11:01:21 +02:00
18 changed files with 888 additions and 1339 deletions
+6 -8
View File
@@ -1,34 +1,32 @@
# By RedSeb 1999, Liverbugg 2002 # By RedSeb 1999, Liverbugg 2002
SRC = src/wmtemp.c
SRC = wmtempnv.c ../wmgeneral/wmgeneral.c ../wmgeneral/misc.c ../wmgeneral/list.c EXE = src/wmtemp
EXE = wmtempnv
OBJ = $(SRC:.c=.o) OBJ = $(SRC:.c=.o)
CFLAGS = -Wall -O3 CFLAGS = -Wall -O3
LIB = -L/usr/X11R6/lib -lXpm -lXext -lX11 -lsensors LIB = -L/usr/X11R6/lib -lXpm -lXext -lX11 -ldockapp
INSTALL = /usr/bin/install INSTALL = /usr/bin/install
CC = gcc CC = gcc
all: $(OBJ) all: $(OBJ)
$(CC) -o $(EXE) $(OBJ) $(LIB) $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIB)
strip $(EXE) strip $(EXE)
$(OBJ): %.o : %.c $(OBJ): %.o : %.c
$(CC) $(CFLAGS) -c -o $@ $< $(CC) $(CFLAGS) -c -o $@ $<
clean: clean:
rm -rf $(EXE) rm -rf $(EXE) src/*.o
rm -rf *.o
rm -rf ../wmgeneral/*.o
install: install:
$(INSTALL) $(EXE) /usr/local/bin/ $(INSTALL) $(EXE) /usr/local/bin/
uninstall: uninstall:
rm -rf /usr/local/bin/$(EXE) rm -rf /usr/local/bin/$(EXE)
-4
View File
@@ -1,4 +0,0 @@
This is dead simple Windo Wmaker app for monitoring CPU and GPU temperature.
Hardcoded Core2 and Nvidia GPU support. Based on WMTempMon dockapp.
author: roman.dobosz@gmail.com
+71
View File
@@ -0,0 +1,71 @@
wmtemp
======
This is dead simple Window Maker app for monitoring CPU and GPU temperature.
Based on WMTempMon dockapp, although it was heavily reworked.
.. image:: /images/wmtemp.gif?raw=true
:alt: wmtemp transitions
Compile
-------
To build the dockapp, you'll need `libdockapp`_ it should be available in your
package repository. While you have it installed, perform the commands:
.. code:: shell-session
$ make
$ sudo make install
Binary will be installed in ``/usr/local/bin`` directory.
Configuration
-------------
To use the dockapp, you'll need to prepare configuration file, otherwise you'll
see 0 values for every core/gpu.
Wmtemp will look for configuration file in home directory. Here is sample
content of such file:
.. code:: shell-session
$ cat ~/.wmtemp
# wmtemp conf file
cpu1_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input
cpu1_critical = 80
cpu1_warning = 65
cpu2_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input
cpu2_critical = 80
cpu2_warning = 65
cpu3_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp4_input
cpu3_critical = 80
cpu3_warning = 65
cpu4_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp5_input
cpu4_critical = 80
cpu4_warning = 65
gpu_path = /sys/devices/virtual/hwmon/hwmon1/temp4_input
gpu_critical = 70
gpu_warning = 60
Every core have three options to change:
* ``[core]_path`` - path to temperature file to read from. The content of such
file contains a number of temperature in mili-Celsius.
* ``[core]_critical`` - temperature in °C, on which (and beyond) red color would
be used for highlight the entry.
* ``[core]_warning`` - temperature in °C, on which (and beyond) orange color
would be used for highlight the entry.
In main directory there is a ``wmtemp_sample`` file, which can be copied to
``~/.wmtemp`` and tweaked according to the needs and hardware.
Licence
-------
This software is licensed under GPL2 license. See COPYING file for details.
.. _libdockapp: http://www.dockapps.net/libdockapp
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

+363
View File
@@ -0,0 +1,363 @@
/*
* wmtemp: a temperature monitor for WindowMaker. This little app is mainly
* based on wmsensormon and other simple dockapps, although it doesn't use
* lmsensors, just provided information from kernel via /sys filesystem.
*
* version = 0.7
*
* licence: GPL2
*/
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <sys/param.h>
#include <sys/types.h>
#include "standards.h"
#include <X11/Xlib.h>
#include <X11/xpm.h>
#include <X11/extensions/shape.h>
#include <libdockapp/wmgeneral.h>
#include <libdockapp/misc.h>
#include "wmtemp_master.xpm"
#include "wmtemp_mask.xbm"
#define MAXLEN 200
#define MAXFNAME 70
#define MAXCORENUM 4
struct entry {
char *path;
long critical;
long warning;
};
struct config {
struct entry cpu1;
struct entry cpu2;
struct entry cpu3;
struct entry cpu4;
struct entry gpu;
};
char cpu1_path[100];
int cpu1_warn = 0;
int cpu1_crit = 0;
char cpu2_path[100];
int cpu2_warn = 0;
int cpu2_crit = 0;
char cpu3_path[100];
int cpu3_warn = 0;
int cpu3_crit = 0;
char cpu4_path[100];
int cpu4_warn = 0;
int cpu4_crit = 0;
char gpu1_path[100];
int gpu1_warn = 0;
int gpu1_crit = 0;
typedef struct _core {
int temp;
/* offset is one of 0 (normal), 7 (critical), 14 (warning) */
short offset;
} core;
Display *display;
char *vcopy(char *str);
int get_gpu_temp(char *path, Display *disp);
int get_temp(struct entry *etr);
short get_offset(short temp, struct entry *etr);
void conf_read(char *filename);
void display_help(char *progname);
void display_values(int, short, short);
void draw_cpu_temp(short core_no, core *cpu);
void draw_gpu_temp(core *gpu);
void read_file_into(char *filepath, int *output);
void set_defaults(struct config *conf);
char *strip(char * string);
void parse_config(struct config *conf);
int main(int argc, char **argv){
int i;
short counter = 0;
struct config conf;
set_defaults(&conf);
parse_config(&conf);
display = XOpenDisplay(NULL);
core gpu, *cpus = malloc(MAXCORENUM * sizeof (core));
if (argc > 1) {
if (argc > 2) {
display_help(argv[0]);
exit(2);
}
if (argc == 2 &&
(strcmp(argv[1], "--help") == 0 ||
strcmp(argv[1], "-h") == 0)) {
display_help(argv[0]);
exit(0);
}
}
openXwindow(argc, argv, wmtemp_master, wmtemp_mask_bits,
wmtemp_mask_width, wmtemp_mask_height);
while(TRUE){
if (counter < 1){
counter = 5;
cpus[0].temp = get_temp(&conf.cpu1);
cpus[0].offset = get_offset(cpus[0].temp, &conf.cpu1);
cpus[1].temp = get_temp(&conf.cpu2);
cpus[1].offset = get_offset(cpus[1].temp, &conf.cpu2);
cpus[2].temp = get_temp(&conf.cpu3);
cpus[2].offset = get_offset(cpus[2].temp, &conf.cpu3);
cpus[3].temp = get_temp(&conf.cpu4);
cpus[3].offset = get_offset(cpus[3].temp, &conf.cpu4);
gpu.temp = get_temp(&conf.gpu);
gpu.offset = get_offset(gpu.temp, &conf.gpu);
}
// cpu's
for (i=0; i < 4; i++){
draw_cpu_temp(i, &cpus[i]);
}
// gpu
draw_gpu_temp(&gpu);
RedrawWindow();
counter--;
usleep(100000);
}
free(conf.cpu1.path);
free(conf.cpu2.path);
free(conf.cpu3.path);
free(conf.cpu4.path);
free(conf.gpu.path);
}
void set_defaults(struct config *conf) {
struct config configuration;
configuration = *conf;
configuration.cpu1.critical = 80;
configuration.cpu1.warning = 65;
configuration.cpu2.critical = 80;
configuration.cpu2.warning = 65;
configuration.cpu3.critical = 80;
configuration.cpu3.warning = 65;
configuration.cpu4.critical = 80;
configuration.cpu4.warning = 65;
configuration.gpu.critical = 80;
configuration.gpu.warning = 65;
configuration.cpu1.path = malloc(sizeof(char));
strcpy(configuration.cpu1.path, "");
configuration.cpu2.path = malloc(sizeof(char));
strcpy(configuration.cpu2.path, "");
configuration.cpu3.path = malloc(sizeof(char));
strcpy(configuration.cpu3.path, "");
configuration.cpu4.path = malloc(sizeof(char));
strcpy(configuration.cpu4.path, "");
configuration.gpu.path = malloc(sizeof(char));
strcpy(configuration.gpu.path, "");
*conf = configuration;
}
char *strip(char * string) {
char *string1 = string,
*string2 = &string[strlen (string) - 1];
/* Strip right side */
while ((isspace(*string2)) && (string2 >= string1))
string2--;
*(string2+1) = '\0';
/* Strip left side */
while ((isspace(*string1)) && (string1 < string2))
string1++;
strcpy (string, string1);
return string;
}
void parse_config(struct config *conf) {
char *item,
*conf_file,
buff[256],
name[MAXLEN],
value[MAXLEN];
struct config cfg;
FILE *fp;
conf_file = malloc(strlen(getenv("HOME")) + strlen("/.wmtemp") + 1);
sprintf(conf_file, "%s/.wmtemp", getenv("HOME"));
cfg = *conf;
fp = fopen (conf_file, "r");
if (fp == NULL) {
return;
}
while ((item = fgets (buff, sizeof buff, fp)) != NULL) {
if (buff[0] == '\n' || buff[0] == '#')
continue;
/* Parse name/value pair from item */
item = strtok(buff, "=");
strip(item);
if (item == NULL)
continue;
else
strncpy (name, item, MAXLEN);
item = strtok (NULL, "=");
if (item == NULL)
continue;
else
strncpy (value, item, MAXLEN);
strip(value);
if (strncmp(name, "cpu1_path", 9) == 0){
free(cfg.cpu1.path);
cfg.cpu1.path = malloc(sizeof(value) + 1);
strcpy(cfg.cpu1.path, value);
}
if (strncmp(name, "cpu2_path", 9) == 0){
free(cfg.cpu2.path);
cfg.cpu2.path = malloc(sizeof(value) + 1);
strcpy(cfg.cpu2.path, value);
}
if (strncmp(name, "cpu3_path", 9) == 0){
free(cfg.cpu3.path);
cfg.cpu3.path = malloc(sizeof(value) + 1);
strcpy(cfg.cpu3.path, value);
}
if (strncmp(name, "cpu4_path", 9) == 0){
free(cfg.cpu4.path);
cfg.cpu4.path = malloc(sizeof(value) + 1);
strcpy(cfg.cpu4.path, value);
}
if (strncmp(name, "gpu_path", 8) == 0){
free(cfg.gpu.path);
cfg.gpu.path = malloc(sizeof(value) + 1);
strcpy(cfg.gpu.path, value);
}
if (!strcmp(name, "cpu1_critical"))
cfg.cpu1.critical = atoi(value);
if (!strcmp(name, "cpu2_critical"))
cfg.cpu2.critical = atoi(value);
if (!strcmp(name, "cpu3_critical"))
cfg.cpu3.critical = atoi(value);
if (!strcmp(name, "cpu4_critical"))
cfg.cpu4.critical = atoi(value);
if (!strcmp(name, "gpu_critical"))
cfg.gpu.critical = atoi(value);
if (!strcmp(name, "cpu1_warning"))
cfg.cpu1.warning = atoi(value);
if (!strcmp(name, "cpu2_warning"))
cfg.cpu2.warning = atoi(value);
if (!strcmp(name, "cpu3_warning"))
cfg.cpu3.warning = atoi(value);
if (!strcmp(name, "cpu4_warning"))
cfg.cpu4.warning = atoi(value);
if (!strcmp(name, "gpu_warning"))
cfg.gpu.warning = atoi(value);
}
*conf = cfg;
fclose (fp);
free(conf_file);
}
short get_offset(short temp, struct entry *etr){
if(temp >= etr->critical){
return 7; // Alert
}else if(temp >= etr->warning){
return 14; // Warning
}else{
return 0; // Normal
}
}
void display_values(int temp, short offset, short core2_offset){
char text[5], num1, num2, num3, num4;
sprintf(text, "%03d", temp);
num1 = (text[0] - '0');
num2 = (text[1] - '0');
num3 = (text[2] - '0');
num4 = (text[3] - '0');
if(num1)
copyXPMArea(5 * num1, 65 + core2_offset, 5, 7, 31, 7 + offset);
else
copyXPMArea(60, 65 + core2_offset, 5, 7, 31, 7 + offset);
copyXPMArea(5 * num2, 65 + core2_offset, 5, 7, 38, 7 + offset);
copyXPMArea(5 * num3, 65 + core2_offset, 5, 7, 45, 7 + offset);
copyXPMArea(5 * num4, 65 + core2_offset, 5, 7, 51, 7 + offset);
}
int get_temp(struct entry *etr){
int core_temp = 0;
read_file_into(etr->path, &core_temp);
return core_temp;
}
void read_file_into(char *filepath, int *output) {
// Read an integer from the provided filepath and write it in the address
FILE *fp;
if((fp = fopen(filepath, "r")) != NULL){
if(fscanf(fp, "%d", output) != EOF){
*output = *output / 1000;
fclose(fp);
}
}else{
*output = 0;
}
}
void draw_cpu_temp(short core_no, core *cpu) {
// Copy prepared bitmap for the core. Cores are enumerated from 0. offset
// is warning/critical (orange/red) shift in the bitmap
short y_offset = core_no * 9;
copyXPMArea(0, 87 + cpu->offset, 23, 7, 4, 7 + y_offset); // "CPU"
// number of cpu
copyXPMArea(5 + core_no * 5, 65 + cpu->offset, 5, 7, 22, 7 + y_offset);
copyXPMArea(66, 65 + cpu->offset, 9, 7, 51, 7 + y_offset); // "°C"
display_values(cpu->temp, y_offset, cpu->offset); // temp
}
void draw_gpu_temp(core *gpu) {
copyXPMArea(23, 87 + gpu->offset, 23, 7, 4, 49);
copyXPMArea(66, 65 + gpu->offset , 9, 7, 51, 49);
display_values(gpu->temp, 42, gpu->offset);
}
void display_help(char *progname){
printf("Dockapp for monitoring CPU and Nvidia GPU temperatures.\n");
printf("Usage:\n\t%s [full path for temp in sysfs]\n\n", progname);
printf("As an optional parameter you can provide `temp_input' ");
printf("full path from sysfs,\ncorresponding to your gfx card ");
printf("to read temperature from. Otherwise\nfunctionality of ");
printf("nv-control will be used (package nvidia-settings).\n");
}
+46
View File
@@ -0,0 +1,46 @@
#define wmtemp_mask_width 64
#define wmtemp_mask_height 64
static char wmtemp_mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+384
View File
@@ -0,0 +1,384 @@
/* XPM */
static char *wmtemp_master[] = {
/* columns rows colors chars-per-pixel */
"93 122 256 2 ",
" c black",
". c #0A3F00",
"X c #202020",
"o c #440000",
"O c #660000",
"+ c #542A00",
"@ c #177700",
"# c #7F7F07",
"$ c #004941",
"% c #007D71",
"& c #A50000",
"* c #A80000",
"= c #BF3F03",
"- c #C90000",
"; c #DF1F01",
": c #E00000",
"> c red",
", c #FA0400",
"< c #F50900",
"1 c #F10D00",
"2 c #EC1201",
"3 c #E81601",
"4 c #E31B01",
"5 c #DA2402",
"6 c #D62802",
"7 c #D12D02",
"8 c #CC3203",
"9 c #C83603",
"0 c #C33B03",
"q c #9F5F05",
"w c #BA4404",
"e c #B64804",
"r c #B14D04",
"t c #A85500",
"y c #AD5105",
"u c #A85605",
"i c #A35B05",
"p c #9A6406",
"a c #966806",
"s c #916D06",
"d c #8D7107",
"f c #887607",
"g c #847A07",
"h c #27B500",
"j c #3FBF0B",
"k c #5F9F09",
"l c #7A8408",
"z c #768808",
"x c #718D08",
"c c #6D9109",
"v c #689609",
"b c #649A09",
"n c #5BA30A",
"m c #56A80A",
"M c #51AD0A",
"N c #4DB10B",
"B c #48B60B",
"V c #44BA0B",
"C c #1FDF0D",
"Z c #3BC30C",
"A c #36C80C",
"S c #32CC0C",
"D c #2DD10D",
"F c #28D60D",
"G c #24DA0D",
"H c #1BE30E",
"J c #16E80E",
"K c #12EC0E",
"L c #0DF10F",
"P c #09F50F",
"I c #04FA0F",
"U c #00FF0F",
"Y c #3FFF00",
"T c #FF8200",
"R c blue",
"E c #188A86",
"W c #20B2AE",
"Q c #20B6AE",
"! c gray78",
"~ c black",
"^ c black",
"/ c black",
"( c black",
") c black",
"_ c black",
"` c black",
"' c black",
"] c black",
"[ c black",
"{ c black",
"} c black",
"| c black",
" . c black",
".. c black",
"X. c black",
"o. c black",
"O. c black",
"+. c black",
"@. c black",
"#. c black",
"$. c black",
"%. c black",
"&. c black",
"*. c black",
"=. c black",
"-. c black",
";. c black",
":. c black",
">. c black",
",. c black",
"<. c black",
"1. c black",
"2. c black",
"3. c black",
"4. c black",
"5. c black",
"6. c black",
"7. c black",
"8. c black",
"9. c black",
"0. c black",
"q. c black",
"w. c black",
"e. c black",
"r. c black",
"t. c black",
"y. c black",
"u. c black",
"i. c black",
"p. c black",
"a. c black",
"s. c black",
"d. c black",
"f. c black",
"g. c black",
"h. c black",
"j. c black",
"k. c black",
"l. c black",
"z. c black",
"x. c black",
"c. c black",
"v. c black",
"b. c black",
"n. c black",
"m. c black",
"M. c black",
"N. c black",
"B. c black",
"V. c black",
"C. c black",
"Z. c black",
"A. c black",
"S. c black",
"D. c black",
"F. c black",
"G. c black",
"H. c black",
"J. c black",
"K. c black",
"L. c black",
"P. c black",
"I. c black",
"U. c black",
"Y. c black",
"T. c black",
"R. c black",
"E. c black",
"W. c black",
"Q. c black",
"!. c black",
"~. c black",
"^. c black",
"/. c black",
"(. c black",
"). c black",
"_. c black",
"`. c black",
"'. c black",
"]. c black",
"[. c black",
"{. c black",
"}. c black",
"|. c black",
" X c black",
".X c black",
"XX c black",
"oX c black",
"OX c black",
"+X c black",
"@X c black",
"#X c black",
"$X c black",
"%X c black",
"&X c black",
"*X c black",
"=X c black",
"-X c black",
";X c black",
":X c black",
">X c black",
",X c black",
"<X c black",
"1X c black",
"2X c black",
"3X c black",
"4X c black",
"5X c black",
"6X c black",
"7X c black",
"8X c black",
"9X c black",
"0X c black",
"qX c black",
"wX c black",
"eX c black",
"rX c black",
"tX c black",
"yX c black",
"uX c black",
"iX c black",
"pX c black",
"aX c black",
"sX c black",
"dX c black",
"fX c black",
"gX c black",
"hX c black",
"jX c black",
"kX c black",
"lX c black",
"zX c black",
"xX c black",
"cX c black",
"vX c black",
"bX c black",
"nX c black",
"mX c black",
"MX c black",
"NX c black",
"BX c black",
"VX c black",
"CX c black",
"ZX c black",
"AX c black",
"SX c black",
"DX c black",
"FX c black",
"GX c black",
"HX c black",
"JX c black",
"KX c black",
"LX c black",
"PX c #57627A",
"IX c #B4B4B4",
"UX c white",
/* pixels */
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X Q Q Q X X % Q Q Q X X % $ $ $ % X X $ $ $ % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X Q X X X Q Q Q X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X Q X Q X X X Q X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X Q X Q X Q X X X Q X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X $ X Q X X X Q X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X Q X X Q X X X $ X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X % $ $ $ X X % Q Q Q X X % $ $ $ % X X $ $ $ % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X X X X % $ $ $ X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X $ X Q X X X $ X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X X X X Q X X X $ X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X Q X Q X X X $ X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X X X X Q X X X Q X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X Q Q Q X X % $ $ $ X X % Q Q Q % X X $ $ $ % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X X X X X Q Q Q X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X Q Q Q X X % Q Q Q X X % $ $ $ % X % Q Q Q % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X Q X X X Q Q Q X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X Q X Q X X X Q X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X Q X Q X Q X X X Q X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X $ X Q X X X Q X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X Q X X Q X X X $ X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X % $ $ $ X X % Q Q Q X X % $ $ $ % X % Q Q Q % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X X X X % $ $ $ X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X $ X Q X X X $ X Q X X X Q X Q X X X $ X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X X X X Q X X X $ X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X Q X Q X X X $ X Q X X X Q X Q X X X $ X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X X X X Q X X X Q X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X Q Q Q X X % $ $ $ X X X Q Q Q X X % Q Q Q % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X X X X X Q Q Q X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X Q Q Q X X % Q Q Q X X % $ $ $ % X % Q Q Q % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X Q X X X Q Q Q X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X Q X Q X X X Q X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X Q X Q X Q X X X Q X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X $ X Q X X X Q X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X Q X X Q X X X $ X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X % $ $ $ X X % Q Q Q X X % $ $ $ % X % Q Q Q % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X X X X % $ $ $ X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X $ X Q X X X $ X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X X X X Q X X X $ X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X Q X Q X X X $ X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X X X X Q X X X Q X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X Q Q Q X X % $ $ $ X X X Q Q Q X X % Q Q Q % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X X X X X Q Q Q X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X Q Q Q X X % Q Q Q X X % $ $ $ % X % $ $ $ % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X Q X X X Q Q Q X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X Q X Q X X X Q X Q X X X Q X Q X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X Q X Q X Q X X X Q X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X $ X Q X X X Q X Q X X X Q X Q X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X Q X X Q X X X $ X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X % $ $ $ X X % Q Q Q X X % $ $ $ % X % Q Q Q % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X X X X % $ $ $ X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X $ X Q X X X $ X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X X X X Q X X X $ X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X Q X Q X X X $ X Q X X X Q X $ X X X Q X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X X X X Q X X X Q X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X Q Q Q X X % $ $ $ X X X Q Q Q X X X $ $ $ % X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X X X X X Q Q Q X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X Q Q Q % X % Q Q Q X X % $ $ $ % X X $ $ $ X X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X Q X X X Q Q Q X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X $ X Q X X X Q X Q X X X Q X $ X X X $ X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X Q X Q X Q X X X Q X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X $ X Q X X X Q X Q X X X Q X $ X X X $ X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X Q X X Q X X X $ X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X % $ $ Q Q X % Q Q Q X X % $ $ $ % X X $ $ $ X X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X X X X % $ $ $ X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X Q X Q X X X $ X Q X X X Q X $ X X X $ X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X X X X Q X X X $ X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X Q X X X Q X Q X X X $ X Q X X X Q X $ X X X $ X X X X $ X X X $ X X $ X X X $ X X $ X X X $ X X X X X Q X X X Q X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X Q Q Q X X % $ $ $ X X X Q Q Q X X X $ $ $ X X X X X X $ $ $ X X X X $ $ $ X X X X $ $ $ X X X X X X X Q Q Q X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X . . . X X O O O X X X X X X R X X X X X X X X X X X X X X X X X X X X X X X X X R R ",
"X W W W X X $ $ $ E E W W W E E W W W E W $ $ $ W E W W W E E W W W E E W W W E E W W W E E W W W E . @ h @ . O & - & O X $ $ $ X R X Q X X X Q Q Q X X % Q % X % $ $ $ % X X W W W X R R ",
"W X X X W $ X X X W $ X X X W $ X X X W W X X X W W X X X $ W X X X $ $ X X X W W X X X W W X X X W . h Y h . O - > - O $ X X X $ R Q X Q X Q X X X Q X Q X $ X Q X X X Q X W X X X W R R ",
"W X X X W $ X X X W $ X X X W $ X X X W W X X X W W X X X $ W X X X $ $ X X X W W X X X W W X X X W . @ h @ . O & - & O $ X X X $ R X Q X X Q X X X $ X Q X $ X Q X X X Q X W X X X W R R ",
"E $ $ $ E X $ $ $ E E W W W E X W W W E E W W W E W W W W E E W W W E X $ $ $ E E W W W E E W W W E X . . . X X O O O X X $ $ $ X R X X X X % $ $ $ X X % Q % X % $ $ $ % X E $ $ $ E R R ",
"W X X X W $ X X X W W X X X $ $ X X X W $ X X X W $ X X X W W X X X W $ X X X W W X X X W $ X X X W R R R R R R R R R R $ X X X $ R X X X X Q X X X $ X Q X $ X Q X X X Q X W X X X W R R ",
"W X X X W $ X X X W W X X X $ $ X X X W $ X X X W $ X X X W W X X X W $ X X X W W X X X W $ X X X W R X W R X X R R R R $ X X X $ R X X X X Q X X X Q X Q X $ X % Q X Q % X W X X X W R R ",
"X W W W X X $ $ $ E E W W W E E W W W E X $ $ $ E E W W W E E W W W E X $ $ $ W E W W W E E W W W E R E W R X X R R R R X $ $ $ X R X X X X X Q Q Q X X X $ X X X % Q % X X X W W W X R R ",
"X : : : X X o o o * * : : : * * : : : * : o o o : * : : : * * : : : * * : : : * * : : : * * : : : * R R R R R R R R R R X o o o X R X : X X X : : : X X * : * X R R R R R R R R R R R R R ",
": X X X : o X X X : o X X X : o X X X : : X X X : : X X X o : X X X o o X X X : : X X X : : X X X : R R R R R R R R R R o X X X o R : X : X : X X X : X : X o X R R R R R R R R R R R R R ",
": X X X : o X X X : o X X X : o X X X : : X X X : : X X X o : X X X o o X X X : : X X X : : X X X : R R R R R R R R R R o X X X o R X : X X : X X X o X : X o X R R R R R R R R R R R R R ",
"* o o o * X o o o * * : : : * X : : : * * : : : * : : : : * * : : : * X o o o * * : : : * * : : : * R R R R R R R R R R X o o o X R X X X X * o o o X X * : * X R R R R R R R R R R R R R ",
": X X X : o X X X : : X X X o o X X X : o X X X : o X X X : : X X X : o X X X : : X X X : o X X X : R R R R R R R R R R o X X X o R X X X X : X X X o X : X o X R R R R R R R R R R R R R ",
": X X X : o X X X : : X X X o o X X X : o X X X : o X X X : : X X X : o X X X : : X X X : o X X X : R X : R X X R R R R o X X X o R X X X X : X X X : X : X o X R R R R R R R R R R R R R ",
"X : : : X X o o o * * : : : * * : : : * X o o o * * : : : * * : : : * X o o o : * : : : * * : : : * R * : R X X R R R R X o o o X R X X X X X : : : X X X o X X R R R R R R R R R R R R R ",
"X T T T X X + + + t t T T T t t T T T t T + + + T t T T T t t T T T t t T T T t t T T T t t T T T t R R R R R R R R R R X + + + X R X T X X X T T T X X t T t X R R R R R R R R R R R R R ",
"T X X X T + X X X T + X X X T + X X X T T X X X T T X X X + T X X X + + X X X T T X X X T T X X X T R R R R R R R R R R + X X X + R T X T X T X X X T X T X + X R R R R R R R R R R R R R ",
"T X X X T + X X X T + X X X T + X X X T T X X X T T X X X + T X X X + + X X X T T X X X T T X X X T R R R R R R R R R R + X X X + R X T X X T X X X + X T X + X R R R R R R R R R R R R R ",
"t + + + t X + + + t t T T T t X T T T t t T T T t T T T T t t T T T t X + + + t t T T T t t T T T t R R R R R R R R R R X + + + X R X X X X t + + + X X t T t X R R R R R R R R R R R R R ",
"T X X X T + X X X T T X X X + + X X X T + X X X T + X X X T T X X X T + X X X T T X X X T + X X X T R R R R R R R R R R + X X X + R X X X X T X X X + X T X + X R R R R R R R R R R R R R ",
"T X X X T + X X X T T X X X + + X X X T + X X X T + X X X T T X X X T + X X X T T X X X T + X X X T R X T R X X R R R R + X X X + R X X X X T X X X T X T X + X R R R R R R R R R R R R R ",
"X T T T X X + + + t t T T T t t T T T t X + + + t t T T T t t T T T t X + + + T t T T T t t T T T t R t T R X X R R R R X + + + X R X X X X X T T T X X X + X X R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"X Q Q Q X X % Q Q Q X X % $ $ $ % X X $ $ $ X X Q Q Q % X % Q Q Q X X % $ $ $ % X X $ $ $ X % Q Q Q % X X Q Q Q X X % $ $ $ % X X $ $ $ X X $ $ $ E X E W W W E R R R R R R R R R R R R R ",
"Q X X X Q X Q X X X Q X Q X X X Q X $ X X X $ Q X X X $ X Q X X X Q X Q X X X Q X $ X X X $ Q X X X $ X Q X X X Q X Q X X X Q X $ X X X $ $ X X X W X $ X X X W R R R R R R R R R R R R R ",
"Q X X X $ X Q X X X Q X Q X X X Q X $ X X X $ Q X X X $ X Q X X X Q X Q X X X Q X $ X X X $ Q X X X $ X Q X X X Q X Q Q X X Q X $ X X X $ $ X X X W X $ X X X W R R R R R R R R R R R R R ",
"% $ $ $ X X % Q Q Q X X % $ $ $ % X X $ $ $ X % $ $ Q Q X % Q Q Q X X % $ $ $ % X X $ $ $ X % Q Q Q X X % Q Q Q % X % $ Q $ % X X $ $ $ X X $ $ $ E X E W W W E R R R R R R R R R R R R R ",
"Q X X X $ X Q X X X $ X Q X X X Q X $ X X X $ Q X X X Q X Q X X X $ X Q X X X Q X $ X X X $ Q X X X $ X Q X X X Q X Q X X Q Q X $ X X X $ $ X X X W X W X X X $ R R R R R R R R R R R R R ",
"Q X X X Q X Q X X X $ X Q X X X Q X $ X X X $ Q X X X Q X Q X X X $ X Q X X X Q X $ X X X $ Q X X X $ X Q X X X Q X Q X X X Q X $ X X X $ $ X X X W X W X X X $ R R R R R R R R R R R R R ",
"X Q Q Q X X % $ $ $ X X % Q Q Q % X X $ $ $ X X Q Q Q X X % $ $ $ X X X Q Q Q X X X $ $ $ X % $ $ $ X X % $ $ $ % X % $ $ $ % X X $ $ $ X X $ $ $ E X E W W W E R R R R R R R R R R R R R ",
"X : : : X X * : : : X X * o o o * X X o o o X X : : : * X * : : : X X * o o o * X X o o o X * : : : * X X : : : X X * o o o * X X o o o X X o o o * X * : : : * R R R R R R R R R R R R R ",
": X X X o X : X X X : X : X X X : X o X X X o : X X X o X : X X X : X : X X X : X o X X X o : X X X o X : X X X : X : X X X : X o X X X o o X X X : X o X X X : R R R R R R R R R R R R R ",
": X X X o X : X X X : X : X X X : X o X X X o : X X X o X : X X X : X : X X X : X o X X X o : X X X o X : X X X : X : : X X : X o X X X o o X X X : X o X X X : R R R R R R R R R R R R R ",
"* o o o X X * : : : X X * o o o * X X o o o X * o o : : X * : : : X X * o o o * X X o o o X * : : : X X * : : : * X * o : o * X X o o o X X o o o * X * : : : * R R R R R R R R R R R R R ",
": X X X o X : X X X o X : X X X : X o X X X o : X X X : X : X X X o X : X X X : X o X X X o : X X X o X : X X X : X : X X : : X o X X X o o X X X : X : X X X o R R R R R R R R R R R R R ",
": X X X o X : X X X o X : X X X : X o X X X o : X X X : X : X X X o X : X X X : X o X X X o : X X X o X : X X X : X : X X X : X o X X X o o X X X : X : X X X o R R R R R R R R R R R R R ",
"X : : : X X * o o o X X X : : : X X X o o o X X : : : X X * o o o X X X : : : X X X o o o X * o o o X X * o o o * X * o o o * X X o o o X X o o o * X * : : : * R R R R R R R R R R R R R ",
"X T T T X X t T T T X X t + + + t X X + + + X X T T T t X t T T T X X t + + + t X X + + + X t T T T t X X T T T X X t + + + t X X + + + X X + + + t X t T T T t R R R R R R R R R R R R R ",
"T X X X + X T X X X T X T X X X T X + X X X + T X X X + X T X X X T X T X X X T X + X X X + T X X X + X T X X X T X T X X X T X + X X X + + X X X T X + X X X T R R R R R R R R R R R R R ",
"T X X X + X T X X X T X T X X X T X + X X X + T X X X + X T X X X T X T X X X T X + X X X + T X X X + X T X X X T X T T X X T X + X X X + + X X X T X + X X X T R R R R R R R R R R R R R ",
"t + + + X X t T T T X X t + + + t X X + + + X t + + T T X t T T T X X t + + + t X X + + + X t T T T X X t T T T t X t + T + t X X + + + X X + + + t X t T T T t R R R R R R R R R R R R R ",
"T X X X + X T X X X + X T X X X T X + X X X + T X X X T X T X X X + X T X X X T X + X X X + T X X X + X T X X X T X T X X T T X + X X X + + X X X T X T X X X + R R R R R R R R R R R R R ",
"T X X X + X T X X X + X T X X X T X + X X X + T X X X T X T X X X + X T X X X T X + X X X + T X X X + X T X X X T X T X X X T X + X X X + + X X X T X T X X X + R R R R R R R R R R R R R ",
"X T T T X X t + + + X X X T T T X X X + + + X X T T T X X t + + + X X X T T T X X X + + + X t + + + X X t + + + t X t + + + t X X + + + X X + + + t X t T T T t R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"U U I P L K J H C G F D S A Z j V B N M m n k b v c x z l # g f d s a p q i u y r e w = 0 9 8 7 6 5 ; 4 3 2 1 < , > R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"U U I P L K J H C G F D S A Z j V B N M m n k b v c x z l # g f d s a p q i u y r e w = 0 9 8 7 6 5 ; 4 3 2 1 < , > R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"U U I P L K J H C G F D S A Z j V B N M m n k b v c x z l # g f d s a p q i u y r e w = 0 9 8 7 6 5 ; 4 3 2 1 < , > R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"U U I P L K J H C G F D S A Z j V B N M m n k b v c x z l # g f d s a p q i u y r e w = 0 9 8 7 6 5 ; 4 3 2 1 < , > R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"U U I P L K J H C G F D S A Z j V B N M m n k b v c x z l # g f d s a p q i u y r e w = 0 9 8 7 6 5 ; 4 3 2 1 < , > R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"U U I P L K J H C G F D S A Z j V B N M m n k b v c x z l # g f d s a p q i u y r e w = 0 9 8 7 6 5 ; 4 3 2 1 < , > R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ",
"X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R "
};
-169
View File
@@ -1,169 +0,0 @@
/* Generic single linked list to keep various information
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Author: Kresten Krab Thorup
Many modifications by Alfredo K. Kojima
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with files compiled with
GCC to produce an executable, this does not cause the resulting executable
to be covered by the GNU General Public License. This exception does not
however invalidate any other reasons why the executable file might be
covered by the GNU General Public License. */
#include "list.h"
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <stdlib.h>
/* Return a cons cell produced from (head . tail) */
INLINE LinkedList*
list_cons(void* head, LinkedList* tail)
{
LinkedList* cell;
cell = (LinkedList*)malloc(sizeof(LinkedList));
cell->head = head;
cell->tail = tail;
return cell;
}
/* Return the length of a list, list_length(NULL) returns zero */
INLINE int
list_length(LinkedList* list)
{
int i = 0;
while(list)
{
i += 1;
list = list->tail;
}
return i;
}
/* Return the Nth element of LIST, where N count from zero. If N
larger than the list length, NULL is returned */
INLINE void*
list_nth(int index, LinkedList* list)
{
while(index-- != 0)
{
if(list->tail)
list = list->tail;
else
return 0;
}
return list->head;
}
/* Remove the element at the head by replacing it by its successor */
INLINE void
list_remove_head(LinkedList** list)
{
if (!*list) return;
if ((*list)->tail)
{
LinkedList* tail = (*list)->tail; /* fetch next */
*(*list) = *tail; /* copy next to list head */
free(tail); /* free next */
}
else /* only one element in list */
{
free(*list);
(*list) = 0;
}
}
/* Remove the element with `car' set to ELEMENT */
/*
INLINE void
list_remove_elem(LinkedList** list, void* elem)
{
while (*list)
{
if ((*list)->head == elem)
list_remove_head(list);
*list = (*list ? (*list)->tail : NULL);
}
}*/
INLINE LinkedList *
list_remove_elem(LinkedList* list, void* elem)
{
LinkedList *tmp;
if (list) {
if (list->head == elem) {
tmp = list->tail;
free(list);
return tmp;
}
list->tail = list_remove_elem(list->tail, elem);
return list;
}
return NULL;
}
/* Return element that has ELEM as car */
INLINE LinkedList*
list_find(LinkedList* list, void* elem)
{
while(list)
{
if (list->head == elem)
return list;
list = list->tail;
}
return NULL;
}
/* Free list (backwards recursive) */
INLINE void
list_free(LinkedList* list)
{
if(list)
{
list_free(list->tail);
free(list);
}
}
/* Map FUNCTION over all elements in LIST */
INLINE void
list_mapcar(LinkedList* list, void(*function)(void*))
{
while(list)
{
(*function)(list->head);
list = list->tail;
}
}
-59
View File
@@ -1,59 +0,0 @@
/* Generic single linked list to keep various information
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Author: Kresten Krab Thorup
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with files compiled with
GCC to produce an executable, this does not cause the resulting executable
to be covered by the GNU General Public License. This exception does not
however invalidate any other reasons why the executable file might be
covered by the GNU General Public License. */
#ifndef __LIST_H_
#define __LIST_H_
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
# define INLINE inline
#else
# define INLINE
#endif
typedef struct LinkedList {
void *head;
struct LinkedList *tail;
} LinkedList;
INLINE LinkedList* list_cons(void* head, LinkedList* tail);
INLINE int list_length(LinkedList* list);
INLINE void* list_nth(int index, LinkedList* list);
INLINE void list_remove_head(LinkedList** list);
INLINE LinkedList *list_remove_elem(LinkedList* list, void* elem);
INLINE void list_mapcar(LinkedList* list, void(*function)(void*));
INLINE LinkedList*list_find(LinkedList* list, void* elem);
INLINE void list_free(LinkedList* list);
#endif
-164
View File
@@ -1,164 +0,0 @@
/* dock.c- built-in Dock module for WindowMaker
*
* WindowMaker window manager
*
* Copyright (c) 1997 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <stdlib.h>
#include <string.h>
#include "list.h"
#include "misc.h"
/*
*----------------------------------------------------------------------
* parse_command--
* Divides a command line into a argv/argc pair.
*----------------------------------------------------------------------
*/
#define PRC_ALPHA 0
#define PRC_BLANK 1
#define PRC_ESCAPE 2
#define PRC_DQUOTE 3
#define PRC_EOS 4
#define PRC_SQUOTE 5
typedef struct {
short nstate;
short output;
} DFA;
static DFA mtable[9][6] = {
{{3,1},{0,0},{4,0},{1,0},{8,0},{6,0}},
{{1,1},{1,1},{2,0},{3,0},{5,0},{1,1}},
{{1,1},{1,1},{1,1},{1,1},{5,0},{1,1}},
{{3,1},{5,0},{4,0},{1,0},{5,0},{6,0}},
{{3,1},{3,1},{3,1},{3,1},{5,0},{3,1}},
{{-1,-1},{0,0},{0,0},{0,0},{0,0},{0,0}}, /* final state */
{{6,1},{6,1},{7,0},{6,1},{5,0},{3,0}},
{{6,1},{6,1},{6,1},{6,1},{5,0},{6,1}},
{{-1,-1},{0,0},{0,0},{0,0},{0,0},{0,0}}, /* final state */
};
char*
next_token(char *word, char **next)
{
char *ptr;
char *ret, *t;
int state, ctype;
t = ret = malloc(strlen(word)+1);
ptr = word;
state = 0;
*t = 0;
while (1) {
if (*ptr==0)
ctype = PRC_EOS;
else if (*ptr=='\\')
ctype = PRC_ESCAPE;
else if (*ptr=='"')
ctype = PRC_DQUOTE;
else if (*ptr=='\'')
ctype = PRC_SQUOTE;
else if (*ptr==' ' || *ptr=='\t')
ctype = PRC_BLANK;
else
ctype = PRC_ALPHA;
if (mtable[state][ctype].output) {
*t = *ptr; t++;
*t = 0;
}
state = mtable[state][ctype].nstate;
ptr++;
if (mtable[state][0].output<0) {
break;
}
}
if (*ret==0)
t = NULL;
else
t = strdup(ret);
free(ret);
if (ctype==PRC_EOS)
*next = NULL;
else
*next = ptr;
return t;
}
extern void
parse_command(char *command, char ***argv, int *argc)
{
LinkedList *list = NULL;
char *token, *line;
int count, i;
line = command;
do {
token = next_token(line, &line);
if (token) {
list = list_cons(token, list);
}
} while (token!=NULL && line!=NULL);
count = list_length(list);
*argv = malloc(sizeof(char*)*count);
i = count;
while (list!=NULL) {
(*argv)[--i] = list->head;
list_remove_head(&list);
}
*argc = count;
}
extern pid_t
execCommand(char *command)
{
pid_t pid;
char **argv;
int argc;
parse_command(command, &argv, &argc);
if (argv==NULL) {
return 0;
}
if ((pid=fork())==0) {
char **args;
int i;
args = malloc(sizeof(char*)*(argc+1));
if (!args)
exit(10);
for (i=0; i<argc; i++) {
args[i] = argv[i];
}
args[argc] = NULL;
execvp(argv[0], args);
exit(10);
}
return pid;
}
-9
View File
@@ -1,9 +0,0 @@
#ifndef __MISC_H
#define __MISC_H
#include <unistd.h>
extern void parse_command(char *, char ***, int *);
extern pid_t execCommand(char *);
#endif /* __MISC_H */
-481
View File
@@ -1,481 +0,0 @@
/*
Best viewed with vim5, using ts=4
wmgeneral was taken from wmppp.
It has a lot of routines which most of the wm* programs use.
------------------------------------------------------------
Author: Martijn Pieterse (pieterse@xs4all.nl)
---
CHANGES:
---
14/09/1998 (Dave Clark, clarkd@skyia.com)
* Updated createXBMfromXPM routine
* Now supports >256 colors
11/09/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Removed a bug from parse_rcfile. You could
not use "start" in a command if a label was
also start.
* Changed the needed geometry string.
We don't use window size, and don't support
negative positions.
03/09/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Added parse_rcfile2
02/09/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Added -geometry support (untested)
28/08/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Added createXBMfromXPM routine
* Saves a lot of work with changing xpm's.
02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* changed the read_rc_file to parse_rcfile, as suggested by Marcelo E. Magallon
* debugged the parse_rc file.
30/04/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Ripped similar code from all the wm* programs,
and put them in a single file.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include <stdarg.h>
#include <X11/Xlib.h>
#include <X11/xpm.h>
#include <X11/extensions/shape.h>
#include "wmgeneral.h"
/*****************/
/* X11 Variables */
/*****************/
Window Root;
int screen;
int x_fd;
int d_depth;
XSizeHints mysizehints;
XWMHints mywmhints;
Pixel back_pix, fore_pix;
char *Geometry = "";
Window iconwin, win;
GC NormalGC;
XpmIcon wmgen;
Pixmap pixmask;
/*****************/
/* Mouse Regions */
/*****************/
typedef struct {
int enable;
int top;
int bottom;
int left;
int right;
} MOUSE_REGION;
MOUSE_REGION mouse_region[MAX_MOUSE_REGION];
/***********************/
/* Function Prototypes */
/***********************/
static void GetXPM(XpmIcon *, char **);
static Pixel GetColor(char *);
void RedrawWindow(void);
void AddMouseRegion(int, int, int, int, int);
int CheckMouseRegion(int, int);
/*******************************************************************************\
|* parse_rcfile *|
\*******************************************************************************/
void parse_rcfile(const char *filename, rckeys *keys) {
char *p,*q;
char temp[128];
char *tokens = " :\t\n";
FILE *fp;
int i,key;
fp = fopen(filename, "r");
if (fp) {
while (fgets(temp, 128, fp)) {
key = 0;
q = strdup(temp);
q = strtok(q, tokens);
while (key >= 0 && keys[key].label) {
if ((!strcmp(q, keys[key].label))) {
p = strstr(temp, keys[key].label);
p += strlen(keys[key].label);
p += strspn(p, tokens);
if ((i = strcspn(p, "#\n"))) p[i] = 0;
free(*keys[key].var);
*keys[key].var = strdup(p);
key = -1;
} else key++;
}
free(q);
}
fclose(fp);
}
}
/*******************************************************************************\
|* parse_rcfile2 *|
\*******************************************************************************/
void parse_rcfile2(const char *filename, rckeys2 *keys) {
char *p;
char temp[128];
char *tokens = " :\t\n";
FILE *fp;
int i,key;
char *family = NULL;
fp = fopen(filename, "r");
if (fp) {
while (fgets(temp, 128, fp)) {
key = 0;
while (key >= 0 && keys[key].label) {
if ((p = strstr(temp, keys[key].label))) {
p += strlen(keys[key].label);
p += strspn(p, tokens);
if ((i = strcspn(p, "#\n"))) p[i] = 0;
free(*keys[key].var);
*keys[key].var = strdup(p);
key = -1;
} else key++;
}
}
fclose(fp);
}
free(family);
}
/*******************************************************************************\
|* GetXPM *|
\*******************************************************************************/
static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[]) {
XWindowAttributes attributes;
int err;
/* For the colormap */
XGetWindowAttributes(display, Root, &attributes);
wmgen->attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions);
err = XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen->pixmap),
&(wmgen->mask), &(wmgen->attributes));
if (err != XpmSuccess) {
fprintf(stderr, "Not enough free colorcells.\n");
exit(1);
}
}
/*******************************************************************************\
|* GetColor *|
\*******************************************************************************/
static Pixel GetColor(char *name) {
XColor color;
XWindowAttributes attributes;
XGetWindowAttributes(display, Root, &attributes);
color.pixel = 0;
if (!XParseColor(display, attributes.colormap, name, &color)) {
fprintf(stderr, "wm.app: can't parse %s.\n", name);
} else if (!XAllocColor(display, attributes.colormap, &color)) {
fprintf(stderr, "wm.app: can't allocate %s.\n", name);
}
return color.pixel;
}
/*******************************************************************************\
|* flush_expose *|
\*******************************************************************************/
static int flush_expose(Window w) {
XEvent dummy;
int i=0;
while (XCheckTypedWindowEvent(display, w, Expose, &dummy))
i++;
return i;
}
/*******************************************************************************\
|* RedrawWindow *|
\*******************************************************************************/
void RedrawWindow(void) {
flush_expose(iconwin);
XCopyArea(display, wmgen.pixmap, iconwin, NormalGC,
0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0);
flush_expose(win);
XCopyArea(display, wmgen.pixmap, win, NormalGC,
0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0);
}
/*******************************************************************************\
|* RedrawWindowXY *|
\*******************************************************************************/
void RedrawWindowXY(int x, int y) {
flush_expose(iconwin);
XCopyArea(display, wmgen.pixmap, iconwin, NormalGC,
x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0);
flush_expose(win);
XCopyArea(display, wmgen.pixmap, win, NormalGC,
x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0);
}
/*******************************************************************************\
|* AddMouseRegion *|
\*******************************************************************************/
void AddMouseRegion(int index, int left, int top, int right, int bottom) {
if (index < MAX_MOUSE_REGION) {
mouse_region[index].enable = 1;
mouse_region[index].top = top;
mouse_region[index].left = left;
mouse_region[index].bottom = bottom;
mouse_region[index].right = right;
}
}
/*******************************************************************************\
|* CheckMouseRegion *|
\*******************************************************************************/
int CheckMouseRegion(int x, int y) {
int i;
int found;
found = 0;
for (i=0; i<MAX_MOUSE_REGION && !found; i++) {
if (mouse_region[i].enable &&
x <= mouse_region[i].right &&
x >= mouse_region[i].left &&
y <= mouse_region[i].bottom &&
y >= mouse_region[i].top)
found = 1;
}
if (!found) return -1;
return (i-1);
}
/*******************************************************************************\
|* createXBMfromXPM *|
\*******************************************************************************/
void createXBMfromXPM(char *xbm, char **xpm, int sx, int sy) {
int i,j,k;
int width, height, numcol, depth;
int zero=0;
unsigned char bwrite;
int bcount;
int curpixel;
sscanf(*xpm, "%d %d %d %d", &width, &height, &numcol, &depth);
for (k=0; k!=depth; k++)
{
zero <<=8;
zero |= xpm[1][k];
}
for (i=numcol+1; i < numcol+sy+1; i++) {
bcount = 0;
bwrite = 0;
for (j=0; j<sx*depth; j+=depth) {
bwrite >>= 1;
curpixel=0;
for (k=0; k!=depth; k++)
{
curpixel <<=8;
curpixel |= xpm[i][j+k];
}
if ( curpixel != zero ) {
bwrite += 128;
}
bcount++;
if (bcount == 8) {
*xbm = bwrite;
xbm++;
bcount = 0;
bwrite = 0;
}
}
}
}
/*******************************************************************************\
|* copyXPMArea *|
\*******************************************************************************/
void copyXPMArea(int x, int y, int sx, int sy, int dx, int dy) {
XCopyArea(display, wmgen.pixmap, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy);
}
/*******************************************************************************\
|* copyXBMArea *|
\*******************************************************************************/
void copyXBMArea(int x, int y, int sx, int sy, int dx, int dy) {
XCopyArea(display, wmgen.mask, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy);
}
/*******************************************************************************\
|* setMaskXY *|
\*******************************************************************************/
void setMaskXY(int x, int y) {
XShapeCombineMask(display, win, ShapeBounding, x, y, pixmask, ShapeSet);
XShapeCombineMask(display, iconwin, ShapeBounding, x, y, pixmask, ShapeSet);
}
/*******************************************************************************\
|* openXwindow *|
\*******************************************************************************/
void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bits, int pixmask_width, int pixmask_height) {
unsigned int borderwidth = 1;
XClassHint classHint;
char *display_name = NULL;
char *wname = argv[0];
XTextProperty name;
XGCValues gcv;
unsigned long gcm;
char *geometry = NULL;
int dummy=0;
int i, wx, wy;
for (i=1; argv[i]; i++) {
if (!strcmp(argv[i], "-display")) {
display_name = argv[i+1];
i++;
}
if (!strcmp(argv[i], "-geometry")) {
geometry = argv[i+1];
i++;
}
}
if (!(display = XOpenDisplay(display_name))) {
fprintf(stderr, "%s: can't open display %s\n",
wname, XDisplayName(display_name));
exit(1);
}
screen = DefaultScreen(display);
Root = RootWindow(display, screen);
d_depth = DefaultDepth(display, screen);
x_fd = XConnectionNumber(display);
/* Convert XPM to XImage */
GetXPM(&wmgen, pixmap_bytes);
/* Create a window to hold the stuff */
mysizehints.flags = USSize | USPosition;
mysizehints.x = 0;
mysizehints.y = 0;
back_pix = GetColor("white");
fore_pix = GetColor("black");
XWMGeometry(display, screen, Geometry, NULL, borderwidth, &mysizehints,
&mysizehints.x, &mysizehints.y,&mysizehints.width,&mysizehints.height, &dummy);
mysizehints.width = 64;
mysizehints.height = 64;
win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y,
mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y,
mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
/* Activate hints */
XSetWMNormalHints(display, win, &mysizehints);
classHint.res_name = wname;
classHint.res_class = wname;
XSetClassHint(display, win, &classHint);
XSelectInput(display, win, ButtonPressMask | ExposureMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask);
XSelectInput(display, iconwin, ButtonPressMask | ExposureMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask);
if (XStringListToTextProperty(&wname, 1, &name) == 0) {
fprintf(stderr, "%s: can't allocate window name\n", wname);
exit(1);
}
XSetWMName(display, win, &name);
/* Create GC for drawing */
gcm = GCForeground | GCBackground | GCGraphicsExposures;
gcv.foreground = fore_pix;
gcv.background = back_pix;
gcv.graphics_exposures = 0;
NormalGC = XCreateGC(display, Root, gcm, &gcv);
/* ONLYSHAPE ON */
pixmask = XCreateBitmapFromData(display, win, pixmask_bits, pixmask_width, pixmask_height);
XShapeCombineMask(display, win, ShapeBounding, 0, 0, pixmask, ShapeSet);
XShapeCombineMask(display, iconwin, ShapeBounding, 0, 0, pixmask, ShapeSet);
/* ONLYSHAPE OFF */
mywmhints.initial_state = WithdrawnState;
mywmhints.icon_window = iconwin;
mywmhints.icon_x = mysizehints.x;
mywmhints.icon_y = mysizehints.y;
mywmhints.window_group = win;
mywmhints.flags = StateHint | IconWindowHint | IconPositionHint | WindowGroupHint;
XSetWMHints(display, win, &mywmhints);
XSetCommand(display, win, argv, argc);
XMapWindow(display, win);
if (geometry) {
if (sscanf(geometry, "+%d+%d", &wx, &wy) != 2) {
fprintf(stderr, "Bad geometry string.\n");
exit(1);
}
XMoveWindow(display, win, wx, wy);
}
}
-59
View File
@@ -1,59 +0,0 @@
#ifndef WMGENERAL_H_INCLUDED
#define WMGENERAL_H_INCLUDED
/***********/
/* Defines */
/***********/
#define MAX_MOUSE_REGION (16)
/************/
/* Typedefs */
/************/
typedef struct _rckeys rckeys;
struct _rckeys {
const char *label;
char **var;
};
typedef struct _rckeys2 rckeys2;
struct _rckeys2 {
const char *family;
const char *label;
char **var;
};
typedef struct {
Pixmap pixmap;
Pixmap mask;
XpmAttributes attributes;
} XpmIcon;
/*******************/
/* Global variable */
/*******************/
Display *display;
/***********************/
/* Function Prototypes */
/***********************/
void AddMouseRegion(int index, int left, int top, int right, int bottom);
int CheckMouseRegion(int x, int y);
void openXwindow(int argc, char *argv[], char **, char *, int, int);
void RedrawWindow(void);
void RedrawWindowXY(int x, int y);
void createXBMfromXPM(char *, char **, int, int);
void copyXPMArea(int, int, int, int, int, int);
void copyXBMArea(int, int, int, int, int, int);
void setMaskXY(int, int);
void parse_rcfile(const char *, rckeys *);
#endif
+17
View File
@@ -0,0 +1,17 @@
# wmtemp conf file
cpu1_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input
cpu1_critical = 80
cpu1_warning = 65
cpu2_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input
cpu2_critical = 80
cpu2_warning = 65
cpu3_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp4_input
cpu3_critical = 80
cpu3_warning = 65
cpu4_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp5_input
cpu4_critical = 80
cpu4_warning = 65
gpu_path = /sys/devices/virtual/hwmon/hwmon1/temp4_input
gpu_critical = 70
gpu_warning = 60
-134
View File
@@ -1,134 +0,0 @@
/*
* wmtempnv: a sensor monitor for WindowMaker. this little app is mainly based
* on wmsensormon and other simple dockapps.
*
* version = 0.1
* date: Fri Oct 31 20:41:14 CET 2008 @861 /Internet Time/
* author: Roman 'gryf' Dobosz
* requirements: configured lm_sensors and sensor program, nvidia-settings, cut,
* grep.
* licence: gpl
*/
#include <sys/param.h>
#include <sys/types.h>
#include "standards.h"
#include <X11/Xlib.h>
#include <X11/xpm.h>
#include <X11/extensions/shape.h>
#include <string.h>
#include "../wmgeneral/wmgeneral.h"
#include "../wmgeneral/misc.h"
#include "wmtempnv_master2.xpm"
#include "wmtempnv_mask.xbm"
#define MAXSTRLEN 8
#define TEMP 40
#define TEMP_OVER 47
#define GPU_T 70
#define GPU_T_OVER 85
void display_values(int, int, int);
int get_temp(int core_number);
int get_offset(int temp, int cpu);
int main(int argc, char **argv){
int temp1=0, temp2=0, temp3=0;
/* offset is one of 0 (normal), 7 (alert), 14 (warning) */
int offset1=0, offset2=0, offset3=0;
int counter = 0;
openXwindow(argc, argv, wmtempnv_master2_xpm, wmtempnv_mask_bits, wmtempnv_mask_width, wmtempnv_mask_height);
while(TRUE){
if(counter==0){
temp1 = get_temp(0);
offset1 = get_offset(temp1, 1);
temp2 = get_temp(1);
offset2 = get_offset(temp2, 1);
temp3 = get_temp(2);
offset3 = get_offset(temp3, 0);
counter = 200;
}
// core 1
copyXPMArea(0, 87 + offset1, 23, 7, 4, 7); // LCD: "CPU"
copyXPMArea(69, 87 + offset1, 5, 7, 22, 7); // LCD: number of cpu
copyXPMArea(66, 65 + offset1, 9, 7, 51, 7); // LCD: "°C"
display_values(temp1, 0, offset1);
// core 2
copyXPMArea(0, 87 + offset2, 23, 7, 4, 21);
copyXPMArea(75, 87 + offset2, 5, 7, 22, 21);
copyXPMArea(66, 65 + offset2, 9, 7, 51, 21);
display_values(temp2, 14, offset2);
// gpu
copyXPMArea(23, 87 + offset3, 23, 7, 4, 35);
copyXPMArea(66, 65 + offset3, 9, 7, 51, 35);
display_values(temp3, 28, offset3);
RedrawWindow();
counter--;
usleep(5000);
}
}
int get_offset(int temp, int cpu){
int alt, wrn;
if(cpu == 1){
wrn = TEMP;
alt = TEMP_OVER;
}else{
wrn = GPU_T;
alt = GPU_T_OVER;
}
if(temp >= alt){
return 7; // Alert
}else if(temp >= wrn){
return 14; // Warning
}else{
return 0; // Normal
}
}
void display_values(int temp, int offset, int offset2){
char text[5], num1, num2, num3, num4;
sprintf(text, "%03d", temp);
num1 = (text[0] - '0');
num2 = (text[1] - '0');
num3 = (text[2] - '0');
num4 = (text[3] - '0');
if(num1)
copyXPMArea(5 * num1, 65 + offset2, 5, 7, 31, 7 + offset);
else
copyXPMArea(60, 65 + offset2, 5, 7, 31, 7 + offset);
copyXPMArea(5 * num2, 65 + offset2, 5, 7, 38, 7 + offset);
copyXPMArea(5 * num3, 65 + offset2, 5, 7, 45, 7 + offset);
copyXPMArea(5 * num4, 65 + offset2, 5, 7, 51, 7 + offset);
}
int get_temp(int core_number){
// Core temperature. argument is core number. core no.2 is GPU
FILE *file;
int core=0;
char cmd[] = " ";
if(core_number==2){
sprintf(cmd, "echo `nvidia-settings -q 'GPUCoreTemp'|grep Attribute|cut -d ':' -f 3|cut -d '.' -f 1`");
}else{
sprintf(cmd, "echo `sensors |grep 'Core %d'|cut -d ':' -f 2|cut -d '.' -f 1`", core_number);
}
file = popen(cmd, "r");
while (! feof(file)) {
char line[MAXSTRLEN + 1];
bzero(line, MAXSTRLEN + 1);
fgets(line, MAXSTRLEN, file);
if(line[0] != 0){
sscanf(line, "%d", &core);
}
}
pclose(file);
return core;
}
-46
View File
@@ -1,46 +0,0 @@
#define wmtempnv_mask_width 64
#define wmtempnv_mask_height 64
static unsigned char wmtempnv_mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-205
View File
@@ -1,205 +0,0 @@
/* XPM */
static char * wmtempnv_master2_xpm[] = {
"93 122 80 1",
" c None",
". c #0000FF",
"+ c #000000",
"@ c #202020",
"# c #C7C7C7",
"$ c #20B6AE",
"% c #007D71",
"& c #004941",
"* c #0A3F00",
"= c #660000",
"- c #20B2AE",
"; c #188A86",
"> c #177700",
", c #27B500",
"' c #A50000",
") c #C90000",
"! c #3FFF00",
"~ c #FF0000",
"{ c #E00000",
"] c #440000",
"^ c #A80000",
"/ c #FF8200",
"( c #542A00",
"_ c #A85500",
": c #00FF0F",
"< c #04FA0F",
"[ c #09F50F",
"} c #0DF10F",
"| c #12EC0E",
"1 c #16E80E",
"2 c #1BE30E",
"3 c #1FDF0D",
"4 c #24DA0D",
"5 c #28D60D",
"6 c #2DD10D",
"7 c #32CC0C",
"8 c #36C80C",
"9 c #3BC30C",
"0 c #3FBF0B",
"a c #44BA0B",
"b c #48B60B",
"c c #4DB10B",
"d c #51AD0A",
"e c #56A80A",
"f c #5BA30A",
"g c #5F9F09",
"h c #649A09",
"i c #689609",
"j c #6D9109",
"k c #718D08",
"l c #768808",
"m c #7A8408",
"n c #7F7F07",
"o c #847A07",
"p c #887607",
"q c #8D7107",
"r c #916D06",
"s c #966806",
"t c #9A6406",
"u c #9F5F05",
"v c #A35B05",
"w c #A85605",
"x c #AD5105",
"y c #B14D04",
"z c #B64804",
"A c #BA4404",
"B c #BF3F03",
"C c #C33B03",
"D c #C83603",
"E c #CC3203",
"F c #D12D02",
"G c #D62802",
"H c #DA2402",
"I c #DF1F01",
"J c #E31B01",
"K c #E81601",
"L c #EC1201",
"M c #F10D00",
"N c #F50900",
"O c #FA0400",
"................................................................+............................",
"................................................................+............................",
"................................................................+............................",
"................................................................+............................",
"................................................................+............................",
"..++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..+@@$$$@@%$$$@@%&&&%@@&&&%@@@@@&&&@@@@&&&@@@@&&&@@@$@@@$$$@@#..+............................",
"..+@$@@@$@$@@@$@$@@@$@&@@@$@@@@&@@@&@@&@@@&@@&@@@&@$@$@$@@@$@#..+............................",
"..+@$@@@&@$@@@$@$@@@$@&@@@$@@@@&@@@&@@&@@@&@@&@@@&@@$@@$@@@&@#..+............................",
"..+@%&&&@@%$$$@@%&&&%@@&&&%@@@@@&&&@@@@&&&@@@@&&&@@@@@@%&&&@@#..+............................",
"..+@$@@@&@$@@@&@$@@@$@&@@@$@@@@&@@@&@@&@@@&@@&@@@&@@@@@$@@@&@#..+............................",
"..+@$@@@$@$@@@&@$@@@$@&@@@$@@@@&@@@&@@&@@@&@@&@@@&@@@@@$@@@$@#..+............................",
"..+@@$$$@@%&&&@@%$$$%@@&&&%@@@@@&&&@@@@&&&@@@@&&&@@@@@@@$$$@@#..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..############################################################..+............................",
"................................................................+............................",
"................................................................+............................",
"..++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..+@@$$$@@%$$$@@%&&&%@%$$$%@@@@@&&&@@@@&&&@@@@&&&@@@$@@@$$$@@#..+............................",
"..+@$@@@$@$@@@$@$@@@$@&@@@$@@@@&@@@&@@&@@@&@@&@@@&@$@$@$@@@$@#..+............................",
"..+@$@@@&@$@@@$@$@@@$@&@@@$@@@@&@@@&@@&@@@&@@&@@@&@@$@@$@@@&@#..+............................",
"..+@%&&&@@%$$$@@%&&&%@%$$$%@@@@@&&&@@@@&&&@@@@&&&@@@@@@%&&&@@#..+............................",
"..+@$@@@&@$@@@&@$@@@$@$@@@&@@@@&@@@&@@&@@@&@@&@@@&@@@@@$@@@&@#..+............................",
"..+@$@@@$@$@@@&@$@@@$@$@@@&@@@@&@@@&@@&@@@&@@&@@@&@@@@@$@@@$@#..+............................",
"..+@@$$$@@%&&&@@@$$$@@%$$$%@@@@@&&&@@@@&&&@@@@&&&@@@@@@@$$$@@#..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..############################################################..+............................",
"................................................................+............................",
"................................................................+............................",
"..++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..+@@$$$%@%$$$@@%&&&%@@&&&@@@@@@&&&@@@@&&&@@@@&&&@@@$@@@$$$@@#..+............................",
"..+@$@@@&@$@@@$@$@@@$@&@@@&@@@@&@@@&@@&@@@&@@&@@@&@$@$@$@@@$@#..+............................",
"..+@$@@@&@$@@@$@$@@@$@&@@@&@@@@&@@@&@@&@@@&@@&@@@&@@$@@$@@@&@#..+............................",
"..+@%&&$$@%$$$@@%&&&%@@&&&@@@@@@&&&@@@@&&&@@@@&&&@@@@@@%&&&@@#..+............................",
"..+@$@@@$@$@@@&@$@@@$@&@@@&@@@@&@@@&@@&@@@&@@&@@@&@@@@@$@@@&@#..+............................",
"..+@$@@@$@$@@@&@$@@@$@&@@@&@@@@&@@@&@@&@@@&@@&@@@&@@@@@$@@@$@#..+............................",
"..+@@$$$@@%&&&@@@$$$@@@&&&@@@@@@&&&@@@@&&&@@@@&&&@@@@@@@$$$@@#..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..############################################################..+............................",
"................................................................+............................",
"................................................................+............................",
"..++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..+@@@&&&@@@&&&@@@&&&@@@&&&@@@@@@@&&&@@@@&&&@@@@&&&@@@@&&&@@@#..+............................",
"..+@@&@@@&@&@@@&@&@@@&@&@@@&@@@@@&@@@&@@&@@@&@@&@@@&@@&@@@&@@#..+............................",
"..+@@&@@@&@&@@@&@&@@@&@&@@@&@@@@@&@@@&@@&@@@&@@&@@@&@@&@@@&@@#..+............................",
"..+@@@&&&@@@&&&@@@&&&@@@&&&@@@@@@@&&&@@@@&&&@@@@&&&@@@@&&&@@@#..+............................",
"..+@@&@@@&@&@@@&@&@@@&@&@@@&@@@@@&@@@&@@&@@@&@@&@@@&@@&@@@&@@#..+............................",
"..+@@&@@@&@&@@@&@&@@@&@&@@@&@@@@@&@@@&@@&@@@&@@&@@@&@@&@@@&@@#..+............................",
"..+@@@&&&@@@&&&@@@&&&@@@&&&@@@@@@@&&&@@@@&&&@@@@&&&@@@@&&&@@@#..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#..+............................",
"..############################################################..+............................",
"................................................................+............................",
"................................................................+............................",
"................................................................+............................",
"................................................................+............................",
"................................................................+............................",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***@@===@@@@@@.@@@@@@@@@@@@@@@@@@@@@@@@@..",
"@---@@&&&;;---;;---;-&&&-;---;;---;;---;;---;;---;*>,>*=')'=@&&&@.@$@@@$$$@@%$%@%&&&%@@---@..",
"-@@@-&@@@-&@@@-&@@@--@@@--@@@&-@@@&&@@@--@@@--@@@-*,!,*=)~)=&@@@&.$@$@$@@@$@$@&@$@@@$@-@@@-..",
"-@@@-&@@@-&@@@-&@@@--@@@--@@@&-@@@&&@@@--@@@--@@@-*>,>*=')'=&@@@&.@$@@$@@@&@$@&@$@@@$@-@@@-..",
";&&&;@&&&;;---;@---;;---;----;;---;@&&&;;---;;---;@***@@===@@&&&@.@@@@%&&&@@%$%@%&&&%@;&&&;..",
"-@@@-&@@@--@@@&&@@@-&@@@-&@@@--@@@-&@@@--@@@-&@@@-..........&@@@&.@@@@$@@@&@$@&@$@@@$@-@@@-..",
"-@@@-&@@@--@@@&&@@@-&@@@-&@@@--@@@-&@@@--@@@-&@@@-.@-.@@....&@@@&.@@@@$@@@$@$@&@%$@$%@-@@@-..",
"@---@@&&&;;---;;---;@&&&;;---;;---;@&&&-;---;;---;.;-.@@....@&&&@.@@@@@$$$@@@&@@@%$%@@@---@..",
"@{{{@@]]]^^{{{^^{{{^{]]]{^{{{^^{{{^^{{{^^{{{^^{{{^..........@]]]@.@{@@@{{{@@^{^@.............",
"{@@@{]@@@{]@@@{]@@@{{@@@{{@@@]{@@@]]@@@{{@@@{{@@@{..........]@@@].{@{@{@@@{@{@]@.............",
"{@@@{]@@@{]@@@{]@@@{{@@@{{@@@]{@@@]]@@@{{@@@{{@@@{..........]@@@].@{@@{@@@]@{@]@.............",
"^]]]^@]]]^^{{{^@{{{^^{{{^{{{{^^{{{^@]]]^^{{{^^{{{^..........@]]]@.@@@@^]]]@@^{^@.............",
"{@@@{]@@@{{@@@]]@@@{]@@@{]@@@{{@@@{]@@@{{@@@{]@@@{..........]@@@].@@@@{@@@]@{@]@.............",
"{@@@{]@@@{{@@@]]@@@{]@@@{]@@@{{@@@{]@@@{{@@@{]@@@{.@{.@@....]@@@].@@@@{@@@{@{@]@.............",
"@{{{@@]]]^^{{{^^{{{^@]]]^^{{{^^{{{^@]]]{^{{{^^{{{^.^{.@@....@]]]@.@@@@@{{{@@@]@@.............",
"@///@@(((__///__///_/(((/_///__///__///__///__///_..........@(((@.@/@@@///@@_/_@.............",
"/@@@/(@@@/(@@@/(@@@//@@@//@@@(/@@@((@@@//@@@//@@@/..........(@@@(./@/@/@@@/@/@(@.............",
"/@@@/(@@@/(@@@/(@@@//@@@//@@@(/@@@((@@@//@@@//@@@/..........(@@@(.@/@@/@@@(@/@(@.............",
"_(((_@(((__///_@///__///_////__///_@(((__///__///_..........@(((@.@@@@_(((@@_/_@.............",
"/@@@/(@@@//@@@((@@@/(@@@/(@@@//@@@/(@@@//@@@/(@@@/..........(@@@(.@@@@/@@@(@/@(@.............",
"/@@@/(@@@//@@@((@@@/(@@@/(@@@//@@@/(@@@//@@@/(@@@/.@/.@@....(@@@(.@@@@/@@@/@/@(@.............",
"@///@@(((__///__///_@(((__///__///_@(((/_///__///_._/.@@....@(((@.@@@@@///@@@(@@.............",
".............................................................................................",
"@$$$@@%$$$@@%&&&%@@&&&@@$$$%@%$$$@@%&&&%@@&&&@%$$$%@@$$$@@%&&&%@@&&&@@&&&;@;---;.............",
"$@@@$@$@@@$@$@@@$@&@@@&$@@@&@$@@@$@$@@@$@&@@@&$@@@&@$@@@$@$@@@$@&@@@&&@@@-@&@@@-.............",
"$@@@&@$@@@$@$@@@$@&@@@&$@@@&@$@@@$@$@@@$@&@@@&$@@@&@$@@@$@$$@@$@&@@@&&@@@-@&@@@-.............",
"%&&&@@%$$$@@%&&&%@@&&&@%&&$$@%$$$@@%&&&%@@&&&@%$$$@@%$$$%@%&$&%@@&&&@@&&&;@;---;.............",
"$@@@&@$@@@&@$@@@$@&@@@&$@@@$@$@@@&@$@@@$@&@@@&$@@@&@$@@@$@$@@$$@&@@@&&@@@-@-@@@&.............",
"$@@@$@$@@@&@$@@@$@&@@@&$@@@$@$@@@&@$@@@$@&@@@&$@@@&@$@@@$@$@@@$@&@@@&&@@@-@-@@@&.............",
"@$$$@@%&&&@@%$$$%@@&&&@@$$$@@%&&&@@@$$$@@@&&&@%&&&@@%&&&%@%&&&%@@&&&@@&&&;@;---;.............",
"@{{{@@^{{{@@^]]]^@@]]]@@{{{^@^{{{@@^]]]^@@]]]@^{{{^@@{{{@@^]]]^@@]]]@@]]]^@^{{{^.............",
"{@@@]@{@@@{@{@@@{@]@@@]{@@@]@{@@@{@{@@@{@]@@@]{@@@]@{@@@{@{@@@{@]@@@]]@@@{@]@@@{.............",
"{@@@]@{@@@{@{@@@{@]@@@]{@@@]@{@@@{@{@@@{@]@@@]{@@@]@{@@@{@{{@@{@]@@@]]@@@{@]@@@{.............",
"^]]]@@^{{{@@^]]]^@@]]]@^]]{{@^{{{@@^]]]^@@]]]@^{{{@@^{{{^@^]{]^@@]]]@@]]]^@^{{{^.............",
"{@@@]@{@@@]@{@@@{@]@@@]{@@@{@{@@@]@{@@@{@]@@@]{@@@]@{@@@{@{@@{{@]@@@]]@@@{@{@@@].............",
"{@@@]@{@@@]@{@@@{@]@@@]{@@@{@{@@@]@{@@@{@]@@@]{@@@]@{@@@{@{@@@{@]@@@]]@@@{@{@@@].............",
"@{{{@@^]]]@@@{{{@@@]]]@@{{{@@^]]]@@@{{{@@@]]]@^]]]@@^]]]^@^]]]^@@]]]@@]]]^@^{{{^.............",
"@///@@_///@@_(((_@@(((@@///_@_///@@_(((_@@(((@_///_@@///@@_(((_@@(((@@(((_@_///_.............",
"/@@@(@/@@@/@/@@@/@(@@@(/@@@(@/@@@/@/@@@/@(@@@(/@@@(@/@@@/@/@@@/@(@@@((@@@/@(@@@/.............",
"/@@@(@/@@@/@/@@@/@(@@@(/@@@(@/@@@/@/@@@/@(@@@(/@@@(@/@@@/@//@@/@(@@@((@@@/@(@@@/.............",
"_(((@@_///@@_(((_@@(((@_((//@_///@@_(((_@@(((@_///@@_///_@_(/(_@@(((@@(((_@_///_.............",
"/@@@(@/@@@(@/@@@/@(@@@(/@@@/@/@@@(@/@@@/@(@@@(/@@@(@/@@@/@/@@//@(@@@((@@@/@/@@@(.............",
"/@@@(@/@@@(@/@@@/@(@@@(/@@@/@/@@@(@/@@@/@(@@@(/@@@(@/@@@/@/@@@/@(@@@((@@@/@/@@@(.............",
"@///@@_(((@@@///@@@(((@@///@@_(((@@@///@@@(((@_(((@@_(((_@_(((_@@(((@@(((_@_///_.............",
".............................................................................................",
"::<[}|1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO~...................................",
"::<[}|1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO~...................................",
"::<[}|1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO~...................................",
"::<[}|1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO~...................................",
"::<[}|1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO~...................................",
"::<[}|1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO~...................................",
".............................................................................................",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..................................",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..................................",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..................................",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..................................",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..................................",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.................................."};