Add wmArchUp

This commit is contained in:
Panagiotis Dimopoulos 2018-03-29 16:22:34 +03:00 committed by Carlos R. Mafra
parent 0075abd36f
commit 9c9d1a22b0
8 changed files with 535 additions and 0 deletions

2
wmArchUp/AUTHORS Normal file
View file

@ -0,0 +1,2 @@
Panagiotis A. Dimopoulos <panosdim@gmail.com>
Original creator and maintainer of wmarchup.

3
wmArchUp/CHANGES Normal file
View file

@ -0,0 +1,3 @@
2018-03-29 Panagiotis A. Dimopoulos <panosdim@gmail.com>
Initial Release 1.0

18
wmArchUp/COPYING Normal file
View file

@ -0,0 +1,18 @@
Copyright (c) 2018 Panagiotis A. Dimopoulos
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.

18
wmArchUp/Makefile Normal file
View file

@ -0,0 +1,18 @@
CC=gcc
INSTALL=install
PREFIX=/usr/local
CFLAGS+=-Wall `pkg-config --cflags dockapp`
LIBS=`pkg-config --libs dockapp`
wmarchup: wmarchup.o
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
wmarchup.o: wmarchup.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
install:
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
$(INSTALL) wmarchup $(DESTDIR)$(PREFIX)/bin
clean:
rm -f wmarchup wmarchup.o

59
wmArchUp/README Normal file
View file

@ -0,0 +1,59 @@
_____ .__ ____ ___
__ _ _______ / _ \_______ ____ | |__ | | \______
\ \/ \/ / \ / /_\ \_ __ \_/ ___\| | \| | /\____ \
\ / Y Y \/ | \ | \/\ \___| Y \ | / | |_> >
\/\_/|__|_| /\____|__ /__| \___ >___| /______/ | __/
\/ \/ \/ \/ |__|
*******************
*** DESCRIPTION ***
*******************
wmArchUp is a very simple program used to monitor for package updates in Arch
Linux. It uses the checkupdates script that come with pacman for safe checking
if there is any package updates. It is a dockapp that is supported by X window
managers such as Window Maker, AfterStep, BlackBox, Fluxbox and Enlightenment.
This dockapp is quite simple. It contains an Arch Linux logo icon. When there is
not package updates then the Arch Linux logo icon is greyed. When there are
package updates then the Arch Linux logo icon is blue. The program check for
updates every 10 minutes.
***************
*** OPTIONS ***
***************
This program has no command line options.
*********************
*** REQUIREMENTS ***
*********************
This program needs libdockapp library files in order to compile.
You can find libdockapp at http://www.dockapps.net/libdockapp
*******************
*** COMPILATION ***
*******************
To compile, simply invoke the "make" command.
********************
*** INSTALLATION ***
********************
To install the program (in /usr/local/bin), run : "make install" as root user
**************
*** THANKS ***
**************
Thanks to the authors of the libdockapp code, it has been a really good starting
base to develop this little application.
**************
*** AUTHOR ***
**************
wmArchUp has been written by Panagiotis A. Dimopoulos <panosdim@gmail.com>
All comments are welcome.

203
wmArchUp/archlinux.xpm Normal file
View file

