commit 1463ad60ca9fe76df832a4962b57167c0485418e Author: Emmanuel BenoƮt Date: Mon May 10 08:58:46 2021 +0200 Import of Debian version diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/CREDITS b/CREDITS new file mode 100644 index 0000000..126c398 --- /dev/null +++ b/CREDITS @@ -0,0 +1,13 @@ +* Main Author: +Peter Gnodde + +* Bug and patches reports: +Jean Delvare (http://www.ensicaen.ismra.fr/~delvare/) +Riccardo Stagni + +* Manual page +Lars Steinke + +Based largely on work on WMMemLoad and WMMemMon and WMCPULoad done by: +Mark Staggs (WMMemLoad) +Seiichi SATO (The other two) diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..688b61e --- /dev/null +++ b/ChangeLog @@ -0,0 +1,42 @@ +0.0.6 (2008-04-28) +* Riccardo Stagni (the current Debian maintainer of this + package) submitted a patch fixing some syntactic stuff in the -h output + +0.0.5 (2005-06-23) +* Found out Debian (http://www.debian.org/) has a package and the maintainer + has added a manual page, which I've shamelessly copied. Only the part + explaining this package had no manual page is removed, since it's no longer + true :). Thanks to Lars Steinke for maintaining the Debian + package. + +0.0.4 (2004-03-12) +* Fixed a small bug in the Makefile, probably caused by an older version of + sed, which caused gcc to complain about extra characters after an #include + when compiling the xpms. Again thanks to Jean Delvare for pointing this out. + +0.0.3 (2004-03-10) +* Modified the background_off.xpm image a bit, so it would be more consistent + with WMCPULoad and WMMemLoad (more shadow at the borders) +* Added a flag to show temperatures in Fahrenheit +* Added a flag to show temperatures in Kelvin +* Modified the digit code so it could show values greater than 100 +* Modified the build system, so XPMs are build seperately instead of included + in the main.c file +* Stripped all long arguments, they are quite useless and take more effort to + type +* Do not wait seconds before the first update, just update, then + enter the main loop. +* Removed the optimization options for Pentium 4, not everybody has a Pentium + 4 to play with :). Also made de CFLAGS a bit more conservative. +* Some textual changes in the help output, thanks to Jean Delvare + (http://www.ensicaen.ismra.fr/~delvare/) for pointing that out. + +0.0.2 (2004-03-08) +* Added a couple of options, so CPU and SYS features could be swapped or + entirely customized +* Added README, COPYING and AUTHORS files and made the package + +0.0.1 (2004-03-08) +* Stripped WMMemLoad to the bones and replaced the memory statistics code + with temperature statistics code, obtained from libsensors (a part of + the lm_sensors package diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..35a28af --- /dev/null +++ b/Makefile @@ -0,0 +1,48 @@ +#CC=gcc +#LD=gcc +SED=sed +STRIP=strip + +PREFIX?=/usr/local +DEST=$(PREFIX)/bin +MAN=$(PREFIX)/share/man/man1 + +CFLAGS?=-Wall -Werror -O2 +LDFLAGS?= +INCLUDE=-I/usr/include/sensors -I/usr/local/include/sensors +LIBS=-L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lXpm -lsensors + +XPM=xpm/celcius_on.o xpm/celcius_off.o xpm/fahrenheit_on.o \ + xpm/fahrenheit_off.o xpm/kelvin_on.o xpm/kelvin_off.o xpm/parts.o +OBJS=main.o dockapp.o temp.o $(XPM) + +TARGET=wmtemp +MANPAGE=wmtemp.1x + +all: $(TARGET) + +%.c: %.xpm + echo "#include \"xpm.h\"" >$@ + $(SED) -e "s/^static //" <$< >>$@ + +.c.o: + $(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $< + +$(TARGET): $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) + +clean: + rm -f *.o xpm/*.o xpm/*.c core $(TARGET) + +install: + cp $(TARGET) $(DEST)/$(TARGET) +# $(STRIP) $(DEST)/$(TARGET) + chmod 755 $(DEST)/$(TARGET) +# cp $(MANPAGE) $(MAN)/$(MANPAGE) +# gzip -9 $(MAN)/$(MANPAGE) +# chmod 644 $(MAN)/$(MANPAGE) + +main.o: dockapp.h temp.h xpm/xpm.h +dockapp.o: dockapp.h +temp.o: temp.h +xpm/xpm.h: $(XPM) diff --git a/README b/README new file mode 100644 index 0000000..78682b6 --- /dev/null +++ b/README @@ -0,0 +1,28 @@ +Make sure lm_sensors is installed, it will not work without it. + +You might want to take a look at the Makefile to change an include path or +library path. + +* Install with the following commands: + + make + su + make install + + +The default install path is /usr/local/bin, if you do not want this, use + + make DEST=/to/another/path install + +to install wmtemp to /to/an/other/path. + +To install the manual page to another location (default is +/usr/local/share/man/man1), use: + + make MAN=/to/another/path install + +Or combine the above :). + +* Check out `wmtemp --help` for options. + +* See the file COPYING for license information diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..dc36ac7 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,112 @@ +wmtemp (0.0.6-3.3) unstable; urgency=low + + * Non-maintainer upload. + * Fix "FTBFS: dockapp.c:52:16: error: variable 'stat' set but not used + [-Werror=unused-but-set-variable]": apply patch from peter green, removing + two unused variables. (Closes: #646488) + + -- gregor herrmann Tue, 22 Nov 2011 20:45:17 +0100 + +wmtemp (0.0.6-3.2) unstable; urgency=low + + * Non-maintainer upload to fix the previous upload. + * Don't try to open /etc/sensors.conf, use the default path instead + unless a configurationf file is specified. + + -- Aurelien Jarno Sat, 09 Apr 2011 16:10:42 +0200 + +wmtemp (0.0.6-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Switch to libsensors4 api, thanks to Hugo Vanwoerkom for the patch. + (Closes: #610816). + + -- Aurelien Jarno Sat, 12 Mar 2011 22:13:32 +0100 + +wmtemp (0.0.6-3) unstable; urgency=low + + * Fix "backlight color change incomplete" changing the xpm files + (Closes: #523890) + * Now we use the automagical dh + * Bumped Standards-Version to 3.8.3, no changes needed. + * Lintian fixes: copyright-with-old-dh-make-debian-copyright + + -- Riccardo Stagni Thu, 12 Nov 2009 21:42:55 +0100 + +wmtemp (0.0.6-2) unstable; urgency=low + + * Bumped Standards-Version to 3.8.0, changed debian/rules to support the + standard values of DEB_BUILD_OPTIONS: + added support to parallel builds (even if we compile just 3 C source + files) and removed the nostrip check (because we rely on dh_strip) + * debian/control: lowered package priority (we depend on lm-sensors + which is extra). + * Removed useless xutils dependency + (this also fixes lintian's build-depends-on-obsolete-package) + * Added dependency on x11proto-xext-dev as we use some of its headers. + + -- Riccardo Stagni Fri, 20 Jun 2008 02:34:07 +0200 + +wmtemp (0.0.6-1) unstable; urgency=low + + * New upstream release + - corrected some cosmetic issues within -h output (closes: #474107) + * Removed the check from debian/rules for Makefile existance in the "clean" + target: since we don't use autoconf, a missing makefile *should* be a + problem anywhere. + * Updated debian/copyright + + -- Riccardo Stagni Mon, 28 Apr 2008 19:57:33 +0200 + +wmtemp (0.0.5-5) unstable; urgency=low + + * New maintainer (closes: #465958) + * Added Homepage field (from package description) + * Update menu file + * Standards-Version bumped to 3.7.3 (changed menu section) + * lintian: + - debian-rules-ignores-make-clean-error (even if we don't use autoconf) + - copyright-without-copyright-notice (rewritten debian/copyright) + - build-depends-on-1-revision + * Disable forced stripping (closes: #438277) + * Added watchfile + + -- Riccardo Stagni Thu, 27 Mar 2008 01:22:25 +0100 + +wmtemp (0.0.5-4) unstable; urgency=low + + * Fixed Build-Depends for xlibs-dev transition using + xlibs-split-check and objdump (closes #346882). + + -- Lars Steinke Sat, 14 Jan 2006 14:22:10 +0100 + +wmtemp (0.0.5-3) unstable; urgency=low + + * Fixed lintian warning concerning format of menu entry. + + -- Lars Steinke Sat, 14 Jan 2006 14:10:52 +0100 + +wmtemp (0.0.5-2) unstable; urgency=low + + * Forgot calling dh_installmenu. + + -- Lars Steinke Sun, 18 Dec 2005 17:57:35 +0100 + +wmtemp (0.0.5-1) unstable; urgency=low + + * New upstream (closes #315552). + + -- Lars Steinke Sun, 18 Dec 2005 17:14:00 +0200 + +wmtemp (0.0.4-2) unstable; urgency=low + + * Manpage fixes. + + -- Lars Steinke (Debian Developer) Fri, 4 Jun 2004 17:14:00 +0200 + +wmtemp (0.0.4-1) unstable; urgency=low + + * Initial Release. + + -- Lars Steinke (Debian Developer) Fri, 4 Jun 2004 15:14:00 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..5cd7869 --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: wmtemp +Section: x11 +Priority: extra +Maintainer: Riccardo Stagni +Build-Depends: debhelper (>= 7.0.50~), libsensors4-dev (>= 3.1.2), libxpm-dev, libxext-dev, x11proto-xext-dev, libx11-dev +Standards-Version: 3.8.3 +Homepage: http://gnodde.org/wmtemp/ + +Package: wmtemp +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, lm-sensors +Description: WM dock applet displaying lm_sensors temperature values + Nifty small dock applet for Window Maker that continuously displays + CPU and case temperature by virtue of lm_sensors diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..356a4f5 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,35 @@ +This package was debianized by Lars Steinke on +Fri, 4 Jun 2004 15:14:00 +0200. + +It was downloaded from http://gnodde.org/wmtemp/wmtemp-0.0.6.tar.gz + +Upstream Author: Peter Gnodde +Project Home: http://gnodde.org/wmtemp + +Copyright: + + All code and design by Peter Gnodde + Copyright 2003-2008 Peter Gnodde + +License: + + 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., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + + Please see /usr/share/common-licenses/GPL-2 for the full license. + +The Debian packaging is copyright 2008, Riccardo Stagni +and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..98d1583 --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/man/man1 diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..168e5d2 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +CREDITS diff --git a/debian/menu b/debian/menu new file mode 100644 index 0000000..2809420 --- /dev/null +++ b/debian/menu @@ -0,0 +1,2 @@ +?package(wmtemp):needs="X11" section="Applications/System/Monitoring"\ + title="wmtemp" command="/usr/bin/wmtemp" diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..7189b2f --- /dev/null +++ b/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_auto_install: + $(MAKE) install PREFIX=$(CURDIR)/debian/wmtemp/usr + +override_dh_installman: + dh_installman wmtemp.1x + diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..31754e1 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://gnodde.org/wmtemp/wmtemp-([\d\.]*).tar.gz diff --git a/dockapp.c b/dockapp.c new file mode 100644 index 0000000..07f5d88 --- /dev/null +++ b/dockapp.c @@ -0,0 +1,391 @@ +/* + * Copyright (c) 1999 Alfredo K. Kojima + * Copyright (c) 2001, 2002 Seiichi SATO + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + * This code is based on libdockapp-0.4.0 + * modified by Seiichi SATO + */ + +#include +#include "dockapp.h" + +#define WINDOWED_SIZE_W 64 +#define WINDOWED_SIZE_H 64 + +/* global */ +Display *display = NULL; +Bool dockapp_iswindowed = False; +Bool dockapp_isbrokenwm = False; + +/* private */ +static Window window = None; +static Window icon_window = None; +static GC gc = NULL; +static int depth = 0; +static Atom delete_win; +static int width, height; +static int offset_w, offset_h; + +void +dockapp_open_window(char *display_specified, char *appname, + unsigned w, unsigned h, int argc, char **argv) +{ + XClassHint *classhint; + XWMHints *wmhints; + XTextProperty title; + XSizeHints sizehints; + Window root; + int ww, wh; + + /* Open Connection to X Server */ + display = XOpenDisplay(display_specified); + if (!display) { + fprintf(stderr, "%s: could not open display %s!\n", argv[0], + XDisplayName(display_specified)); + exit(1); + } + root = DefaultRootWindow(display); + + width = w; + height = h; + + if (dockapp_iswindowed) { + offset_w = (WINDOWED_SIZE_W - w) / 2; + offset_h = (WINDOWED_SIZE_H - h) / 2; + ww = WINDOWED_SIZE_W; + wh = WINDOWED_SIZE_H; + } else { + offset_w = offset_h = 0; + ww = w; + wh = h; + } + + /* Create Windows */ + icon_window = XCreateSimpleWindow(display, root, 0, 0, ww, wh, 0, 0, 0); + if (dockapp_isbrokenwm) { + window = XCreateSimpleWindow(display, root, 0, 0, ww, wh, 0, 0, 0); + } else { + window = XCreateSimpleWindow(display, root, 0, 0, 1, 1, 0, 0, 0); + } + + /* Set ClassHint */ + classhint = XAllocClassHint(); + if (classhint == NULL) { + fprintf(stderr, "%s: can't allocate memory for wm hints!\n", argv[0]); + exit(1); + } + classhint->res_class = "DockApp"; + classhint->res_name = appname; + XSetClassHint(display, window, classhint); + XFree(classhint); + + /* Set WMHints */ + wmhints = XAllocWMHints(); + if (wmhints == NULL) { + fprintf(stderr, "%s: can't allocate memory for wm hints!\n", argv[0]); + exit(1); + } + wmhints->flags = IconWindowHint | WindowGroupHint; + if (!dockapp_iswindowed) { + wmhints->flags |= StateHint; + wmhints->initial_state = WithdrawnState; + } + wmhints->window_group = window; + wmhints->icon_window = icon_window; + XSetWMHints(display, window, wmhints); + XFree(wmhints); + + /* Set WM Protocols */ + delete_win = XInternAtom(display, "WM_DELETE_WINDOW", False); + XSetWMProtocols (display, icon_window, &delete_win, 1); + + /* Set Size Hints */ + sizehints.flags = USSize; + if (!dockapp_iswindowed) { + sizehints.flags |= USPosition; + sizehints.x = sizehints.y = 0; + } else { + sizehints.flags |= PMinSize | PMaxSize; + sizehints.min_width = sizehints.max_width = WINDOWED_SIZE_W; + sizehints.min_height = sizehints.max_height = WINDOWED_SIZE_H; + } + sizehints.width = ww; + sizehints.height = wh; + XSetWMNormalHints(display, icon_window, &sizehints); + + /* Set WindowTitle for AfterStep Wharf */ + XStringListToTextProperty(&appname, 1, &title); + XSetWMName(display, window, &title); + XSetWMName(display, icon_window, &title); + + /* Set Command to start the app so it can be docked properly */ + XSetCommand(display, window, argv, argc); + + depth = DefaultDepth(display, DefaultScreen(display)); + gc = DefaultGC(display, DefaultScreen(display)); + + XFlush(display); +} + + +void +dockapp_set_eventmask(long mask) +{ + XSelectInput(display, icon_window, mask); + XSelectInput(display, window, mask); +} + + +static Pixmap +create_bg_pixmap(void) +{ + Pixmap bg; + + bg = XCreatePixmap(display, icon_window, WINDOWED_SIZE_W, WINDOWED_SIZE_H, + depth); + XSetForeground(display, gc, dockapp_getcolor("rgb:ae/aa/ae")); + XFillRectangle(display, bg, gc, 0, 0, WINDOWED_SIZE_W, WINDOWED_SIZE_H); + XSetForeground(display, gc, dockapp_getcolor("rgb:ff/ff/ff")); + XDrawLine(display, bg, gc, 0, 0, 0, 63); + XDrawLine(display, bg, gc, 1, 0, 1, 62); + XDrawLine(display, bg, gc, 2, 0, 63, 0); + XDrawLine(display, bg, gc, 2, 1, 62, 1); + XSetForeground(display, gc, dockapp_getcolor("rgb:52/55/52")); + XDrawLine(display, bg, gc, 1, 63, 63, 63); + XDrawLine(display, bg, gc, 2, 62, 63, 62); + XDrawLine(display, bg, gc, 63, 1, 63, 61); + XDrawLine(display, bg, gc, 62, 2, 62, 61); + + return bg; +} + + +void +dockapp_set_background(Pixmap pixmap) +{ + if (dockapp_iswindowed) { + Pixmap bg; + bg = create_bg_pixmap(); + XCopyArea(display, pixmap, bg, gc, 0, 0, width, height, + offset_w, offset_w); + XSetWindowBackgroundPixmap(display, icon_window, bg); + XSetWindowBackgroundPixmap(display, window, bg); + XFreePixmap(display, bg); + } else { + XSetWindowBackgroundPixmap(display, icon_window, pixmap); + XSetWindowBackgroundPixmap(display, window, pixmap); + } + XClearWindow(display, icon_window); + XFlush(display); +} + + +void +dockapp_show(void) +{ + if (!dockapp_iswindowed) + XMapRaised(display, window); + else + XMapRaised(display, icon_window); + + XFlush(display); +} + + +Bool +dockapp_xpm2pixmap(char **data, Pixmap *pixmap, Pixmap *mask, + XpmColorSymbol * colorSymbol, unsigned int nsymbols) +{ + XpmAttributes xpmAttr; + xpmAttr.valuemask = XpmCloseness; + xpmAttr.closeness = 40000; + + if (nsymbols) { + xpmAttr.colorsymbols = colorSymbol; + xpmAttr.numsymbols = nsymbols; + xpmAttr.valuemask |= XpmColorSymbols; + } + + if (XpmCreatePixmapFromData(display, icon_window, data, pixmap, mask, &xpmAttr) != 0) + return False; + + return True; +} + + +Pixmap +dockapp_XCreatePixmap(int w, int h) +{ + return (XCreatePixmap(display, icon_window, w, h, depth)); +} + + +void +dockapp_setshape(Pixmap mask, int x_ofs, int y_ofs) +{ + XShapeCombineMask(display, icon_window, ShapeBounding, -x_ofs, -y_ofs, + mask, ShapeSet); + XShapeCombineMask(display, window, ShapeBounding, -x_ofs, -y_ofs, + mask, ShapeSet); + XFlush(display); +} + + +void +dockapp_copyarea(Pixmap src, Pixmap dist, int x_src, int y_src, int w, int h, + int x_dist, int y_dist) +{ + XCopyArea(display, src, dist, gc, x_src, y_src, w, h, x_dist, y_dist); +} + + +void +dockapp_copy2window (Pixmap src) +{ + if (dockapp_isbrokenwm) { + XCopyArea(display, src, window, gc, 0, 0, width, height, offset_w, + offset_h); + } else { + XCopyArea(display, src, icon_window, gc, 0, 0, width, height, offset_w, + offset_h); + } +} + + +Bool +dockapp_nextevent_or_timeout(XEvent *event, unsigned long miliseconds) +{ + struct timeval timeout; + fd_set rset; + + XSync(display, False); + if (XPending(display)) { + XNextEvent(display, event); + return True; + } + + timeout.tv_sec = miliseconds / 1000; + timeout.tv_usec = (miliseconds % 1000) * 1000; + + FD_ZERO(&rset); + FD_SET(ConnectionNumber(display), &rset); + if (select(ConnectionNumber(display)+1, &rset, NULL, NULL, &timeout) > 0) { + XNextEvent(display, event); + if (event->type == ClientMessage) { + if (event->xclient.data.l[0] == delete_win) { + XDestroyWindow(display,event->xclient.window); + XCloseDisplay(display); + exit(0); + } + } + if (dockapp_iswindowed) { + event->xbutton.x -= offset_w; + event->xbutton.y -= offset_h; + } + return True; + } + + return False; +} + + +unsigned long +dockapp_getcolor(char *color_name) +{ + XColor color; + + if (!XParseColor(display, DefaultColormap(display, DefaultScreen(display)), + color_name, &color)) + fprintf(stderr, "can't parse color %s\n", color_name), exit(1); + + if (!XAllocColor(display, DefaultColormap(display, DefaultScreen(display)), + &color)) { + fprintf(stderr, "can't allocate color %s. Using black\n", color_name); + return BlackPixel(display, DefaultScreen(display)); + } + + return color.pixel; +} + + +unsigned long +dockapp_blendedcolor(char *color_name, int r, int g, int b, float fac) +{ + XColor color; + + if ((r < -255 || r > 255)||(g < -255 || g > 255)||(b < -255 || b > 255)){ + fprintf(stderr, "r:%d,g:%d,b:%d (r,g,b must be 0 to 255)", r, g, b); + exit(1); + } + + r *= 255; + g *= 255; + b *= 255; + + if (!XParseColor(display, DefaultColormap(display, DefaultScreen(display)), + color_name, &color)) + fprintf(stderr, "can't parse color %s\n", color_name), exit(1); + + if (!XAllocColor(display, DefaultColormap(display, DefaultScreen(display)), + &color)) { + fprintf(stderr, "can't allocate color %s. Using black\n", color_name); + return BlackPixel(display, DefaultScreen(display)); + } + + if (DefaultDepth(display, DefaultScreen(display)) < 16) + return color.pixel; + + /* red */ + if (color.red + r > 0xffff) { + color.red = 0xffff; + } else if (color.red + r < 0) { + color.red = 0; + } else { + color.red = (unsigned short)(fac * color.red + r); + } + + /* green */ + if (color.green + g > 0xffff) { + color.green = 0xffff; + } else if (color.green + g < 0) { + color.green = 0; + } else { + color.green = (unsigned short)(fac * color.green + g); + } + + /* blue */ + if (color.blue + b > 0xffff) { + color.blue = 0xffff; + } else if (color.blue + b < 0) { + color.blue = 0; + } else { + color.blue = (unsigned short)(fac * color.blue + b); + } + + color.flags = DoRed | DoGreen | DoBlue; + + if (!XAllocColor(display, DefaultColormap(display, DefaultScreen(display)), + &color)) { + fprintf(stderr, "can't allocate color %s. Using black\n", color_name); + return BlackPixel(display, DefaultScreen(display)); + } + + return color.pixel; +} diff --git a/dockapp.h b/dockapp.h new file mode 100644 index 0000000..ebb1e15 --- /dev/null +++ b/dockapp.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) 1999 Alfredo K. Kojima + * Copyright (c) 2001, 2002 Seiichi SATO + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + * This code is based on libdockapp-0.4.0 + * modified by Seiichi SATO + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +#include + +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif + +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif + +#if HAVE_SELECT +# include +#endif + +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + +#if HAVE_UNISTD_H +# include +#else +/* We are in trouble. */ +#endif + +extern Display *display; +extern Bool dockapp_iswindowed; +extern Bool dockapp_isbrokenwm; + + +void dockapp_open_window(char *display_specified, char *appname, + unsigned w, unsigned h, int argc, char **argv); +void dockapp_set_eventmask(long mask); +void dockapp_set_background(Pixmap pixmap); +void dockapp_show(void); +Bool dockapp_xpm2pixmap(char **data, Pixmap * pixmap, Pixmap * mask, + XpmColorSymbol * colorSymbol, + unsigned int nsymbols); +Pixmap dockapp_XCreatePixmap(int w, int h); +void dockapp_setshape(Pixmap mask, int x_ofs, int y_ofs); +void dockapp_copyarea(Pixmap src, Pixmap dist, int x_src, int y_src, + int w, int h, int x_dist, int y_dist); +void dockapp_copy2window(Pixmap src); +Bool dockapp_nextevent_or_timeout(XEvent * event, unsigned long miliseconds); +unsigned long dockapp_getcolor(char *color); +unsigned long dockapp_blendedcolor(char *color, int r, int g, int b, float fac); diff --git a/main.c b/main.c new file mode 100644 index 0000000..1d63dac --- /dev/null +++ b/main.c @@ -0,0 +1,429 @@ +/* WMtemp - A dockapp to monitor CPU and MB temperatures + * Copyright (C) 2004 Peter Gnodde + * + * Some ideas loaned from the wmgtemp dockapp + * + * Based on work by Mark Staggs + * Copyright (C) 2002 Mark Staggs + * + * Based on work by Seiichi SATO + * Copyright (C) 2001,2002 Seiichi SATO + + * 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 +#include + +#include "dockapp.h" +#include "temp.h" +#include "xpm/xpm.h" + +#define SIZE 58 +#define WINDOWED_BG " \tc #AEAAAE" +#define MAX_HISTORY 16 +#define CPUNUM_NONE -1 + +typedef enum { LIGHTON, LIGHTOFF } light; + +Pixmap pixmap; +Pixmap backdrop_on; +Pixmap backdrop_off; +Pixmap parts; +Pixmap mask; +static char *display_name = ""; +static char *light_color = NULL; /* back-light color */ +static unsigned update_interval = 1; +static light backlight = LIGHTOFF; + +static unsigned int cpu_temp = 0; +static unsigned int sys_temp = 0; +static unsigned int alarm_cpu = 60; +static unsigned int alarm_sys = 60; +char *configfile = NULL; + +static char **backlight_on_xpm; +static char **backlight_off_xpm; + +/* prototypes */ +static void update(void); +static void switch_light(void); +static void draw_cpudigit(int per); +static void draw_sysdigit(int per); +static void parse_arguments(int argc, char **argv); +static void print_help(char *prog); + +int main(int argc, char **argv) +{ + XEvent event; + XpmColorSymbol colors[2] = { {"Back0", NULL, 0}, {"Back1", NULL, 0} }; + int ncolor = 0; + + /* Parse CommandLine */ + parse_arguments(argc, argv); + + if (t_type == FAHRENHEIT) { + alarm_cpu = TO_FAHRENHEIT(alarm_cpu); + alarm_sys = TO_FAHRENHEIT(alarm_sys); + + backlight_on_xpm = fahrenheit_on_xpm; + backlight_off_xpm = fahrenheit_off_xpm; + } else if (t_type == KELVIN) { + alarm_cpu = TO_KELVIN(alarm_cpu); + alarm_sys = TO_KELVIN(alarm_sys); + + backlight_on_xpm = kelvin_on_xpm; + backlight_off_xpm = kelvin_off_xpm; + } else { + backlight_on_xpm = celcius_on_xpm; + backlight_off_xpm = celcius_off_xpm; + } + + /* Initialize Application */ + temp_init(configfile); + dockapp_open_window(display_name, PACKAGE, SIZE, SIZE, argc, argv); + dockapp_set_eventmask(ButtonPressMask); + + if(light_color) + { + colors[0].pixel = dockapp_getcolor(light_color); + colors[1].pixel = dockapp_blendedcolor(light_color, -24, -24, -24, 1.0); + ncolor = 2; + } + + /* change raw xpm data to pixmap */ + if(dockapp_iswindowed) + backlight_on_xpm[1] = backlight_off_xpm[1] = WINDOWED_BG; + + if(!dockapp_xpm2pixmap(backlight_on_xpm, &backdrop_on, &mask, colors, ncolor)) + { + fprintf(stderr, "Error initializing backlit background image.\n"); + exit(1); + } + if(!dockapp_xpm2pixmap(backlight_off_xpm, &backdrop_off, NULL, NULL, 0)) + { + fprintf(stderr, "Error initializing background image.\n"); + exit(1); + } + if(!dockapp_xpm2pixmap(parts_xpm, &parts, NULL, colors, ncolor)) + { + fprintf(stderr, "Error initializing parts image.\n"); + exit(1); + } + + /* shape window */ + if(!dockapp_iswindowed) + dockapp_setshape(mask, 0, 0); + if(mask) XFreePixmap(display, mask); + + /* pixmap : draw area */ + pixmap = dockapp_XCreatePixmap(SIZE, SIZE); + + /* Initialize pixmap */ + if(backlight == LIGHTON) + dockapp_copyarea(backdrop_on, pixmap, 0, 0, SIZE, SIZE, 0, 0); + else + dockapp_copyarea(backdrop_off, pixmap, 0, 0, SIZE, SIZE, 0, 0); + + dockapp_set_background(pixmap); + dockapp_show(); + + update(); + + /* Main loop */ + while(1) + { + if (dockapp_nextevent_or_timeout(&event, update_interval * 1000)) + { + /* Next Event */ + switch(event.type) + { + case ButtonPress: + switch_light(); + break; + default: /* make gcc happy */ + break; + } + } + else + { + /* Time Out */ + update(); + } + } + + return 0; +} + +/* called by timer */ +static void update(void) +{ + static light pre_backlight; + static Bool in_alarm_mode = False; + + /* get current cpu usage in percent */ + temp_getusage(&cpu_temp, &sys_temp); + + /* alarm mode */ + if(cpu_temp >= alarm_cpu || sys_temp >= alarm_sys) + { + if(!in_alarm_mode) + { + in_alarm_mode = True; + pre_backlight = backlight; + } + if(backlight == LIGHTOFF) + { + switch_light(); + return; + } + } + else + { + if(in_alarm_mode) + { + in_alarm_mode = False; + if (backlight != pre_backlight) + { + switch_light(); + return; + } + } + } + + /* all clear */ + if (backlight == LIGHTON) + dockapp_copyarea(backdrop_on, pixmap, 0, 0, 58, 58, 0, 0); + else + dockapp_copyarea(backdrop_off, pixmap, 0, 0, 58, 58, 0, 0); + + /* draw digit */ + draw_cpudigit(cpu_temp); + draw_sysdigit(sys_temp); + + /* show */ + dockapp_copy2window(pixmap); +} + +/* called when mouse button pressed */ +static void switch_light(void) +{ + switch (backlight) + { + case LIGHTOFF: + backlight = LIGHTON; + dockapp_copyarea(backdrop_on, pixmap, 0, 0, 58, 58, 0, 0); + break; + case LIGHTON: + backlight = LIGHTOFF; + dockapp_copyarea(backdrop_off, pixmap, 0, 0, 58, 58, 0, 0); + break; + } + + /* redraw digit */ + temp_getusage(&cpu_temp, &sys_temp); + draw_cpudigit(cpu_temp); + draw_sysdigit(sys_temp); + + /* show */ + dockapp_copy2window(pixmap); +} + +static void draw_cpudigit(int per) +{ + int v100, v10, v1; + int y = 0; + + if (per < 0) per = 0; + + v100 = per / 100; + v10 = (per - v100 * 100) / 10; + v1 = (per - v100 * 100 - v10 * 10); + + if (backlight == LIGHTON) y = 20; + + /* draw digit */ + dockapp_copyarea(parts, pixmap, v1 * 10, y, 10, 20, 29, 7); + if (v10 != 0 || v100 != 0) { + dockapp_copyarea(parts, pixmap, v10 * 10, y, 10, 20, 17, 7); + + if (v100 != 0) { + dockapp_copyarea(parts, pixmap, v100 * 10, y, 10, 20, 5, 7); + } + } +} + + +static void draw_sysdigit(int per) +{ + int v100, v10, v1; + int y = 0; + + if (per < 0) per = 0; + + v100 = per / 100; + v10 = (per - v100 * 100) / 10; + v1 = (per - v100 * 100 - v10 * 10); + + if (backlight == LIGHTON) y = 20; + + /* draw digit */ + dockapp_copyarea(parts, pixmap, v1 * 10, y, 10, 20, 29, 34); + if (v10 != 0 || v100 != 0) { + dockapp_copyarea(parts, pixmap, v10 * 10, y, 10, 20, 17, 34); + + if (v100 != 0) { + dockapp_copyarea(parts, pixmap, v100 * 10, y, 10, 20, 5, 34); + } + } +} + +static void parse_arguments(int argc, char **argv) +{ + int i; + int integer; + for (i = 1; i < argc; i++) + { + if (!strcmp(argv[i], "-v")) + printf("%s version %s\n", PACKAGE, VERSION), exit(0); + else if (!strcmp(argv[i], "-d")) + { + display_name = argv[i + 1]; + i++; + } + else if (!strcmp(argv[i], "-ac")) + { + if (argc == i + 1) + alarm_cpu = 60; + else if (sscanf(argv[i + 1], "%i", &integer) != 1) + alarm_cpu = 60; + else if (integer < 0 || integer > 100) + fprintf(stderr, "%s: argument %s must be from 0 to 100\n", + argv[0], argv[i]), exit(1); + else + alarm_cpu = integer, i++; + } + else if (!strcmp(argv[i], "-as")) + { + if (argc == i + 1) + alarm_sys = 60; + else if (sscanf(argv[i + 1], "%i", &integer) != 1) + alarm_sys = 60; + else if (integer < 0 || integer > 100) + fprintf(stderr, "%s: argument %s must be from 0 to 100\n", + argv[0], argv[i]), exit(1); + else + alarm_sys = integer, i++; + } + else if (!strcmp(argv[i], "-bl")) + backlight = LIGHTON; + else if (!strcmp(argv[i], "-lc")) + { + light_color = argv[i + 1]; + i++; + } + else if (!strcmp(argv[i], "-i")) + { + if (argc == i + 1) + fprintf(stderr, "%s: error parsing argument for option %s\n", + argv[0], argv[i]), exit(1); + if (sscanf(argv[i + 1], "%i", &integer) != 1) + fprintf(stderr, "%s: error parsing argument for option %s\n", + argv[0], argv[i]), exit(1); + if (integer < 1) + fprintf(stderr, "%s: argument %s must be >=1\n", + argv[0], argv[i]), exit(1); + update_interval = integer; + i++; + } + else if (!strcmp(argv[i], "-w")) + dockapp_iswindowed = True; + else if (!strcmp(argv[i], "-bw")) + dockapp_isbrokenwm = True; + else if (!strcmp(argv[i], "-c")) { + if (argc == i + 1) { + fprintf(stderr, "%s: error parsing argument for option %s\n", argv[0], argv[i]); + exit(1); + } + + configfile = argv[i + 1]; + i++; + } + else if (!strcmp(argv[i], "-s")) { + char *t; + + t = cpu_feature_name; + cpu_feature_name = sys_feature_name; + sys_feature_name = t; + } + else if (!strcmp(argv[i], "-cf")) { + if (argc == i + 1) { + fprintf(stderr, "%s: error parsing argument for option %s\n", argv[0], argv[i]); + exit(1); + } + + cpu_feature_name = argv[i + 1]; + i++; + } + else if (!strcmp(argv[i], "-sf")) { + if (argc == i + 1) { + fprintf(stderr, "%s: error parsing argument for option %s\n", argv[0], argv[i]); + exit(1); + } + + sys_feature_name = argv[i + 1]; + i++; + } + else if (!strcmp(argv[i], "-f")) + t_type = FAHRENHEIT; + else if (!strcmp(argv[i], "-k")) + t_type = KELVIN; + else + { + print_help(argv[0]), exit(1); + } + } +} + +static void print_help(char *prog) +{ + printf("Usage : %s [OPTIONS]\n", prog); + printf("WMtemp - temperature monitor dockapp\n"); + printf(" -d display to use\n"); + printf(" -bl turn on back-light\n"); + printf(" -lc back-light color (rgb:6E/C6/3B is default)\n"); + printf(" -i number of secs between updates (1 is default)\n"); + printf(" -h show this help text and exit\n"); + printf(" -v show program version and exit\n"); + printf(" -w run the application in windowed mode\n"); + printf(" -bw activate broken window manager fix\n"); + printf(" -ac activate alarm mode of CPU\n"); + printf(" is threshold from 0 to 100\n"); + printf(" (60 is default)\n"); + printf(" -as activate alarm mode of system\n"); + printf(" is threshold from 0 to 100\n"); + printf(" (60 is default)\n"); + printf(" -c location of the sensors.conf file\n"); + printf(" ('/etc/sensors.conf' is default)\n"); + printf(" -cf which feature to use for cpu temperature\n"); + printf(" ('temp1_input' is default)\n"); + printf(" -sf which feature to use for sys temperature\n"); + printf(" ('temp2_input' is default)\n"); + printf(" -s swap the cpu and sys temperatures\n"); + printf(" (/etc/sensors.conf is default)\n"); + printf(" -f show temperatures in Fahrenheit\n"); + printf(" -k show temperatures in Kelvin\n"); +} diff --git a/temp.c b/temp.c new file mode 100644 index 0000000..6c5c34a --- /dev/null +++ b/temp.c @@ -0,0 +1,108 @@ +#define DEBUG(x) x +#include +#include +#include +#include +#include + +#include "temp.h" + +static FILE *f = NULL; +static char sensors = 0; + +static const sensors_chip_name *chip_name = NULL; +static const sensors_feature *feature; + +char *cpu_feature_name = "temp1_input"; +char *sys_feature_name = "temp2_input"; + +temperature_t t_type = CELCIUS; + +static int cpu_feature = 0; +static int sys_feature = 0; + +void temp_deinit() { + if (f != NULL) { + fclose(f); + } + + if (sensors) { + sensors_cleanup(); + } +} + +void temp_init(const char *filename) { + const sensors_chip_name *name; + int chip_nr = 0, f1, f2; + + char str[256]; + + char *feattext = NULL; + const sensors_subfeature *subfeature; + + atexit(temp_deinit); + + if (filename) { + f = fopen(filename, "r"); + if (f == NULL) { + fprintf(stderr, "could not open configfile %s: %s\n", filename, + strerror(errno)); + exit(1); + } + } + + if (sensors_init(f)) { + fprintf(stderr, "could not initialize sensors\n"); + exit(1); + } + + sensors = 1; + while ((name = sensors_get_detected_chips(NULL, &chip_nr)) != NULL && + chip_name == NULL) { + f1 = f2 = 0; + DEBUG(printf("chip_nr=%d %d\n",chip_nr,__LINE__);) + + sensors_snprintf_chip_name(str, 256, name); + DEBUG(printf("chip name = %s (%d)\n",str,__LINE__);) + + while ((feature = sensors_get_features( name, &f1)) != NULL) { + + feattext = sensors_get_label( name, feature ); + DEBUG(printf("f1=%d feattext=%s (%d) \n",f1,feattext,__LINE__);) + + if ( (subfeature = sensors_get_subfeature (name, feature, SENSORS_SUBFEATURE_TEMP_INPUT)) ) { + DEBUG(printf("subfeature name =%s (%d) \n",subfeature->name,__LINE__);) + if (strcmp(subfeature->name, cpu_feature_name) == 0) { + cpu_feature = subfeature->number; + chip_name = name; + } + else if (strcmp(subfeature->name, sys_feature_name) == 0) { + sys_feature = subfeature->number; + } + } + } + } + + if (chip_name == NULL) { + fprintf(stderr, "could not find a suitable chip\n"); + exit(1); + } +} + +void temp_getusage(unsigned int *cpu_temp, unsigned int *sys_temp) { + double cpu, sys; + + sensors_get_value(chip_name, cpu_feature, &cpu); + sensors_get_value(chip_name, sys_feature, &sys); + + if (t_type == FAHRENHEIT) { + cpu = TO_FAHRENHEIT(cpu); + sys = TO_FAHRENHEIT(sys); + } else if (t_type == KELVIN) { + cpu = TO_KELVIN(cpu); + sys = TO_KELVIN(sys); + } + + *cpu_temp = (unsigned int)(cpu); + *sys_temp = (unsigned int)(sys); +} diff --git a/temp.h b/temp.h new file mode 100644 index 0000000..9351bec --- /dev/null +++ b/temp.h @@ -0,0 +1,22 @@ +#ifndef SHO_TEMP_H +#define SHO_TEMP_H + +#define PACKAGE "wmtemp" +#define VERSION "0.0.4" + +#define TO_FAHRENHEIT(t) (((double)(t) * 1.8) + 32.0) +#define TO_KELVIN(t) ((double)(t) + 273.0) + +typedef enum temperature_t { + CELCIUS, FAHRENHEIT, KELVIN +} temperature_t; + +extern char *cpu_feature_name; +extern char *sys_feature_name; + +extern temperature_t t_type; + +void temp_init(const char *filename); +void temp_getusage(unsigned int *cpu_temp, unsigned int *sys_temp); + +#endif diff --git a/wmtemp.1x b/wmtemp.1x new file mode 100644 index 0000000..34ea3aa --- /dev/null +++ b/wmtemp.1x @@ -0,0 +1,47 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH WMTEMP 1x "June 4, 2004" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +wmtemp \- WindowMaker dock applet displaying lm_sensors temperature values +.SH SYNOPSIS +.B wmtemp +.RI [ options ] +.br +.SH DESCRIPTION +This manual page documents briefly the +.B wmtemp +command. +.PP +\fBwmtemp\fP is a nifty small dock applet for Window Maker +that continuously displays CPU and case temperature by +virtue of lm_sensors. + +.SH OPTIONS +A summary of options is included below. +For a complete description, see \fIwmtemp \-h\fP. +.TP +.B \-h +Show help text and exit. +.TP +.B \-v +Show program version and exit. +.SH SEE ALSO +.BR sensors (1), +.br +.SH AUTHOR +This manual page was written by Lars Steinke , +for the Debian project (but may be used by others). diff --git a/xpm/celcius_off.xpm b/xpm/celcius_off.xpm new file mode 100644 index 0000000..89edd77 --- /dev/null +++ b/xpm/celcius_off.xpm @@ -0,0 +1,71 @@ +/* XPM */ +static char * celcius_off_xpm[] = { +"58 58 10 1", +" c None", +". c #020202", +"+ c #0A0A0A", +"@ c #484C46", +"# c #DEDEDE", +"$ c #7C827C", +"% c #8E968A", +"& c #444740", +"* c #767C6F", +"= c #3E463E", +" ...................................................... ", +" .++++++++++++++++++++++++++++++++++++++++++++++++++++++. ", +".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.#", +".+@@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.#", +".+@$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%....%%%%&%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%&%%%&%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&%%%&%%.#", +".+@$%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.....%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%%%%%%%%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%.....%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%=================================================%%.#", +".+@$%=================================================*%.#", +".+@$%%*************************************************%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%....%%%%&&&&&%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%%%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%%%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&&&&&%%.#", +".+@$%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.....%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%%%%%%%%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%.....%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%..#", +" .......................................................# ", +" ###################################################### "}; diff --git a/xpm/celcius_on.xpm b/xpm/celcius_on.xpm new file mode 100644 index 0000000..ae8570b --- /dev/null +++ b/xpm/celcius_on.xpm @@ -0,0 +1,71 @@ +/* XPM */ +static char * celcius_on_xpm[] = { +"58 58 10 1", +" c None", +". c #020202", +"+ c #0A0A0A", +"@ c #484C46 s Back1", +"# c #DEDEDE", +"$ c #779866", +"% c #6EC63B s Back0", +"& c #2E4C17 s Back1", +"* c #6CB237 s Back1", +"= c #3E463E s Back1", +" ...................................................... ", +" .%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%. ", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%....%%%%&%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%&%%%&%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&%%%&%%%#", +".%%%%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.....%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%%%%%%%%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%.....%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%=================================================%%%#", +".%%%%=================================================*%%#", +".%%%%%*************************************************%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%....%%%%&&&&&%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%%%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%%%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&&&&&%%%#", +".%%%%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.....%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%%%%%%%%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%.....%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +" .%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# ", +" ###################################################### "}; diff --git a/xpm/fahrenheit_off.xpm b/xpm/fahrenheit_off.xpm new file mode 100644 index 0000000..5cc44ea --- /dev/null +++ b/xpm/fahrenheit_off.xpm @@ -0,0 +1,71 @@ +/* XPM */ +static char * fahrenheit_off_xpm[] = { +"58 58 10 1", +" c None", +". c #020202", +"+ c #0A0A0A", +"@ c #484C46", +"# c #DEDEDE", +"$ c #7C827C", +"% c #8E968A", +"& c #444740", +"* c #767C6F", +"= c #3E463E", +" ...................................................... ", +" .++++++++++++++++++++++++++++++++++++++++++++++++++++++. ", +".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.#", +".+@@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.#", +".+@$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%....%%%%&%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%&%%%&%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&%%%&%%.#", +".+@$%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.....%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%%%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%%%%%%%%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%.%%%%%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%=================================================%%.#", +".+@$%=================================================*%.#", +".+@$%%*************************************************%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%....%%%%&&&&&%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%%%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%%%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&&&&&%%.#", +".+@$%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.....%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%%%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%%%%%%%%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%.%%%%%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%..#", +" .......................................................# ", +" ###################################################### "}; diff --git a/xpm/fahrenheit_on.xpm b/xpm/fahrenheit_on.xpm new file mode 100644 index 0000000..5958649 --- /dev/null +++ b/xpm/fahrenheit_on.xpm @@ -0,0 +1,71 @@ +/* XPM */ +static char * fahrenheit_on_xpm[] = { +"58 58 10 1", +" c None", +". c #020202", +"+ c #0A0A0A", +"@ c #484C46 s Back1", +"# c #DEDEDE", +"$ c #779866", +"% c #6EC63B s Back0", +"& c #2E4C17 s Back1", +"* c #6CB237 s Back1", +"= c #3E463E s Back1", +" ...................................................... ", +" .%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%. ", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%....%%%%&%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%&%%%&%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&%%%&%%%#", +".%%%%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.....%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%%%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%%%%%%%%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%.%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%=================================================%%%#", +".%%%%=================================================*%%#", +".%%%%%*************************************************%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%....%%%%&&&&&%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%%%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%%%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&&&&&%%%#", +".%%%%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.....%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%%%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%%%%%%%%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%.%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +" .%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# ", +" ###################################################### "}; diff --git a/xpm/kelvin_off.xpm b/xpm/kelvin_off.xpm new file mode 100644 index 0000000..b3e4bc8 --- /dev/null +++ b/xpm/kelvin_off.xpm @@ -0,0 +1,71 @@ +/* XPM */ +static char * kelvin_off_xpm[] = { +"58 58 10 1", +" c None", +". c #020202", +"+ c #0A0A0A", +"@ c #484C46", +"# c #DEDEDE", +"$ c #7C827C", +"% c #8E968A", +"& c #444740", +"* c #767C6F", +"= c #3E463E", +" ...................................................... ", +" .++++++++++++++++++++++++++++++++++++++++++++++++++++++. ", +".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.#", +".+@@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.#", +".+@$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%....%%%%&%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%&%%%&%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&%%%&%%.#", +".+@$%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%.%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%...%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%.%%%%%%%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%%%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%.%%%.%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%=================================================%%.#", +".+@$%=================================================*%.#", +".+@$%%*************************************************%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%....%%%%&&&&&%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%%%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%%%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&&&&&%%.#", +".+@$%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%.%%%&&&&&%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%...%%%%%%%%%%%%.#", +".+@$%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%.%%%%%%%%%%%%.#", +".+@$%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%%%%%%%%.#", +".+@$%%%******%%%%%%******%%%%%%******%%%%.%%%.%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.#", +".+@$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%..#", +" .......................................................# ", +" ###################################################### "}; diff --git a/xpm/kelvin_on.xpm b/xpm/kelvin_on.xpm new file mode 100644 index 0000000..4bb02f8 --- /dev/null +++ b/xpm/kelvin_on.xpm @@ -0,0 +1,71 @@ +/* XPM */ +static char * kelvin_on_xpm[] = { +"58 58 10 1", +" c None", +". c #020202", +"+ c #0A0A0A", +"@ c #484C46 s Back1", +"# c #DEDEDE", +"$ c #779866", +"% c #6EC63B s Back0", +"& c #2E4C17 s Back1", +"* c #6CB237 s Back1", +"= c #3E463E s Back1", +" ...................................................... ", +" .%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%. ", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%....%%%%&%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%&%%%&%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&%%%&%%%#", +".%%%%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%.%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%...%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%.%%%%%%%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%%%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%.%%%.%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%=================================================%%%#", +".%%%%=================================================*%%#", +".%%%%%*************************************************%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%....%%%%&&&&&%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%%%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%....%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%%%%%%%%%%%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%%%%%%%%%&&&&&%%%#", +".%%%%*%%%%%%%%*%%*%%%%%%%%*%%*%%%%%%%%*%%%%%%%%%%&%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%%%%%%%%%%%%%&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%%.%%%&&&&&%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%%.%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%...%%%%%%%%%%%%%#", +".%%%%**%%%%%%**%%**%%%%%%**%%**%%%%%%**%%.%.%%%%%%%%%%%%%#", +".%%%%*%%****%%*%%*%%****%%*%%*%%****%%*%%.%%.%%%%%%%%%%%%#", +".%%%%%%******%%%%%%******%%%%%%******%%%%.%%%.%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#", +" .%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# ", +" ###################################################### "}; diff --git a/xpm/parts.xpm b/xpm/parts.xpm new file mode 100644 index 0000000..71e814a --- /dev/null +++ b/xpm/parts.xpm @@ -0,0 +1,60 @@ +/* XPM */ +static char * parts_xpm[] = { +"104 49 8 1", +" c None", +". c #8E968A", +"+ c #020202", +"@ c #767C6F", +"# c #6EC63B s Back0", +"$ c #6CB237 s Back1", +"% c #FFFFFF", +"& c #3E463E", +"..++++++....@@@@@@....++++++....++++++....@@@@@@....++++++....++++++....++++++....++++++....++++++..++++", +"+..++++..+@..@@@@..+@..++++..+@..++++..++..@@@@..++..++++..@+..++++..@@..++++..++..++++..++..++++..+..##", +"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++++++", +"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++..##", +"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++++++", +"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++..##", +"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++++++", +"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++..##", +"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++++++", +"+..@@@@..+@..@@@@..+@..++++..+@..++++..++..++++..++..++++..@+..++++..@@..@@@@..++..++++..++..++++..+..##", +"..@@@@@@....@@@@@@....++++++....++++++....++++++....++++++....++++++....@@@@@@....++++++....++++++..++++", +"+........+@........++........@@........+@........+@........++........+@........++........+@........+..##", +"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++++++", +"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++..##", +"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++++++", +"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++..##", +"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++++++", +"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++..##", +"+..++++..+@..@@@@..++..++++..@@..++++..+@..@@@@..+@..++++..++..++++..+@..@@@@..++..++++..+@..++++..+++++", +"..++++++....@@@@@@....++++++....++++++....@@@@@@....++++++....++++++....@@@@@@....++++++....++++++....##", +"##++++++####$$$$$$####++++++####++++++####$$$$$$####++++++####++++++####++++++####++++++####++++++##++++", +"+##++++##+$##$$$$##+$##++++##+$##++++##++##$$$$##++##++++##$+##++++##$$##++++##++##++++##++##++++##+%%%%", +"++######++$$######++$$######++$$######++++######++++######$$++######$$$$######++++######++++######++%%%%", +"++######++$$######++$$######++$$######++++######++++######$$++######$$$$######++++######++++######++%%%%", +"++######++$$######++$$######++$$######++++######++++######$$++######$$$$######++++######++++######++%%%%", +"++######++$$######++$$######++$$######++++######++++######$$++######$$$$######++++######++++######++%%%%", +"++######++$$######++$$######++$$######++++######++++######$$++######$$$$######++++######++++######++%%%%", +"++######++$$######++$$######++$$######++++######++++######$$++######$$$$######++++######++++######++%%%%", +"++######++$$######++$$######++$$######++++######++++######$$++######$$$$######++++######++++######++%%%%", +"+##$$$$##+$##$$$$##+$##++++##+$##++++##++##++++##++##++++##$+##++++##$$##$$$$##++##++++##++##++++##+%%%%", +"##$$$$$$####$$$$$$####++++++####++++++####++++++####++++++####++++++####$$$$$$####++++++####++++++##%%%%", +"+########+$########++########$$########+$########+$########++########+$########++########+$########+%%%%", +"++######++$$######++++######$$$$######++$$######++$$######++++######++$$######++++######++$$######++%%%%", +"++######++$$######++++######$$$$######++$$######++$$######++++######++$$######++++######++$$######++%%%%", +"++######++$$######++++######$$$$######++$$######++$$######++++######++$$######++++######++$$######++%%%%", +"++######++$$######++++######$$$$######++$$######++$$######++++######++$$######++++######++$$######++%%%%", +"++######++$$######++++######$$$$######++$$######++$$######++++######++$$######++++######++$$######++%%%%", +"++######++$$######++++######$$$$######++$$######++$$######++++######++$$######++++######++$$######++%%%%", +"+##++++##+$##$$$$##++##++++##$$##++++##+$##$$$$##+$##++++##++##++++##+$##$$$$##++##++++##+$##++++##+%%%%", +"##++++++####$$$$$$####++++++####++++++####$$$$$$####++++++####++++++####$$$$$$####++++++####++++++##%%%%", +".+++..@@@&.+++..+++.&@@@&&+++..+++..+++&.+++..+++.#+++##$$$&#+++##+++#&$$$&&+++##+++##+++&#+++##+++#%%%%", +"+...+@...+@...+@...++...++...@+...@@...++...++...++###+$###+$###+$###++###++###$+###$$###++###++###+%%%%", +"+...+@...+@...+@...++...++...@+...@@...++...++...++###+$###+$###+$###++###++###$+###$$###++###++###+%%%%", +"+...+@...+@...+@...++...++...@+...@@...++...++...++###+$###+$###+$###++###++###$+###$$###++###++###+%%%%", +"&@@@&.@@@&.+++..+++&&+++&&+++..+++..@@@&.+++..+++&&$$$&#$$$&#+++##+++&&+++&&+++##+++##$$$&#+++##+++&%%%%", +"+...+@...++...@@...+@...+@...++...+@...++...+@...++###+$###++###$$###+$###+$###++###+$###++###+$###+%%%%", +"+...+@...++...@@...+@...+@...++...+@...++...+@...++###+$###++###$$###+$###+$###++###+$###++###+$###+%%%%", +"+...+@...++...@@...+@...+@...++...+@...++...+@...++###+$###++###$$###+$###+$###++###+$###++###+$###+%%%%", +".+++..@@@&.+++&.+++..@@@&&+++..+++..@@@&.+++..+++.#+++##$$$&#+++&#+++##$$$&&+++##+++##$$$&#+++##+++#%%%%"}; diff --git a/xpm/xpm.h b/xpm/xpm.h new file mode 100644 index 0000000..a8e3814 --- /dev/null +++ b/xpm/xpm.h @@ -0,0 +1,15 @@ +#ifndef SHO_XPM_H +#define SHO_XPM_H + +extern char *celcius_on_xpm[]; +extern char *celcius_off_xpm[]; + +extern char *fahrenheit_on_xpm[]; +extern char *fahrenheit_off_xpm[]; + +extern char *kelvin_on_xpm[]; +extern char *kelvin_off_xpm[]; + +extern char *parts_xpm[]; + +#endif