@ -0,0 +1,203 @@
/* XPM */
static char *archlinux[] = {
/* columns rows colors chars-per-pixel */
"56 56 141 2 ",
" c #1793D0",
". c #1792D1",
"X c #1693D1",
"o c #1793D1",
"O c #1793D2",
"+ c #1794D1",
"@ c #1892D1",
"# c #1893D1",
"$ c #1893D2",
"% c #1894D1",
"& c #1994D1",
"* c #1894D2",
"= c #1A94D2",
"- c #1A95D2",
"; c #1B95D2",
": c #1C95D2",
"> c #1D95D2",
", c #1D96D2",
"< c #1E96D2",
"1 c #1F96D2",
"2 c #1F97D2",
"3 c #1E96D3",
"4 c #1F97D3",
"5 c #2096D3",
"6 c #2097D3",
"7 c #2198D3",
"8 c #2298D3",
"9 c #2299D3",
"0 c #2399D3",
"q c #2298D4",
"w c #2398D4",
"e c #2399D4",
"r c #2499D4",
"t c #2599D4",
"y c #249AD4",
"u c #259AD4",
"i c #269AD4",
"p c #279BD4",
"a c #289BD4",
"s c #299BD4",
"d c #289BD5",
"f c #299BD5",
"g c #2A9CD5",
"h c #2B9CD5",
"j c #2C9CD5",
"k c #2C9DD5",
"l c #2D9DD5",
"z c #2F9DD4",
"x c #2E9DD5",
"c c #2E9ED5",
"v c #2E9DD6",
"b c #2E9ED6",
"n c #2F9ED6",
"m c #2F9FD6",
"M c #309ED6",
"N c #309FD6",
"B c #319FD6",
"V c #32A0D6",
"C c #32A0D7",
"Z c #33A0D7",
"A c #33A1D7",
"S c #34A0D7",
"D c #34A1D7",
"F c #35A1D7",
"G c #36A1D7",
"H c #37A1D7",
"J c #35A2D7",
"K c #36A2D7",
"L c #37A2D7",
"P c #38A2D7",
"I c #38A3D7",
"U c #39A2D8",
"Y c #38A3D8",
"T c #39A3D8",
"R c #3AA3D8",
"E c #3CA3D9",
"W c #3AA4D8",
"Q c #3BA4D8",
"! c #3BA5D9",
"~ c #3CA4D8",
"^ c #3CA4D9",
"/ c #3CA5D9",
"( c #3DA5D9",
") c #3EA5D9",
"_ c #3FA5D9",
"` c #3EA6D9",
"' c #3FA6D9",
"] c #3EA5DA",
"[ c #40A6D9",
"{ c #41A6D9",
"} c #41A7D9",
"| c #42A6D9",
" . c #42A7D9",
".. c #43A7D9",
"X. c #41A7DA",
"o. c #42A7DA",
"O. c #43A7DA",
"+. c #43A8DA",
"@. c #44A8D9",
"#. c #44A8DA",
"$. c #45A8DA",
"%. c #45A9DA",
"&. c #46A9DA",
"*. c #47A9DA",
"=. c #46A9DB",
"-. c #47AADA",
";. c #46AADB",
":. c #47AADB",
">. c #48A9DB",
",. c #48AADB",
"<. c #49AADB",
"1. c #49ABDB",
"2. c #4AABDB",
"3. c #4BABDB",
"4. c #4BACDC",
"5. c #4CACDC",
"6. c #4DACDC",
"7. c #4CADDC",
"8. c #4DACDD",
"9. c #4EADDC",
"0. c #4FADDC",
"q. c #4FAEDD",
"w. c #50ADDD",
"e. c #50AEDC",
"r. c #51AEDC",
"t. c #50AEDD",
"y. c #51AEDD",
"u. c #53AEDC",
"i. c #53AEDD",
"p. c #52AFDD",
"a. c #53AFDD",
"s. c #54AFDD",
"d. c #54AEDE",
"f. c #55B0DC",
"g. c #54B0DD",
"h. c #55B0DD",
"j. c #56B0DD",
"k. c #55B0DE",
"l. c #57B1DE",
"z. c #58B1DE",
"x. c None",
/* pixels */
"x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.",
"x.x.x.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.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.# 7 x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.",
"x.x.x.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 , J x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.",
"x.x.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 * B x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.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
"x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.5.5.3.1.1.1.%.%.%.#.#.+.[ [ [ [ [ ~ [ ~ [ 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.6.6.6.6.8.8.1.1.1.1.1.%.%.%.%.#.#.[ [ [ [ [ 8.d.x.x.x.x.x.x.x.x.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.w.w.w.8.8.8.1.1.X.U L z z z B B L U [ [ #.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.r.h.h.d.r.r.w.1.~ z q > > > * * * * * * > , i B #.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.h.h.h.h.r.%.L q > o o X o X o o o o o o o o o # > C x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.x.x.x.x.x.x.x.h.z.z.h.3.A > o o o o o o o o o o o o o o o o o o o > z x.x.x.x.x.x.x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.x.x.x.x.x.x.x.h.h.#.A , o o o o o o o o o o o o o o o o o o o o o o 6 x.x.x.x.x.x.x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.x.x.x.x.x.x.h.8.L q o o o o o o o o o o o o o o o o o o o o o o o o O 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.I a * o o o o o o o o o o + + o o o o o o o o o o o o o o * x.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 o o o o o o o o o x.x.x.x.o o o o o o o o o o o o o * 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 o o o o o o o o o x.x.x.x.x.x.x.x.o o o o o o o o o o o o o 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 o o o o o o o o o x.x.x.x.x.x.x.x.o o o o o o o o o o o o o 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 o o o o o o o o o x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o o x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.x.o o o o o o o o o o o o o + x.x.x.x.x.x.x.x.x.x.x.x.# o o o o o o o o o o o o o x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.# o o o o o o o o o o o o o + x.x.x.x.x.x.x.x.x.x.x.x.# o o o o o o o o o o x.x.# # x.x.x.x.x.x.x.",
"x.x.x.x.x.x.x.o o o o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.o o o o o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o o x.x.x.x.x.x.x.x.",
"x.x.x.x.x.x.o o o o o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o o o x.x.x.x.x.x.x.",
"x.x.x.x.x.o o o o o o o o o o o o o o o o o x.x.x.x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o o o x.x.x.x.x.x.",
"x.x.x.x.x.o o o o o o o o o o # o o x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.o o o o o o o o o o o o o x.x.x.x.x.",
"x.x.x.x.o o o o o o o o o o * x.x.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 o o o o o o o o x.x.x.x.",
"x.x.x.x.o o o o o o o o o x.x.x.x.x.x.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 o o o o o o x.x.x.x.",
"x.x.x.o o o o o o o o x.x.x.x.x.x.x.x.x.x.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 o o o o x.x.x.",
"x.x.o o o o o o x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.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 o o o x.x.",
"x.x.o o o o x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.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 o x.x.",
"x.o o o x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.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 x.",
"x.o o x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.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 x.",
"x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x."
};

101
wmArchUp/archlinux_bw.xpm Normal file
View file

@ -0,0 +1,101 @@
/* XPM */
static char *archlinux_bw[] = {
/* columns rows colors chars-per-pixel */
"56 56 39 1 ",
" c gray49",
". c #7E7E7E",
"X c #7F7F7F",
"o c #808080",
"O c #818181",
"+ c #828282",
"@ c #838383",
"# c #848484",
"$ c #858585",
"% c #868686",
"& c #878787",
"* c #888888",
"= c #898989",
"- c #8A8A8A",
"; c #8B8B8B",
": c #8C8C8C",
"> c #8D8D8D",
", c #8E8E8E",
"< c #8F8F8F",
"1 c #909090",
"2 c #919191",
"3 c #929292",
"4 c #939393",
"5 c #949494",
"6 c #959595",
"7 c #969696",
"8 c #979797",
"9 c #989898",
"0 c #999999",
"q c #9A9A9A",
"w c #9B9B9B",
"e c #9C9C9C",
"r c #9D9D9D",
"t c #9E9E9E",
"y c #9F9F9F",
"u c #A0A0A0",
"i c #A1A1A1",
"p c #A2A2A2",
"a c None",
/* pixels */
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaaaaa #aaaaaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaaaaa #aaaaaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaaaaa o<aaaaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaaaa <aaaaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaaaa =aaaaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaaa o2aaaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaaao o o<aaaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaaaooooo<5aaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaao#o#oo#2aaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaa#####o#25aaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaa#######o<5aaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaa#=######=5aaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaa=======##=25aaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaa<========#<5aaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaa===<========59aaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaa<<=<=======<9aaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaa<<<<<<==<=<99aaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaa2aaa<<<<<=<<==2raaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaa5525aa<<<<<<<<<<9raaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaa555552a22<2<<<<<2raaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaa5555555525222222<<9raaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaa9995955555522222225uaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaa99999595555552222259raaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaa999r99995595555555525raaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaarrrrr9r999999959555555rraaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaarurrr9r9r952<<==<=<2555raaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaruururr95<ooo o ooo=<5raaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaauuuur9<oo o<aaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaruuu9<o o=aaaaaaaaaaaaaa",
"aaaaaaaaaaaaaauu9<o oaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaur2o #aaaaaaaaaaaaa",
"aaaaaaaaaaaaa2# aaaaaaaaaaaaa",
"aaaaaaaaaaaaoo aaaa aaaaaaaaaaaa",
"aaaaaaaaaaaa aaaaaaaa aaaaaaaaaaa",
"aaaaaaaaaaa aaaaaaaa aaaaaaaaaaa",
"aaaaaaaaaaa aaaaaaaaaa aaaaaaaaaa",
"aaaaaaaaaa aaaaaaaaaa aaaaaaaaaa",
"aaaaaaaaaa aaaaaaaaaaaa aaaaaaaaa",
"aaaaaaaaa aaaaaaaaaaaa aaaaaaaaa",
"aaaaaaaaa aaaaaaaaaaaa aaaaaaaa",
"aaaaaaaa aaaaaaaaaaaa aaaaaaaa",
"aaaaaaa oaaaaaaaaaaaa aa aaaaaaa",
"aaaaaaa aaaaaaaaaaaa aaaaaaaaaa",
"aaaaaa aaaaaaaaaaaa aaaaaaaa",
"aaaaaa aaaaaaaaaaaa aaaaaaa",
"aaaaa aaaaaaaaaaaaa aaaaaa",
"aaaaa aaaaaaaaaaaaaaaaaaaa aaaaa",
"aaaa aaaaaaaaaaaaaaaaaaaaaaaaaa aaaa",
"aaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaa",
"aaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaa",
"aa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aa",
"aa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aa",
"a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a",
"a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a",
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
};

131
wmArchUp/wmarchup.c Normal file
View file

@ -0,0 +1,131 @@
/*
* Copyright (c) 2002 Alban G. Hertroys
*
* Basic example of libDockapp usage
*
* This dockapp will draw a rectangle with a
* bouncing ball in it.
*/
/* also includes Xlib, Xresources, XPM, stdlib and stdio */
#include <dockapp.h>
#include <stdio.h>
/* include the pixmap to use */
#include "archlinux.xpm"
#include "archlinux_bw.xpm"
#define TRUE 1
#define FALSE 0
#define MAX 256
/*
* Prototypes for local functions
*/
void destroy(void);
int check_for_updates();
/*
* Global variables
*/
Pixmap arch, arch_mask, arch_bw, arch_bw_mask;
unsigned short height, width;
XEvent ev;
/*
* M A I N
*/
int
main(int argc, char **argv)
{
DACallbacks eventCallbacks = {
destroy, /* destroy */
NULL, /* buttonPress */
NULL, /* buttonRelease */
NULL, /* motion (mouse) */
NULL, /* mouse enters window */
NULL, /* mouse leaves window */
NULL /* timeout */
};
/* provide standard command-line options */
DAParseArguments(
argc, argv, /* Where the options come from */
NULL, 0, /* Our list with options - none as you can see */
"This is dockapp watch for available updates "
"in Arch Linux packages.\n",
"wmarchup version 1.0");
/* Tell libdockapp what version we expect it to be (a date from
* NEWS should do).
*/
DASetExpectedVersion(20050716);
DAInitialize("", "WMArchUp", 56, 56, argc, argv);
DAMakePixmapFromData(
archlinux,
&arch,
&arch_mask,
&height,
&width);
DAMakePixmapFromData(
archlinux_bw,
&arch_bw,
&arch_bw_mask,
&height,
&width);
DASetShape(arch_bw_mask);
DASetPixmap(arch_bw);
/* Respond to destroy and timeout events (the ones not NULL in the
* eventCallbacks variable.
*/
DASetCallbacks(&eventCallbacks);
DAShow(); /* Show the dockapp window. */
while (1) {
if (check_for_updates() == TRUE) {
DASetShape(arch_mask);
DASetPixmap(arch);
} else {
DASetShape(arch_bw_mask);
DASetPixmap(arch_bw);
}
/* handle all pending X events */
while (XPending(DADisplay)) {
XNextEvent(DADisplay, &ev);
DAProcessEvent(&ev);
}
sleep(600);
}
/* not reached */
exit(EXIT_SUCCESS);
}
int
check_for_updates() {
FILE *fp;
char res[MAX];
/* Read output from command */
fp = popen("checkupdates","r");
if( fgets (res, MAX, fp)!=NULL ) {
fclose(fp);
return TRUE;
} else {
return FALSE;
}
}
void
destroy(void)
{
return;
}