Conky ${hr} length

how can i set when a horizzontal live in conky will stop?

Always search before posting.
https://bbs.archlinux.org/viewtopic.php?pid=980228

Similar Messages

  • Fixed length field in conky

    Please note the "Net: 271B " in the second line on conky. This screenshot was taken when internet was almost idle.
    When the internet speed increases to something like 250Kbps, the while second line shifs by 1 or 2 pixels, resulting into the movement of the whole second line.
    How can I avoid that?
    Screenshot:-
    http://img830.imageshack.us/i/conkyissue.png/
    My .conkyrc file:-
    #avoid flicker
    double_buffer yes
    #own window to run simultanious 2 or more conkys
    own_window yes
    own_window_transparent yes
    own_window_type desktop
    own_window_hints undecorate,sticky,skip_taskbar,skip_pager
    #borders
    draw_borders no
    border_margin 1
    #shades
    draw_shades yes
    # Stippled borders?
    stippled_borders 8
    # border margins
    border_margin 40
    # border width
    border_width 1
    #position
    gap_x 0
    gap_y 0
    alignment top_left
    #behaviour
    update_interval 1
    #colour
    default_color 8f8f8f
    #default_shade_color 000000
    own_window_colour 262626
    #font
    use_xft yes
    xftalpha 0.8
    xftfont bauhaus:pixelsize=10
    override_utf8_locale yes
    #to prevent window from moving
    use_spacer yes
    minimum_size 1268 0
    #mpd
    mpd_host localhost
    mpd_port 6600
    TEXT
    Cpu: ${color e0e0e0}${font} ${freq}Mhz ${cpu}% ${cpubar 7,50} | ${color} Temp: ${execi 60 ~/thermal} | ${color} Mem: ${color e0e0e0}${font}${mem} ${membar 7,50} | ${color} Root: ${color e0e0e0}${font}${fs_free /} ${color} | ${color} Email: ${color e0e0e0}${execi 300 ~/gmail} | ${color} Mpd: ${color e0e0e0}${font}${mpd_smart} | ${color} Up: ${color e0e0e0}${font}${uptime_short}${color} | ${color} ${execi 5 ~/battery}
    Net: ${color e0e0e0}${font}${downspeed eth0} Kb/s ${color} ${totaldown eth0} downloaded | ${color} ${color e0e0e0}${upspeed eth0} Kb/s ${color} ${totalup eth0} uploaded${color}

    anonymous_user wrote:
    For example, in the last line, use this:
    Net: ${color e0e0e0}${font}${downspeed eth0} Kb/s ${color} ${goto 150}${totaldown eth0} downloaded | ${color} ${color e0e0e0}${upspeed eth0} Kb/s ${color} ${totalup eth0} uploaded${color}
    Tweak the value of the goto if necessary.
    cool. that did the job...
    Thanks

  • Limiting string length in conky

    In conky, i know 1 method for shortening strings to display the parts of them i want to see, that method is called cut.
    It works great if i'm using the execi function in conky.
    However i have a slight problem, i use:
    ${top_mem name 1}${offest -50} ${top_mem mem 1 mem_res 6}
    to display process name and memory usage (in Mb) however the process name is too long and overlaps with the usage number, how can i shorten it to just 10 letters of the output?
    Last edited by rabcor (2014-01-23 09:16:16)

    Thanks, that did it. After doing that though i had to increase offest from  -50 to -10
    Last edited by rabcor (2014-01-23 10:36:02)

  • Cannot build conky 1.8.2 (abs)

    [doctor@doctor abs]$ abs extra/conky
    ==> Starting ABS sync...
    receiving file list ... done
    extra/
    extra/conky/
    extra/conky/PKGBUILD
    extra/conky/PKGBUILD.cmake
    sent 124 bytes received 2993 bytes 890.57 bytes/sec
    total size is 2759 speedup is 0.89
    [doctor@doctor abs]$ cp ~/Desktop/PKGBUILD /var/abs/extra/conky/PKGBUILD
    [doctor@doctor abs]$ cd extra/conky/
    [doctor@doctor conky]$ makepkg
    ==> Making package: conky 1.8.2git20111107-1 (Tue Dec 20 13:58:28 EET 2011)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Downloading conky-1.8.2git20111107.tar.xz...
    --2011-12-20 13:58:28-- ftp://ftp.archlinux.org/other/conky/conky-1.8.2git20111107.tar.xz
    => `conky-1.8.2git20111107.tar.xz.part'
    Resolving ftp.archlinux.org... 209.85.41.143, 209.85.41.144
    Connecting to ftp.archlinux.org|209.85.41.143|:21... connected.
    Logging in as anonymous ... Logged in!
    ==> SYST ... done. ==> PWD ... done.
    ==> TYPE I ... done. ==> CWD (1) /other/conky ... done.
    ==> SIZE conky-1.8.2git20111107.tar.xz ... 244616
    ==> PASV ... done. ==> RETR conky-1.8.2git20111107.tar.xz ... done.
    Length: 244616 (239K) (unauthoritative)
    100%[========================================================================================================================================================>] 244,616 54.1K/s in 4.5s
    2011-12-20 13:58:36 (52.8 KB/s) - `conky-1.8.2git20111107.tar.xz.part' saved [244616]
    ==> Validating source files with sha1sums...
    conky-1.8.2git20111107.tar.xz ... Passed
    ==> Extracting Sources...
    -> Extracting conky-1.8.2git20111107.tar.xz with bsdtar
    ==> Starting build()...
    Running aclocal -I m4 ...
    Running libtoolize --force --copy ...
    libtoolize: putting auxiliary files in `.'.
    libtoolize: copying file `./ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
    libtoolize: copying file `m4/libtool.m4'
    libtoolize: copying file `m4/ltoptions.m4'
    libtoolize: copying file `m4/ltsugar.m4'
    libtoolize: copying file `m4/ltversion.m4'
    libtoolize: copying file `m4/lt~obsolete.m4'
    Running autoheader ...
    Running automake --add-missing --copy --gnu ...
    configure.ac:37: installing `./compile'
    configure.ac:33: installing `./config.guess'
    configure.ac:33: installing `./config.sub'
    configure.ac:17: installing `./install-sh'
    configure.ac:17: installing `./missing'
    lua/Makefile.am: installing `./depcomp'
    Running autoconf ...
    checking for a BSD-compatible install... /bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking how to print strings... printf
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for ar... ar
    checking for archiver @FILE support... @
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for sysroot... no
    checking for mt... no
    checking if : is a manifest tool... no
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking whether gcc and cc understand -c and -o together... yes
    checking for pkg-config... yes
    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.19... yes
    checking for fopencookie... yes
    checking for funopen... no
    checking for X11... yes
    checking for LUA... yes
    checking for cairo... yes
    checking for cairo_xlib... yes
    checking for tolua++... tolua++
    checking for library containing tolua_error... -ltolua++
    checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
    checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
    checking for shared library run path origin... done
    checking for iconv... yes
    checking for working iconv... yes
    checking for iconv declaration...
    extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
    checking for Xext... yes
    checking for XDamage... yes
    checking for Xft... yes
    checking for libcurl... yes
    checking signal.h usability... yes
    checking signal.h presence... yes
    checking for signal.h... yes
    checking for unistd.h... (cached) yes
    checking sys/utsname.h usability... yes
    checking sys/utsname.h presence... yes
    checking for sys/utsname.h... yes
    checking for sys/stat.h... (cached) yes
    checking linux/soundcard.h usability... yes
    checking linux/soundcard.h presence... yes
    checking for linux/soundcard.h... yes
    checking alsa/asoundlib.h usability... yes
    checking alsa/asoundlib.h presence... yes
    checking for alsa/asoundlib.h... yes
    checking dirent.h usability... yes
    checking dirent.h presence... yes
    checking for dirent.h... yes
    checking mcheck.h usability... yes
    checking mcheck.h presence... yes
    checking for mcheck.h... yes
    checking sys/statfs.h usability... yes
    checking sys/statfs.h presence... yes
    checking for sys/statfs.h... yes
    checking sys/param.h usability... yes
    checking sys/param.h presence... yes
    checking for sys/param.h... yes
    checking pthread.h usability... yes
    checking pthread.h presence... yes
    checking for pthread.h... yes
    checking semaphore.h usability... yes
    checking semaphore.h presence... yes
    checking for semaphore.h... yes
    checking assert.h usability... yes
    checking assert.h presence... yes
    checking for assert.h... yes
    checking errno.h usability... yes
    checking errno.h presence... yes
    checking for errno.h... yes
    checking time.h usability... yes
    checking time.h presence... yes
    checking for time.h... yes
    checking for sys/mount.h... yes
    checking sys/inotify.h usability... yes
    checking sys/inotify.h presence... yes
    checking for sys/inotify.h... yes
    checking for calloc... yes
    checking for malloc... yes
    checking for free... yes
    checking for popen... yes
    checking for sysinfo... yes
    checking for getloadavg... yes
    checking for memrchr... yes
    checking for strndup... yes
    checking for gethostbyname_r... yes
    checking for library containing clock_gettime... -lrt
    checking for struct statfs.f_fstypename... no
    checking for db2x_xsltproc... db2x_xsltproc
    checking for db2x_manxml... db2x_manxml
    checking for xsltproc... xsltproc
    checking if /usr/bin/ld -m elf_x86_64 accepts -O1... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating data/Makefile
    config.status: creating doc/Makefile
    config.status: creating src/Makefile
    config.status: creating src/build.h
    config.status: creating lua/Makefile
    config.status: creating src/config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands
    conky 1.8.2_preNONE configured successfully:
    Installing into: /usr
    System config dir: /etc
    C compiler flags: -I/usr/include/freetype2 -Wall -W
    Libraries: -lX11 -llua -lm -ltolua++ -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -lXext -lXdamage -lXfixes -lXft -lcurl -lrt -ltolua++ -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu
    Linker flags: -Wl,-O1
    * X11:
    X11 support: yes
    XDamage support: yes
    XDBE support: yes
    Xft support: yes
    ARGB support yes
    * Music detection:
    Audacious: no
    BMPx: no
    MPD: no
    MOC: no
    XMMS2: no
    * General:
    math: no
    hddtemp: yes
    portmon: no
    RSS: no
    Curl: yes
    Weather
    METAR: no
    XOAP: no
    wireless: no
    IBM: no
    nvidia: no
    eve-online: no
    config-output: yes
    Imlib2: no
    ALSA mixer: no
    apcupsd: yes
    I/O stats: yes
    ncurses: no
    * Lua (yes) bindings:
    Cairo: yes
    Imlib2: no
    Making all in src
    make[1]: Entering directory `/var/abs/extra/conky/src/conky-1.8.2git20111107/src'
    sh ./../text2c.sh ./../data/conky.conf defconfig.h defconfig
    make all-am
    make[2]: Entering directory `/var/abs/extra/conky/src/conky-1.8.2git20111107/src'
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-conf_cookie.o -MD -MP -MF .deps/conky-conf_cookie.Tpo -c -o conky-conf_cookie.o `test -f 'conf_cookie.c' || echo './'`conf_cookie.c
    mv -f .deps/conky-conf_cookie.Tpo .deps/conky-conf_cookie.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-linux.o -MD -MP -MF .deps/conky-linux.Tpo -c -o conky-linux.o `test -f 'linux.c' || echo './'`linux.c
    linux.c: In function ‘get_battery_stuff’:
    linux.c:1908:10: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    linux.c: In function ‘get_acpi_ac_adapter’:
    linux.c:1405:9: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    linux.c: In function ‘get_acpi_fan’:
    linux.c:1329:8: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    linux.c: In function ‘update_load_average’:
    linux.c:825:9: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    linux.c: In function ‘update_threads’:
    linux.c:592:9: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    linux.c: In function ‘update_net_stats’:
    linux.c:364:7: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    linux.c:365:7: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    linux.c: In function ‘update_gateway_info’:
    linux.c:288:8: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    linux.c: In function ‘get_ioscheduler’:
    linux.c:230:9: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    linux.c: In function ‘get_laptop_mode’:
    linux.c:208:9: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    linux.c: In function ‘update_uptime’:
    linux.c:126:9: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    linux.c: In function ‘is_disk’:
    linux.c:2311:18: warning: ‘dev_last’ may be used uninitialized in this function [-Wuninitialized]
    mv -f .deps/conky-linux.Tpo .deps/conky-linux.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-users.o -MD -MP -MF .deps/conky-users.Tpo -c -o conky-users.o `test -f 'users.c' || echo './'`users.c
    mv -f .deps/conky-users.Tpo .deps/conky-users.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-sony.o -MD -MP -MF .deps/conky-sony.Tpo -c -o conky-sony.o `test -f 'sony.c' || echo './'`sony.c
    mv -f .deps/conky-sony.Tpo .deps/conky-sony.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-i8k.o -MD -MP -MF .deps/conky-i8k.Tpo -c -o conky-i8k.o `test -f 'i8k.c' || echo './'`i8k.c
    mv -f .deps/conky-i8k.Tpo .deps/conky-i8k.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-x11.o -MD -MP -MF .deps/conky-x11.Tpo -c -o conky-x11.o `test -f 'x11.c' || echo './'`x11.c
    mv -f .deps/conky-x11.Tpo .deps/conky-x11.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-fonts.o -MD -MP -MF .deps/conky-fonts.Tpo -c -o conky-fonts.o `test -f 'fonts.c' || echo './'`fonts.c
    mv -f .deps/conky-fonts.Tpo .deps/conky-fonts.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-hddtemp.o -MD -MP -MF .deps/conky-hddtemp.Tpo -c -o conky-hddtemp.o `test -f 'hddtemp.c' || echo './'`hddtemp.c
    mv -f .deps/conky-hddtemp.Tpo .deps/conky-hddtemp.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-ccurl_thread.o -MD -MP -MF .deps/conky-ccurl_thread.Tpo -c -o conky-ccurl_thread.o `test -f 'ccurl_thread.c' || echo './'`ccurl_thread.c
    mv -f .deps/conky-ccurl_thread.Tpo .deps/conky-ccurl_thread.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-llua.o -MD -MP -MF .deps/conky-llua.Tpo -c -o conky-llua.o `test -f 'llua.c' || echo './'`llua.c
    mv -f .deps/conky-llua.Tpo .deps/conky-llua.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-apcupsd.o -MD -MP -MF .deps/conky-apcupsd.Tpo -c -o conky-apcupsd.o `test -f 'apcupsd.c' || echo './'`apcupsd.c
    apcupsd.c: In function ‘update_apcupsd’:
    apcupsd.c:219:7: warning: ‘sock’ may be used uninitialized in this function [-Wuninitialized]
    mv -f .deps/conky-apcupsd.Tpo .deps/conky-apcupsd.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-iconv_tools.o -MD -MP -MF .deps/conky-iconv_tools.Tpo -c -o conky-iconv_tools.o `test -f 'iconv_tools.c' || echo './'`iconv_tools.c
    mv -f .deps/conky-iconv_tools.Tpo .deps/conky-iconv_tools.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-colours.o -MD -MP -MF .deps/conky-colours.Tpo -c -o conky-colours.o `test -f 'colours.c' || echo './'`colours.c
    mv -f .deps/conky-colours.Tpo .deps/conky-colours.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-combine.o -MD -MP -MF .deps/conky-combine.Tpo -c -o conky-combine.o `test -f 'combine.c' || echo './'`combine.c
    mv -f .deps/conky-combine.Tpo .deps/conky-combine.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-common.o -MD -MP -MF .deps/conky-common.Tpo -c -o conky-common.o `test -f 'common.c' || echo './'`common.c
    mv -f .deps/conky-common.Tpo .deps/conky-common.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT conky-conky.o -MD -MP -MF .deps/conky-conky.Tpo -c -o conky-conky.o `test -f 'conky.c' || echo './'`conky.c
    conky.c: In function ‘generate_text_internal’:
    conky.c:887:7: error: unknown type name ‘bool’
    conky.c:887:28: error: ‘false’ undeclared (first use in this function)
    conky.c:887:28: note: each undeclared identifier is reported only once for each function it appears in
    conky.c:892:17: error: ‘true’ undeclared (first use in this function)
    conky.c:742:19: warning: variable ‘needed’ set but not used [-Wunused-but-set-variable]
    conky.c: In function ‘draw_each_line_inner’:
    conky.c:2827:6: warning: variable ‘last_special_needed’ set but not used [-Wunused-but-set-variable]
    make[2]: *** [conky-conky.o] Error 1
    make[2]: Leaving directory `/var/abs/extra/conky/src/conky-1.8.2git20111107/src'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/var/abs/extra/conky/src/conky-1.8.2git20111107/src'
    make: *** [all-recursive] Error 1
    ==> ERROR: A failure occurred in build().
    Aborting...
    My PKGBUILD is
    # $Id: PKGBUILD 142242 2011-11-07 05:35:59Z bisson $
    # Contributor: Giovanni Scafora <[email protected]>
    # Contributor: James Rayner <[email protected]>
    # Contributor: Partha Chowdhury <[email protected]>
    # Maintainer: Gaetan Bisson <[email protected]>
    pkgname=conky
    pkgver=1.8.2git20111107
    pkgrel=1
    pkgdesc='Lightweight system monitor for X'
    url='http://conky.sourceforge.net/'
    license=('BSD' 'GPL')
    arch=('i686' 'x86_64')
    options=('!emptydirs')
    makedepends=('pkg-config' 'docbook2x')
    depends=('alsa-lib' 'libxml2' 'curl' 'libxft' 'glib2' 'libxdamage' 'imlib2')
    backup=('etc/conky/conky.conf' 'etc/conky/conky_no_x11.conf')
    source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.xz")
    sha1sums=('133fc6fdc725162af9a98c72c1b7349efc22447c')
    # git clone git://git.omp.am/conky.git; cd conky; git archive --prefix=${pkgname}-${pkgver}/ origin/1.8.2 | xz > ../${pkgname}-${pkgver}.tar.xz
    replaces=('torsmo')
    build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    sh autogen.sh
    CPPFLAGS="${CXXFLAGS}" LIBS="${LDFLAGS}" ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --disable-ibm \
    --enable-curl \
    --enable-lua \
    --enable-lua-cairo \
    --disable-ncurses \
    --disable-math --disable-mpd --disable-moc --disable-xmms2 \
    --disable-weather-xoap --disable-portmon --disable-alsa
    make
    package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install
    install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

    Does it still segment fault without a .conkyrc?
    Also FWIW, heres my conky settings:
    # Use Xft?
    use_xft yes
    xftfont mono:size=9
    xftalpha 0.8
    text_buffer_size 2048
    # Update interval in seconds
    update_interval 1
    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_transparent no
    own_window_type override
    own_window_hints undecorated,sticky,skip_taskbar,skip_pager
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    # Minimum size of text area
    minimum_size 1280 0
    # Draw shades?
    draw_shades no
    # Draw outlines?
    draw_outline no
    # Draw borders around text
    draw_borders no
    # Draw borders around graphs
    draw_graph_borders yes
    # Stippled borders?
    stippled_borders 0
    # border margins
    border_margin 0
    # border width
    border_width 0
    # Default colors and also border colors
    default_color white
    color2 1994D1
    default_shade_color black
    default_outline_color 3c3c3c
    own_window_colour 3c3c3c
    # Text alignment, other possible values are commented
    #alignment top_left
    #alignment top_right
    alignment bottom_left
    #alignment bottom_right
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 0
    gap_y 3
    # Subtract file system buffers from used memory?
    no_buffers yes
    # set to yes if you want all text to be in uppercase
    uppercase no
    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2
    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2
    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale yes
    # Add spaces to keep things from moving about? This only affects certain objects.
    use_spacer right
    TEXT

  • Hacking conky's own_window_type desktop to run on one virtual desktop

    Since I have no dual screen setup (just a laptop) I'd like to use my virtual desktops to run different conky instances on (almost) every virtual desktop. I tried to accomplish this by using own_window_type normal in conky, and that works - until I call the desktop, then it just minimises like a regular app. That's not what I want.
    People in #conky suggested I use the if_match functionality in conky, so I can keep using the own_window_type desktop setting, but that does not solve my issue since you cannot define different conky window sizes in one configuration file. I checked in with #openbox and they told me essentially Conky should not display on every virtual desktop (and frankly they have a point, since you can tell e.g. Openbox to sticky an app on every virtual desktop). However, one would need to hack the code for that (specifically the stuff that takes care of putting the desktop window type on every virtual desktop). That's where you guys come in, since my C knowledge is close to non-existent .
    I was told to look at x11.c and specifically the init_window() function but I'm at loss where to start...
    /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
    * vim: ts=4 sw=4 noet ai cindent syntax=c
    * Conky, a system monitor, based on torsmo
    * Any original torsmo code is licensed under the BSD license
    * All code written since the fork of torsmo is licensed under the GPL
    * Please see COPYING for details
    * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
    * Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al.
    * (see AUTHORS)
    * All rights reserved.
    * 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 3 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, see <http://www.gnu.org/licenses/>.
    #include "config.h"
    #include "conky.h"
    #include "logging.h"
    #include "common.h"
    #include "x11.h"
    #include <X11/Xlib.h>
    #include <X11/Xatom.h>
    #include <X11/Xmd.h>
    #include <X11/Xutil.h>
    #ifdef IMLIB2
    #include "imlib2.h"
    #endif /* IMLIB2 */
    #ifdef XFT
    #include <X11/Xft/Xft.h>
    int use_xft = 0;
    #endif
    #ifdef HAVE_XDBE
    int use_xdbe;
    #endif
    #ifdef USE_ARGB
    int use_argb_visual;
    int have_argb_visual;
    #endif /* USE_ARGB */
    int own_window_argb_value;
    /* some basic X11 stuff */
    Display *display = NULL;
    int display_width;
    int display_height;
    int screen;
    static int set_transparent;
    static int background_colour;
    /* workarea from _NET_WORKAREA, this is where window / text is aligned */
    int workarea[4];
    /* Window stuff */
    struct conky_window window;
    char window_created = 0;
    /* local prototypes */
    static void update_workarea(void);
    static Window find_desktop_window(Window *p_root, Window *p_desktop);
    static Window find_subwindow(Window win, int w, int h);
    /* X11 initializer */
    void init_X11(const char *disp)
    if (!display) {
    if ((display = XOpenDisplay(disp)) == NULL) {
    CRIT_ERR(NULL, NULL, "can't open display: %s", XDisplayName(disp));
    screen = DefaultScreen(display);
    display_width = DisplayWidth(display, screen);
    display_height = DisplayHeight(display, screen);
    get_x11_desktop_info(display, 0);
    update_workarea();
    static void update_workarea(void)
    /* default work area is display */
    workarea[0] = 0;
    workarea[1] = 0;
    workarea[2] = display_width;
    workarea[3] = display_height;
    /* Find root window and desktop window.
    * Return desktop window on success,
    * and set root and desktop byref return values.
    * Return 0 on failure. */
    static Window find_desktop_window(Window *p_root, Window *p_desktop)
    Atom type;
    int format, i;
    unsigned long nitems, bytes;
    unsigned int n;
    Window root = RootWindow(display, screen);
    Window win = root;
    Window troot, parent, *children;
    unsigned char *buf = NULL;
    if (!p_root || !p_desktop) {
    return 0;
    /* some window managers set __SWM_VROOT to some child of root window */
    XQueryTree(display, root, &troot, &parent, &children, &n);
    for (i = 0; i < (int) n; i++) {
    if (XGetWindowProperty(display, children[i], ATOM(__SWM_VROOT), 0, 1,
    False, XA_WINDOW, &type, &format, &nitems, &bytes, &buf)
    == Success && type == XA_WINDOW) {
    win = *(Window *) buf;
    XFree(buf);
    XFree(children);
    fprintf(stderr,
    PACKAGE_NAME": desktop window (%lx) found from __SWM_VROOT property\n",
    win);
    fflush(stderr);
    *p_root = win;
    *p_desktop = win;
    return win;
    if (buf) {
    XFree(buf);
    buf = 0;
    XFree(children);
    /* get subwindows from root */
    win = find_subwindow(root, -1, -1);
    update_workarea();
    win = find_subwindow(win, workarea[2], workarea[3]);
    if (buf) {
    XFree(buf);
    buf = 0;
    if (win != root) {
    fprintf(stderr,
    PACKAGE_NAME": desktop window (%lx) is subwindow of root window (%lx)\n",
    win, root);
    } else {
    fprintf(stderr, PACKAGE_NAME": desktop window (%lx) is root window\n", win);
    fflush(stderr);
    *p_root = root;
    *p_desktop = win;
    return win;
    static int colour_set = -1;
    /* if no argb visual is configured sets background to ParentRelative for the Window and all parents,
    else real transparency is used */
    void set_transparent_background(Window win, int alpha)
    (void)alpha; /* disable warnings when unused */
    #ifdef USE_ARGB
    if (have_argb_visual) {
    // real transparency
    if (set_transparent) {
    XSetWindowBackground(display, win, 0x00);
    } else if (colour_set != background_colour) {
    XSetWindowBackground(display, win,
    background_colour | (alpha << 24));
    colour_set = background_colour;
    } else {
    #endif /* USE_ARGB */
    // pseudo transparency
    if (set_transparent) {
    Window parent = win;
    unsigned int i;
    for (i = 0; i < 50 && parent != RootWindow(display, screen); i++) {
    Window r, *children;
    unsigned int n;
    XSetWindowBackgroundPixmap(display, parent, ParentRelative);
    XQueryTree(display, parent, &r, &parent, &children, &n);
    XFree(children);
    } else if (colour_set != background_colour) {
    XSetWindowBackground(display, win, background_colour);
    colour_set = background_colour;
    #ifdef USE_ARGB
    #endif /* USE_ARGB */
    #ifdef USE_ARGB
    static int get_argb_visual(Visual** visual, int *depth) {
    /* code from gtk project, gdk_screen_get_rgba_visual */
    XVisualInfo visual_template;
    XVisualInfo *visual_list;
    int nxvisuals = 0, i;
    visual_template.screen = screen;
    visual_list = XGetVisualInfo (display, VisualScreenMask,
    &visual_template, &nxvisuals);
    for (i = 0; i < nxvisuals; i++) {
    if (visual_list[i].depth == 32 &&
    (visual_list[i].red_mask == 0xff0000 &&
    visual_list[i].green_mask == 0x00ff00 &&
    visual_list[i].blue_mask == 0x0000ff)) {
    *visual = visual_list[i].visual;
    *depth = visual_list[i].depth;
    DBGP("Found ARGB Visual");
    XFree(visual_list);
    return 1;
    // no argb visual available
    DBGP("No ARGB Visual found");
    XFree(visual_list);
    return 0;
    #endif /* USE_ARGB */
    void destroy_window(void)
    #ifdef XFT
    if(window.xftdraw) {
    XftDrawDestroy(window.xftdraw);
    #endif
    if(window.gc) {
    XFreeGC(display, window.gc);
    memset(&window, 0, sizeof(struct conky_window));
    colour_set = -1;
    void init_window(int own_window, int w, int h, int set_trans, int back_colour,
    char **argv, int argc)
    /* There seems to be some problems with setting transparent background
    * (on fluxbox this time). It doesn't happen always and I don't know why it
    * happens but I bet the bug is somewhere here. */
    set_transparent = set_trans;
    background_colour = back_colour;
    window_created = 1;
    #ifdef OWN_WINDOW
    if (own_window) {
    int depth = 0, flags;
    Visual *visual = NULL;
    if (!find_desktop_window(&window.root, &window.desktop)) {
    return;
    #ifdef USE_ARGB
    if (use_argb_visual && get_argb_visual(&visual, &depth)) {
    have_argb_visual = 1;
    window.visual = visual;
    window.colourmap = XCreateColormap(display,
    DefaultRootWindow(display), window.visual, AllocNone);
    } else {
    #endif /* USE_ARGB */
    window.visual = DefaultVisual(display, screen);
    window.colourmap = DefaultColormap(display, screen);
    depth = CopyFromParent;
    visual = CopyFromParent;
    #ifdef USE_ARGB
    #endif /* USE_ARGB */
    if (window.type == TYPE_OVERRIDE) {
    /* An override_redirect True window.
    * No WM hints or button processing needed. */
    XSetWindowAttributes attrs = { ParentRelative, 0L, 0, 0L, 0, 0,
    Always, 0L, 0L, False, StructureNotifyMask | ExposureMask, 0L,
    True, 0, 0 };
    #ifdef USE_ARGB
    if (have_argb_visual) {
    attrs.colormap = window.colourmap;
    flags = CWBorderPixel | CWColormap | CWOverrideRedirect;
    } else {
    #endif /* USE_ARGB */
    flags = CWBackPixel | CWOverrideRedirect;
    #ifdef USE_ARGB
    #endif /* USE_ARGB */
    /* Parent is desktop window (which might be a child of root) */
    window.window = XCreateWindow(display, window.desktop, window.x,
    window.y, w, h, 0, depth, InputOutput, visual,
    flags, &attrs);
    XLowerWindow(display, window.window);
    fprintf(stderr, PACKAGE_NAME": window type - override\n");
    fflush(stderr);
    } else { /* window.type != TYPE_OVERRIDE */
    /* A window managed by the window manager.
    * Process hints and buttons. */
    XSetWindowAttributes attrs = { ParentRelative, 0L, 0, 0L, 0, 0,
    Always, 0L, 0L, False, StructureNotifyMask | ExposureMask |
    ButtonPressMask | ButtonReleaseMask, 0L, False, 0, 0 };
    XClassHint classHint;
    XWMHints wmHint;
    Atom xa;
    #ifdef USE_ARGB
    if (have_argb_visual) {
    attrs.colormap = window.colourmap;
    flags = CWBorderPixel | CWColormap | CWOverrideRedirect;
    } else {
    #endif /* USE_ARGB */
    flags = CWBackPixel | CWOverrideRedirect;
    #ifdef USE_ARGB
    #endif /* USE_ARGB */
    if (window.type == TYPE_DOCK) {
    window.x = window.y = 0;
    /* Parent is root window so WM can take control */
    window.window = XCreateWindow(display, window.root, window.x,
    window.y, w, h, 0, depth, InputOutput, visual,
    flags, &attrs);
    classHint.res_name = window.class_name;
    classHint.res_class = classHint.res_name;
    wmHint.flags = InputHint | StateHint;
    /* allow decorated windows to be given input focus by WM */
    wmHint.input =
    TEST_HINT(window.hints, HINT_UNDECORATED) ? False : True;
    if (window.type == TYPE_DOCK || window.type == TYPE_PANEL) {
    wmHint.initial_state = WithdrawnState;
    } else {
    wmHint.initial_state = NormalState;
    XmbSetWMProperties(display, window.window, NULL, NULL, argv,
    argc, NULL, &wmHint, &classHint);
    XStoreName(display, window.window, window.title);
    /* Sets an empty WM_PROTOCOLS property */
    XSetWMProtocols(display, window.window, NULL, 0);
    /* Set window type */
    if ((xa = ATOM(_NET_WM_WINDOW_TYPE)) != None) {
    Atom prop;
    switch (window.type) {
    case TYPE_DESKTOP:
    prop = ATOM(_NET_WM_WINDOW_TYPE_DESKTOP);
    fprintf(stderr, PACKAGE_NAME": window type - desktop\n");
    fflush(stderr);
    break;
    case TYPE_DOCK:
    prop = ATOM(_NET_WM_WINDOW_TYPE_DOCK);
    fprintf(stderr, PACKAGE_NAME": window type - dock\n");
    fflush(stderr);
    break;
    case TYPE_PANEL:
    prop = ATOM(_NET_WM_WINDOW_TYPE_DOCK);
    fprintf(stderr, PACKAGE_NAME": window type - panel\n");
    fflush(stderr);
    break;
    case TYPE_NORMAL:
    default:
    prop = ATOM(_NET_WM_WINDOW_TYPE_NORMAL);
    fprintf(stderr, PACKAGE_NAME": window type - normal\n");
    fflush(stderr);
    break;
    XChangeProperty(display, window.window, xa, XA_ATOM, 32,
    PropModeReplace, (unsigned char *) &prop, 1);
    /* Set desired hints */
    /* Window decorations */
    if (TEST_HINT(window.hints, HINT_UNDECORATED)) {
    /* fprintf(stderr, PACKAGE_NAME": hint - undecorated\n");
    fflush(stderr); */
    xa = ATOM(_MOTIF_WM_HINTS);
    if (xa != None) {
    long prop[5] = { 2, 0, 0, 0, 0 };
    XChangeProperty(display, window.window, xa, xa, 32,
    PropModeReplace, (unsigned char *) prop, 5);
    /* Below other windows */
    if (TEST_HINT(window.hints, HINT_BELOW)) {
    /* fprintf(stderr, PACKAGE_NAME": hint - below\n");
    fflush(stderr); */
    xa = ATOM(_WIN_LAYER);
    if (xa != None) {
    long prop = 0;
    XChangeProperty(display, window.window, xa, XA_CARDINAL, 32,
    PropModeAppend, (unsigned char *) &prop, 1);
    xa = ATOM(_NET_WM_STATE);
    if (xa != None) {
    Atom xa_prop = ATOM(_NET_WM_STATE_BELOW);
    XChangeProperty(display, window.window, xa, XA_ATOM, 32,
    PropModeAppend, (unsigned char *) &xa_prop, 1);
    /* Above other windows */
    if (TEST_HINT(window.hints, HINT_ABOVE)) {
    /* fprintf(stderr, PACKAGE_NAME": hint - above\n");
    fflush(stderr); */
    xa = ATOM(_WIN_LAYER);
    if (xa != None) {
    long prop = 6;
    XChangeProperty(display, window.window, xa, XA_CARDINAL, 32,
    PropModeAppend, (unsigned char *) &prop, 1);
    xa = ATOM(_NET_WM_STATE);
    if (xa != None) {
    Atom xa_prop = ATOM(_NET_WM_STATE_ABOVE);
    XChangeProperty(display, window.window, xa, XA_ATOM, 32,
    PropModeAppend, (unsigned char *) &xa_prop, 1);
    /* Sticky */
    if (TEST_HINT(window.hints, HINT_STICKY)) {
    /* fprintf(stderr, PACKAGE_NAME": hint - sticky\n");
    fflush(stderr); */
    xa = ATOM(_NET_WM_DESKTOP);
    if (xa != None) {
    CARD32 xa_prop = 0xFFFFFFFF;
    XChangeProperty(display, window.window, xa, XA_CARDINAL, 32,
    PropModeAppend, (unsigned char *) &xa_prop, 1);
    xa = ATOM(_NET_WM_STATE);
    if (xa != None) {
    Atom xa_prop = ATOM(_NET_WM_STATE_STICKY);
    XChangeProperty(display, window.window, xa, XA_ATOM, 32,
    PropModeAppend, (unsigned char *) &xa_prop, 1);
    /* Skip taskbar */
    if (TEST_HINT(window.hints, HINT_SKIP_TASKBAR)) {
    /* fprintf(stderr, PACKAGE_NAME": hint - skip_taskbar\n");
    fflush(stderr); */
    xa = ATOM(_NET_WM_STATE);
    if (xa != None) {
    Atom xa_prop = ATOM(_NET_WM_STATE_SKIP_TASKBAR);
    XChangeProperty(display, window.window, xa, XA_ATOM, 32,
    PropModeAppend, (unsigned char *) &xa_prop, 1);
    /* Skip pager */
    if (TEST_HINT(window.hints, HINT_SKIP_PAGER)) {
    /* fprintf(stderr, PACKAGE_NAME": hint - skip_pager\n");
    fflush(stderr); */
    xa = ATOM(_NET_WM_STATE);
    if (xa != None) {
    Atom xa_prop = ATOM(_NET_WM_STATE_SKIP_PAGER);
    XChangeProperty(display, window.window, xa, XA_ATOM, 32,
    PropModeAppend, (unsigned char *) &xa_prop, 1);
    fprintf(stderr, PACKAGE_NAME": drawing to created window (0x%lx)\n",
    window.window);
    fflush(stderr);
    XMapWindow(display, window.window);
    } else
    #endif /* OWN_WINDOW */
    XWindowAttributes attrs;
    if (!window.window) {
    window.window = find_desktop_window(&window.root, &window.desktop);
    window.visual = DefaultVisual(display, screen);
    window.colourmap = DefaultColormap(display, screen);
    if (XGetWindowAttributes(display, window.window, &attrs)) {
    window.width = attrs.width;
    window.height = attrs.height;
    fprintf(stderr, PACKAGE_NAME": drawing to desktop window\n");
    /* Drawable is same as window. This may be changed by double buffering. */
    window.drawable = window.window;
    #ifdef HAVE_XDBE
    if (use_xdbe) {
    int major, minor;
    if (!XdbeQueryExtension(display, &major, &minor)) {
    use_xdbe = 0;
    } else {
    window.back_buffer = XdbeAllocateBackBufferName(display,
    window.window, XdbeBackground);
    if (window.back_buffer != None) {
    window.drawable = window.back_buffer;
    fprintf(stderr, PACKAGE_NAME": drawing to double buffer\n");
    } else {
    use_xdbe = 0;
    if (!use_xdbe) {
    NORM_ERR("failed to set up double buffer");
    if (!use_xdbe) {
    fprintf(stderr, PACKAGE_NAME": drawing to single buffer\n");
    #endif
    #ifdef IMLIB2
    cimlib_init(display, window.drawable, window.visual, window.colourmap);
    #endif /* IMLIB2 */
    XFlush(display);
    XSelectInput(display, window.window, ExposureMask | PropertyChangeMask
    #ifdef OWN_WINDOW
    | (own_window ? (StructureNotifyMask |
    ButtonPressMask | ButtonReleaseMask) : 0)
    #endif
    static Window find_subwindow(Window win, int w, int h)
    unsigned int i, j;
    Window troot, parent, *children;
    unsigned int n;
    /* search subwindows with same size as display or work area */
    for (i = 0; i < 10; i++) {
    XQueryTree(display, win, &troot, &parent, &children, &n);
    for (j = 0; j < n; j++) {
    XWindowAttributes attrs;
    if (XGetWindowAttributes(display, children[j], &attrs)) {
    /* Window must be mapped and same size as display or
    * work space */
    if (attrs.map_state != 0 && ((attrs.width == display_width
    && attrs.height == display_height)
    || (attrs.width == w && attrs.height == h))) {
    win = children[j];
    break;
    XFree(children);
    if (j == n) {
    break;
    return win;
    void create_gc(void)
    XGCValues values;
    values.graphics_exposures = 0;
    values.function = GXcopy;
    window.gc = XCreateGC(display, window.drawable,
    GCFunction | GCGraphicsExposures, &values);
    //Get current desktop number
    static inline void get_x11_desktop_current(Display *current_display, Window root, Atom atom)
    Atom actual_type;
    int actual_format;
    unsigned long nitems;
    unsigned long bytes_after;
    unsigned char *prop = NULL;
    struct information *current_info = &info;
    if (atom == None) return;
    if ( (XGetWindowProperty( current_display, root, atom,
    0, 1L, False, XA_CARDINAL,
    &actual_type, &actual_format, &nitems,
    &bytes_after, &prop ) == Success ) &&
    (actual_type == XA_CARDINAL) &&
    (nitems == 1L) && (actual_format == 32) ) {
    current_info->x11.desktop.current = prop[0]+1;
    if(prop) {
    XFree(prop);
    //Get total number of available desktops
    static inline void get_x11_desktop_number(Display *current_display, Window root, Atom atom)
    Atom actual_type;
    int actual_format;
    unsigned long nitems;
    unsigned long bytes_after;
    unsigned char *prop = NULL;
    struct information *current_info = &info;
    if (atom == None) return;
    if ( (XGetWindowProperty( current_display, root, atom,
    0, 1L, False, XA_CARDINAL,
    &actual_type, &actual_format, &nitems,
    &bytes_after, &prop ) == Success ) &&
    (actual_type == XA_CARDINAL) &&
    (nitems == 1L) && (actual_format == 32) ) {
    current_info->x11.desktop.number = prop[0];
    if(prop) {
    XFree(prop);
    //Get all desktop names
    static inline void get_x11_desktop_names(Display *current_display, Window root, Atom atom)
    Atom actual_type;
    int actual_format;
    unsigned long nitems;
    unsigned long bytes_after;
    unsigned char *prop = NULL;
    struct information *current_info = &info;
    if (atom == None) return;
    if ( (XGetWindowProperty( current_display, root, atom,
    0, (~0L), False, ATOM(UTF8_STRING),
    &actual_type, &actual_format, &nitems,
    &bytes_after, &prop ) == Success ) &&
    (actual_type == ATOM(UTF8_STRING)) &&
    (nitems > 0L) && (actual_format == 8) ) {
    if(current_info->x11.desktop.all_names) {
    free(current_info->x11.desktop.all_names);
    current_info->x11.desktop.all_names = NULL;
    current_info->x11.desktop.all_names = malloc(nitems*sizeof(char));
    memcpy(current_info->x11.desktop.all_names, prop, nitems);
    current_info->x11.desktop.nitems = nitems;
    if(prop) {
    XFree(prop);
    //Get current desktop name
    static inline void get_x11_desktop_current_name(char *names)
    struct information *current_info = &info;
    unsigned int i = 0, j = 0;
    int k = 0;
    while ( i < current_info->x11.desktop.nitems ) {
    if ( names[i++] == '\0' ) {
    if ( ++k == current_info->x11.desktop.current ) {
    if (current_info->x11.desktop.name) {
    free(current_info->x11.desktop.name);
    current_info->x11.desktop.name = NULL;
    current_info->x11.desktop.name = malloc((i-j)*sizeof(char));
    //desktop names can be empty but should always be not null
    strcpy( current_info->x11.desktop.name, (char *)&names[j] );
    break;
    j = i;
    void get_x11_desktop_info(Display *current_display, Atom atom)
    Window root;
    static Atom atom_current, atom_number, atom_names;
    struct information *current_info = &info;
    XWindowAttributes window_attributes;
    root = RootWindow(current_display, current_info->x11.monitor.current);
    /* Check if we initialise else retrieve changed property */
    if (atom == 0) {
    atom_current = XInternAtom(current_display, "_NET_CURRENT_DESKTOP", True);
    atom_number = XInternAtom(current_display, "_NET_NUMBER_OF_DESKTOPS", True);
    atom_names = XInternAtom(current_display, "_NET_DESKTOP_NAMES", True);
    get_x11_desktop_current(current_display, root, atom_current);
    get_x11_desktop_number(current_display, root, atom_number);
    get_x11_desktop_names(current_display, root, atom_names);
    get_x11_desktop_current_name(current_info->x11.desktop.all_names);
    /* Set the PropertyChangeMask on the root window, if not set */
    XGetWindowAttributes(display, root, &window_attributes);
    if (!(window_attributes.your_event_mask & PropertyChangeMask)) {
    XSetWindowAttributes attributes;
    attributes.event_mask = window_attributes.your_event_mask | PropertyChangeMask;
    XChangeWindowAttributes(display, root, CWEventMask, &attributes);
    XGetWindowAttributes(display, root, &window_attributes);
    } else {
    if (atom == atom_current) {
    get_x11_desktop_current(current_display, root, atom_current);
    get_x11_desktop_current_name(current_info->x11.desktop.all_names);
    } else if (atom == atom_number) {
    get_x11_desktop_number(current_display, root, atom_number);
    } else if (atom == atom_names) {
    get_x11_desktop_names(current_display, root, atom_names);
    get_x11_desktop_current_name(current_info->x11.desktop.all_names);
    void update_x11info(void)
    struct information *current_info = &info;
    if (x_initialised != YES)
    return;
    current_info->x11.monitor.number = XScreenCount(display);
    current_info->x11.monitor.current = XDefaultScreen(display);
    #ifdef OWN_WINDOW
    /* reserve window manager space */
    void set_struts(int sidenum)
    Atom strut;
    if ((strut = ATOM(_NET_WM_STRUT)) != None) {
    /* reserve space at left, right, top, bottom */
    signed long sizes[12] = {0};
    int i;
    /* define strut depth */
    switch (sidenum) {
    case 0:
    /* left side */
    sizes[0] = window.x + window.width;
    break;
    case 1:
    /* right side */
    sizes[1] = display_width - window.x;
    break;
    case 2:
    /* top side */
    sizes[2] = window.y + window.height;
    break;
    case 3:
    /* bottom side */
    sizes[3] = display_height - window.y;
    break;
    /* define partial strut length */
    if (sidenum <= 1) {
    sizes[4 + (sidenum*2)] = window.y;
    sizes[5 + (sidenum*2)] = window.y + window.height;
    } else if (sidenum <= 3) {
    sizes[4 + (sidenum*2)] = window.x;
    sizes[5 + (sidenum*2)] = window.x + window.width;
    /* check constraints */
    for (i = 0; i < 12; i++) {
    if (sizes[i] < 0) {
    sizes[i] = 0;
    } else {
    if (i <= 1 || i >= 8) {
    if (sizes[i] > display_width) {
    sizes[i] = display_width;
    } else {
    if (sizes[i] > display_height) {
    sizes[i] = display_height;
    XChangeProperty(display, window.window, strut, XA_CARDINAL, 32,
    PropModeReplace, (unsigned char *) &sizes, 4);
    if ((strut = ATOM(_NET_WM_STRUT_PARTIAL)) != None) {
    XChangeProperty(display, window.window, strut, XA_CARDINAL, 32,
    PropModeReplace, (unsigned char *) &sizes, 12);
    #endif /* OWN_WINDOW */
    #ifdef HAVE_XDBE
    void xdbe_swap_buffers(void)
    if (use_xdbe) {
    XdbeSwapInfo swap;
    swap.swap_window = window.window;
    swap.swap_action = XdbeBackground;
    XdbeSwapBuffers(display, &swap, 1);
    #endif /* HAVE_XDBE */
    I guess this is one of the important bits:
    switch (window.type) {
    case TYPE_DESKTOP:
    prop = ATOM(_NET_WM_WINDOW_TYPE_DESKTOP);
    fprintf(stderr, PACKAGE_NAME": window type - desktop\n");
    fflush(stderr);
    break;
    Reading the NET_WM spec (which all major WMs use as the standard more or less) does not tell me anything meaningful (at least not for me ):
    _NET_WM_WINDOW_TYPE_DESKTOP indicates a desktop feature. This can include a single window containing desktop icons with the same dimensions as the screen, allowing the desktop environment to have full control of the desktop, without the need for proxying root window clicks.
    If anyone could tell me what to replace, that would be great .

    Hi lewisspindlove,
    Thanks for your input,
    it doesn't happen when i have my desktop in a "single picture" mode, and,
    it doesn't happen on other accounts, because besides mine(Admin), there is only
    the Guest account and this does not occur on that account.
    I tried your method of removing the wallpapers folder from Libary, then I
    noticed that the computer will select ANY image which I last used when in
    "single picture" mode, not "Change picture every 5mins" mode.
    For example, let's say I have a picture which I saved in the Documents folder,
    and I use that in "single picture" mode; after which I revert back to the folder which contains the pictures I want for "Change picture every 5mins" mode (which is stored somewhere else).
    If i go to the Login window & log back in again, the computer selects the picture
    I last used (the one in the Documents folder) as my background, BUT, after 5mins the picture changes to the ones I'm using for "Change picture every 5mins".
    I hope I'm not confusing everyone!
    This is a complicated & weird but ANNOYING problem!
    Any ideas if an Archive & Install would help? Does that erase all of my stored data on my HDD?

  • [SOLVED] Conky, Gmail, and STDOUT Question

    I currently have Conky working with a script to check my gmail (gmail.pl).  It works as intended in conky, but it saves all the output from the script to STDOUT.  This isn't a problem until I log out of openbox and my screen is filled with these things:
    --2008-10-03 09:28:50-- https://<username>:*password*@mail.google.com/mail/feed/atom
    Resolving mail.google.com... 209.85.147.83, 209.85.147.19, 209.85.147.18
    Connecting to mail.google.com|209.85.147.83|:443... connected.
    HTTP request sent, awaiting response... 401 Unauthorized
    Connecting to mail.google.com|209.85.147.83|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [text/xml]
    Saving to: `STDOUT'
    [ <=> ] 1,005 --.-K/s in 0s
    2008-10-03 09:28:51 (244 MB/s) - `-' saved [1005]
    It's not really a problem as much as an annoyance I guess.
    What I THINK I would like to do is pipe the output to /dev/null?  Or save it to /dev/null?  I am just not sure how to do this.  I went through the script itself and couldn't figure it out.  Any ideas?  Here is the script:
    #!/usr/bin/perl
    use Switch;
    use Text::Wrap;
    my $what=$ARGV[0];
    $user="<username>"; #username for gmail account
    $pass="<password>"; #password for gmail account
    $file="/tmp/gmail.html"; #temporary file to store gmail
    #wrap format for subject
    $Text::Wrap::columns=65; #Number of columns to wrap subject at
    $initial_tab=""; #Tab for first line of subject
    $subsequent_tab="\t"; #tab for wrapped lines
    $quote="\""; #put quotes around subject
    #limit the number of emails to be displayed
    $emails=4; #if -1 display all emails
    &passwd; #give password the proper url character encoding
    switch($what){ #determine what the user wants
    case "n" {&gmail; print "$new\n";} #print number of new emails
    case "s" { #print $from and $subj for new email
    &gmail;
    if ($new>0){
    my $size=@from;
    if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
    for(my $i=0; $i<$size; ++$i){
    print "From: $from[$i]\n"; #print from line
    $text=$quote.$subj[$i].$quote."\n";
    print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
    $size=@from;
    if ($emails!=-1 && $size >$emails){print "$emails out of $size new emails displayed\n";}
    case "e" { #print number of new emails, $from, and $subj
    &gmail;
    if($new==0){print "You have no new emails.\n";}
    else{
    print "You have $new new email(s).\n";
    my $size=@from;
    if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
    for(my $i=0; $i<$size; ++$i){
    print "From: $from[$i]\n"; #print from line
    $text=$quote.$subj[$i].$quote;
    print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
    $size=@from;
    if ($emails!=-1 && $size >$emails){print "$emails out of $size new emails displayed\n";}
    else {
    print "Usage Error: gmail.pl <option>\n";
    print "\tn displays number of new emails\n";
    print "\ts displays from line and subject line for each new email.\n";
    print "\te displays the number of new emails and from line plus \n";
    print "\t\tsubject line for each new email.\n";
    } #didn't give proper option
    sub gmail{
    if(!(-e $file)){ #create file if it does not exists
    `touch $file`;
    #get new emails
    `wget -O - https://$user:$pass\@mail.google.com/mail/feed/atom --no-check-certificate> $file`;
    open(IN, $file); #open $file
    my $i=0; #initialize count
    $new=0; #initialize new emails to 0
    my $flag=0;
    while(<IN>){ #cycle through $file
    if(/<entry>/){$flag=1;}
    elsif(/<fullcount>(\d+)<\/fullcount>/){$new=$1;} #grab number of new emails
    elsif($flag==1){
    if(/<title>.+<\/title>/){push(@subj, &msg);} #grab new email titles
    elsif(/<name>(.+)<\/name>/){push(@from, $1); $flag=0;} #grab new email from lines
    close(IN); #close $file
    sub passwd{ #change to url escape codes in password
    #URL ESCAPE CODES
    $_=$pass;
    s/\%/\%25/g;
    s/\#/\%23/g;
    s/\$/\%24/g;
    s/\&/\%26/g;
    s/\//\%2F/g;
    s/\:/\%3A/g;
    s/\;/\%3B/g;
    s/\</\%3C/g;
    s/\=/\%3D/g;
    s/\>/\%3E/g;
    s/\?/\%3F/g;
    s/\@/\%40/g;
    s/\[/\%5B/g;
    s/\\/\%5C/g;
    s/\]/\%5D/g;
    s/\^/\%5E/g;
    s/\`/\%60/g;
    s/\{/\%7B/g;
    s/\|/\%7C/g;
    s/\}/\%7D/g;
    s/\~/\%7E/g;
    $pass=$_;
    sub msg{
    #THE HTML CODED CHARACTER SET [ISO-8859-1]
    chomp; s/<title>(.+)<\/title>/$1/; #get just the subject
    #now replace any special characters
    s/\&\#33\;/!/g; #Exclamation mark
    s/\&\#34\;/"/g; s/\&quot\;/"/g; #Quotation mark
    s/\&\#35\;/#/g; #Number sign
    s/\&\#36\;/\$/g; #Dollar sign
    s/\&\#37\;/%/g; #Percent sign
    s/\&\#38\;/&/g; s/\&amp\;/&/g; #Ampersand
    s/\&\#39\;/'/g; #Apostrophe
    s/\&\#40\;/(/g; #Left parenthesis
    s/\&\#41\;/)/g; #Right parenthesis
    s/\&\#42\;/*/g; #Asterisk
    s/\&\#43\;/+/g; #Plus sign
    s/\&\#44\;/,/g; #Comma
    s/\&\#45\;/-/g; #Hyphen
    s/\&\#46\;/./g; #Period (fullstop)
    s/\&\#47\;/\//g; #Solidus (slash)
    s/\&\#58\;/:/g; #Colon
    s/\&\#59\;/\;/g; #Semi-colon
    s/\&\#60\;/</g; s/\&lt\;/</g; #Less than
    s/\&\#61\;/=/g; #Equals sign
    s/\&\#62\;/>/g; s/\&gt\;/>/g; #Greater than
    s/\&\#63\;/\?/g; #Question mark
    s/\&\#64\;/\@/g; #Commercial at
    s/\&\#91\;/\[/g; #Left square bracket
    s/\&\#92\;/\\/g; #Reverse solidus (backslash)
    s/\&\#93\;/\]/g; #Right square bracket
    s/\&\#94\;/\^/g; #Caret
    s/\&\#95\;/_/g; #Horizontal bar (underscore)
    s/\&\#96\;/\`/g; #Acute accent
    s/\&\#123\;/\{/g; #Left curly brace
    s/\&\#124\;/|/g; #Vertical bar
    s/\&\#125\;/\}/g; #Right curly brace
    s/\&\#126\;/~/g; #Tilde
    s/\&\#161\;/¡/g; #Inverted exclamation
    s/\&\#162\;/¢/g; #Cent sign
    s/\&\#163\;/£/g; #Pound sterling
    s/\&\#164\;/¤/g; #General currency sign
    s/\&\#165\;/¥/g; #Yen sign
    s/\&\#166\;/¦/g; #Broken vertical bar
    s/\&\#167\;/§/g; #Section sign
    s/\&\#168\;/¨/g; #Umlaut (dieresis)
    s/\&\#169\;/©/g; s/\&copy\;/©/g; #Copyright
    s/\&\#170\;/ª/g; #Feminine ordinal
    s/\&\#171\;/«/g; #Left angle quote, guillemotleft
    s/\&\#172\;/¬/g; #Not sign
    s/\&\#174\;/®/g; #Registered trademark
    s/\&\#175\;/¯/g; #Macron accent
    s/\&\#176\;/°/g; #Degree sign
    s/\&\#177\;/±/g; #Plus or minus
    s/\&\#178\;/²/g; #Superscript two
    s/\&\#179\;/³/g; #Superscript three
    s/\&\#180\;/´/g; #Acute accent
    s/\&\#181\;/µ/g; #Micro sign
    s/\&\#182\;/¶/g; #Paragraph sign
    s/\&\#183\;/·/g; #Middle dot
    s/\&\#184\;/¸/g; #Cedilla
    s/\&\#185\;/¹/g; #Superscript one
    s/\&\#186\;/º/g; #Masculine ordinal
    s/\&\#187\;/»/g; #Right angle quote, guillemotright
    s/\&\#188\;/¼/g; s/\&frac14\;/¼/g; # Fraction one-fourth
    s/\&\#189\;/½/g; s/\&frac12\;/½/g; # Fraction one-half
    s/\&\#190\;/¾/g; s/\&frac34\;/¾/g; # Fraction three-fourths
    s/\&\#191\;/¿/g; #Inverted question mark
    s/\&\#192\;/À/g; #Capital A, grave accent
    s/\&\#193\;/Á/g; #Capital A, acute accent
    s/\&\#194\;/Â/g; #Capital A, circumflex accent
    s/\&\#195\;/Ã/g; #Capital A, tilde
    s/\&\#196\;/Ä/g; #Capital A, dieresis or umlaut mark
    s/\&\#197\;/Å/g; #Capital A, ring
    s/\&\#198\;/Æ/g; #Capital AE dipthong (ligature)
    s/\&\#199\;/Ç/g; #Capital C, cedilla
    s/\&\#200\;/È/g; #Capital E, grave accent
    s/\&\#201\;/É/g; #Capital E, acute accent
    s/\&\#202\;/Ê/g; #Capital E, circumflex accent
    s/\&\#203\;/Ë/g; #Capital E, dieresis or umlaut mark
    s/\&\#204\;/Ì/g; #Capital I, grave accent
    s/\&\#205\;/Í/g; #Capital I, acute accent
    s/\&\#206\;/Î/g; #Capital I, circumflex accent
    s/\&\#207\;/Ï/g; #Capital I, dieresis or umlaut mark
    s/\&\#208\;/Ð/g; #Capital Eth, Icelandic
    s/\&\#209\;/Ñ/g; #Capital N, tilde
    s/\&\#210\;/Ò/g; #Capital O, grave accent
    s/\&\#211\;/Ó/g; #Capital O, acute accent
    s/\&\#212\;/Ô/g; #Capital O, circumflex accent
    s/\&\#213\;/Õ/g; #Capital O, tilde
    s/\&\#214\;/Ö/g; #Capital O, dieresis or umlaut mark
    s/\&\#215\;/×/g; #Multiply sign
    s/\&\#216\;/Ø/g; #Capital O, slash
    s/\&\#217\;/Ù/g; #Capital U, grave accent
    s/\&\#218\;/Ú/g; #Capital U, acute accent
    s/\&\#219\;/Û/g; #Capital U, circumflex accent
    s/\&\#220\;/Ü/g; #Capital U, dieresis or umlaut mark
    s/\&\#221\;/Ý/g; #Capital Y, acute accent
    s/\&\#222\;/Þ/g; #Capital THORN, Icelandic
    s/\&\#223\;/ß/g; #Small sharp s, German (sz ligature)
    s/\&\#224\;/à/g; #Small a, grave accent
    s/\&\#225\;/á/g; #Small a, acute accent
    s/\&\#226\;/â/g; #Small a, circumflex accent
    s/\&\#227\;/ã/g; #Small a, tilde
    s/\&\#228\;/ä/g; #Small a, dieresis or umlaut mark
    s/\&\#229\;/å/g; #Small a, ring
    s/\&\#230\;/æ/g; #Small ae dipthong (ligature)
    s/\&\#231\;/ç/g; #Small c, cedilla
    s/\&\#232\;/è/g; #Small e, grave accent
    s/\&\#233\;/é/g; #Small e, acute accent
    s/\&\#234\;/ê/g; #Small e, circumflex accent
    s/\&\#235\;/ë/g; #Small e, dieresis or umlaut mark
    s/\&\#236\;/ì/g; #Small i, grave accent
    s/\&\#237\;/í/g; #Small i, acute accent
    s/\&\#238\;/î/g; #Small i, circumflex accent
    s/\&\#239\;/ï/g; #Small i, dieresis or umlaut mark
    s/\&\#240\;/ð/g; #Small eth, Icelandic
    s/\&\#241\;/ñ/g; #Small n, tilde
    s/\&\#242\;/ò/g; #Small o, grave accent
    s/\&\#243\;/ó/g; #Small o, acute accent
    s/\&\#244\;/ô/g; #Small o, circumflex accent
    s/\&\#245\;/õ/g; #Small o, tilde
    s/\&\#246\;/ö/g; #Small o, dieresis or umlaut mark
    s/\&\#247\;/÷/g; #Division sign
    s/\&\#248\;/ø/g; #Small o, slash
    s/\&\#249\;/ù/g; #Small u, grave accent
    s/\&\#250\;/ú/g; #Small u, acute accent
    s/\&\#251\;/û/g; #Small u, circumflex accent
    s/\&\#252\;/ü/g; #Small u, dieresis or umlaut mark
    s/\&\#253\;/ý/g; #Small y, acute accent
    s/\&\#254\;/þ/g; #Small thorn, Icelandic
    s/\&\#255\;/ÿ/g; #Small y, dieresis or umlaut mark
    s/^\s+//;
    return $_;
    Last edited by monstermudder78 (2008-10-03 20:34:04)

    The fix was to change conky from:
    ${execi 60 perl ~/scripts/gmail.pl n}
    To:
    ${execi 60 perl ~/scripts/gmail.pl n 2>/dev/null}
    (Added 2>/dev/null, sending the error messages to /dev/null.)
    Last edited by monstermudder78 (2008-10-03 20:37:19)

  • Gmail, conky, and certificates

    I am using a script that shows if I have new messages on gmail. the script is:
    import os
    import string
    #Enter your username and password below within double quotes
    # eg. username="username" and password="password"
    username="xx"
    password="xx"
    com="wget -O - https://"+username+":"+password+"@mail.google.com/mail/feed/atom --no-check-certificate"
    temp=os.popen(com)
    msg=temp.read()
    index=string.find(msg,"<fullcount>")
    index2=string.find(msg,"</fullcount>")
    fc=int(msg[index+11:index2])
    if fc==0:
    print "0 new"
    else:
    print str(fc)+" new"
    When I run conky, I receive these errors:
    --2008-02-07 06:04:38--  https://username:*password*@mail.google.com/mail/feed/atom
    Resolving mail.google.com... 66.249.83.19
    Connecting to mail.google.com|66.249.83.19|:443... connected.
    WARNING: cannot verify mail.google.com's certificate, issued by `/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA':
      Unable to locally verify the issuer's authority.
    HTTP request sent, awaiting response... 401 Unauthorized
    Connecting to mail.google.com|66.249.83.19|:443... connected.
    WARNING: cannot verify mail.google.com's certificate, issued by `/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA':
      Unable to locally verify the issuer's authority.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [text/xml]
    Saving to: `STDOUT'
        [ <=>                                    ] 369         --.-K/s   in 0s     
    2008-02-07 06:04:43 (98.3 MB/s) - `-' saved [369]
    As far I ask I can tell, this wasnt happening before. This error seems to slow down conky.
    Any ideas on how to fix it?
    Thanks

    yabbadabbadont wrote:
    I've submitted a package to the AUR called, 'ca-certificates', that is a port of the Gentoo ebuild by the same name.  It provides the common root certificates.
    In the mean time, wget has an option that you can use to tell it to not try to validate certificates.  It will still print out the annoying warnings though.  The option is "--no-check-certificate".
    EDIT: I guess it helps to read the previous posts more closely...  I see that you are already using that option. 
    EDIT2: I just tested the gmail wget command with my own gmail account.  (I have the ca-certificates package installed of course )  It worked without any of the annoying certificate warnings.
    Nice - thanks yabbadabbadont.

  • Running two (or more) conky's

    Is there a way to get multiple conky's up on my desktop?  what I would like to accomplish is have my current conky (showing system resources and whatnot) in the upper right with the output of /var/messages/messages.log running in the upper left hand corner.  my first guess is that I just need to make a second .conkyrc file, but can conky read 2 files? or do I have to have two instances of conky running?

    O.K. tried that, but now it's flickering back and forth between the two conky's  here are my two .conkyrc files:
    # conky configuration
    # edited by [email protected]
    # set to yes if you want Conky to be forked in the background
    background no
    # X font when Xft is disabled, you can pick one with program xfontsel
    #font 5x7
    #font 6x10
    #font 7x13
    #font 8x13
    #font 9x15
    #font *mintsmild.se*
    #font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
    # Use Xft?
    use_xft yes
    # Xft font when Xft is enabled
    #xftfont Bitstream Vera Sans Mono:size=8
    xftfont Terminus:size=8
    # Text alpha when using Xft
    xftalpha 0.8
    # Print everything to console?
    # out_to_console no
    # mail spool
    #mail_spool $MAIL
    # Update interval in seconds
    update_interval 2.0
    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0
    # Create own window instead of using desktop (required in nautilus)
    own_window no
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    # Minimum size of text area
    minimum_size 1000 5
    # Draw shades?
    draw_shades yes
    # Draw outlines?
    draw_outline no
    # Draw borders around text
    draw_borders no
    # Stippled borders?
    stippled_borders 8
    # border margins
    border_margin 4
    # border width
    border_width 1
    # Default colors and also border colors
    default_color white
    default_shade_color black
    default_outline_color white
    # Text alignment, other possible values are commented
    alignment top_left
    #alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 875
    gap_y 4
    # Subtract file system buffers from used memory?
    no_buffers yes
    # set to yes if you want all text to be in uppercase
    uppercase no
    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2
    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2
    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale no
    # Add spaces to keep things from moving about? This only affects certain objects.
    use_spacer yes
    #Note: doesn't work in conky 1.2 =(
    # mldonkey_hostname Hostname for mldonkey stuff, defaults to localhost
    # mldonkey_port Mldonkey port, 4001 default
    # mldonkey_login Mldonkey login, default none
    # mldonkey_password Mldonkey password, default none
    # Possible variables to be used:
    # Variable Arguments Description
    # addr (interface) IP address for an interface
    # acpiacadapter ACPI ac adapter state.
    # acpifan ACPI fan state
    # acpitemp ACPI temperature.
    # adt746xcpu CPU temperature from therm_adt746x
    # adt746xfan Fan speed from therm_adt746x
    # alignr (num) Right-justify text, with space of N
    # alignc Align text to centre
    # battery (num) Remaining capasity in ACPI or APM
    # battery. ACPI battery number can be
    # given as argument (default is BAT0).
    # buffers Amount of memory buffered
    # cached Amount of memory cached
    # color (color) Change drawing color to color
    # cpu CPU usage in percents
    # cpubar (height) Bar that shows CPU usage, height is
    # bar's height in pixels
    # cpugraph (height),(width) (gradient colour 1) (gradient colour 2)
    # CPU usage graph, with optional colours in hex,
    # minus the #.
    # downspeed net Download speed in kilobytes
    # downspeedf net Download speed in kilobytes with one
    # decimal
    # downspeedgraph net (height),(width) (gradient colour 1) (gradient colour 2)
    # Download speed graph, colours defined in
    # hex, minus the #.
    # exec shell command Executes a shell command and displays
    # the output in conky. warning: this
    # takes a lot more resources than other
    # variables. I'd recommend coding wanted
    # behaviour in C and posting a patch :-).
    # execbar shell command Same as exec, except if the first value
    # return is a value between 0-100, it
    # will use that number for a bar.
    # The size for the bar is currently fixed,
    # but that may change in the future.
    # execgraph shell command Same as execbar, but graphs values
    # execi interval, shell command
    # Same as exec but with specific interval.
    # Interval can't be less than
    # update_interval in configuration.
    # font font Specify a different font. Only applies
    # to one line.
    # fs_bar (height), (fs)Bar that shows how much space is used on
    # a file system. height is the height in
    # pixels. fs is any file on that file
    # system.
    # fs_free (fs) Free space on a file system available
    # for users.
    # fs_free_perc (fs) Free percentage of space on a file
    # system available for users.
    # fs_size (fs) File system size
    # fs_used (fs) File system used space
    # hr (height) Horizontal line, height is the height in
    # pixels
    # i2c (dev), type, n I2C sensor from sysfs (Linux 2.6). dev
    # may be omitted if you have only one I2C
    # device. type is either in (or vol)
    # meaning voltage, fan meaning fan or
    # temp/tempf (first in C, second in F)
    # meaning temperature. n is number of the
    # sensor. See /sys/bus/i2c/devices/ on
    # your local computer.
    # if_running (process) if PROCESS is running, display
    # everything if_running and the matching $endif
    # if_existing (file) if FILE exists, display everything between
    # if_existing and the matching $endif
    # if_mounted (mountpoint) if MOUNTPOINT is mounted, display everything between
    # if_mounted and the matching $endif
    # else Text to show if any of the above are not true
    # kernel Kernel version
    # linkstatus (interface) Get the link status for wireless connections
    # loadavg (1), (2), (3) System load average, 1 is for past 1
    # minute, 2 for past 5 minutes and 3 for
    # past 15 minutes.
    # machine Machine, i686 for example
    # mails Mail count in mail spool. You can use
    # program like fetchmail to get mails from
    # some server using your favourite
    # protocol. See also new_mails.
    # mem Amount of memory in use
    # membar (height) Bar that shows amount of memory in use
    # memmax Total amount of memory
    # memperc Percentage of memory in use
    # metar_ob_time
    # metar_temp
    # metar_tempf Temp in F
    # metar_windchill
    # metar_dew_point There are a bunch of these
    # metar_rh and they are self-explanatory
    # metar_windspeed
    # metar_winddir
    # metar_swinddir
    # metar_cloud
    # metar_u2d_time
    # ml_upload_counter total session upload in mb
    # ml_download_counter total session download in mb
    # ml_nshared_files number of shared files
    # ml_shared_counter total session shared in mb, buggy
    # in some mldonkey versions
    # ml_tcp_upload_rate tcp upload rate in kb/s
    # ml_tcp_download_rate tcp download rate in kb/s
    # ml_udp_upload_rate udp upload rate in kb/s
    # ml_udp_download_rate udp download rate in kb/s
    # ml_ndownloaded_files number of completed files
    # ml_ndownloading_files number of downloading files
    # mpd_artist Artist in current MPD song
    # (must be enabled at compile)
    # mpd_album Album in current MPD song
    # mpd_bar (height) Bar of mpd's progress
    # mpd_bitrate Bitrate of current song
    # mpd_status Playing, stopped, et cetera.
    # mpd_title Title of current MPD song
    # mpd_vol MPD's volume
    # mpd_elapsed Song's elapsed time
    # mpd_length Song's length
    # mpd_percent Percent of song's progress
    # new_mails Unread mail count in mail spool.
    # nodename Hostname
    # outlinecolor (color) Change outline color
    # pre_exec shell command Executes a shell command one time before
    # conky displays anything and puts output
    # as text.
    # processes Total processes (sleeping and running)
    # running_processes Running processes (not sleeping),
    # requires Linux 2.6
    # shadecolor (color) Change shading color
    # stippled_hr (space), Stippled (dashed) horizontal line
    # (height)
    # swapbar (height) Bar that shows amount of swap in use
    # swap Amount of swap in use
    # swapmax Total amount of swap
    # swapperc Percentage of swap in use
    # sysname System name, Linux for example
    # offset pixels Move text over by N pixels
    # tail logfile, lines (interval)
    # Displays last N lines of supplied text
    # text file. If interval is not supplied,
    # Conky assumes 2x Conky's interval.
    # Max of 30 lines.
    # Max of 30 lines can be displayed.
    # time (format) Local time, see man strftime to get more
    # information about format
    # totaldown net Total download, overflows at 4 GB on
    # Linux with 32-bit arch and there doesn't
    # seem to be a way to know how many times
    # it has already done that before conky
    # has started.
    # top type, num This takes arguments in the form:
    # top <name> <number>
    # Basically, processes are ranked from
    # highest to lowest in terms of cpu
    # usage, which is what <num> represents.
    # The types are: "name", "pid", "cpu", and
    # "mem".
    # There can be a max of 10 processes listed.
    # top_mem type, num Same as top, except sorted by mem usage
    # instead of cpu
    # totalup net Total upload, this one too, may overflow
    # updates Number of updates (for debugging)
    # upspeed net Upload speed in kilobytes
    # upspeedf net Upload speed in kilobytes with one
    # decimal
    # upspeedgraph net (height),(width) (gradient colour 1) (gradient colour 2)
    # Upload speed graph, colours defined in
    # hex, minus the #.
    # uptime Uptime
    # uptime_short Uptime in a shorter format
    # seti_prog Seti@home current progress
    # seti_progbar (height) Seti@home current progress bar
    # seti_credit Seti@hoome total user credit
    # variable is given either in format $variable or in ${variable}. Latter
    # allows characters right after the variable and must be used in network
    # stuff because of an argument
    # stuff after 'TEXT' will be formatted on screen
    TEXT
    ${offset 240}${color slate grey}${time %a, } ${color }${time %e %B %G}
    ${offset 240}${color slate grey}${time %Z, }${color }${time %H:%M:%S}
    ${offset 240}${color slate grey}UpTime: ${color }$uptime
    ${offset 240}${color slate grey}Kern:${color }$kernel
    ${offset 240}${color slate grey}CPU:${color } $cpu% ${acpitemp}C
    ${offset 240}${cpugraph 20,130 000000 ffffff}
    ${offset 240}${color slate grey}Load: ${color }$loadavg
    ${offset 240}${color slate grey}Processes: ${color }$processes
    ${offset 240}${color slate grey}Running: ${color }$running_processes
    ${offset 240}${color slate grey}Highest CPU:
    ${offset 240}${color #ddaa00} ${top name 1}${top_mem cpu 1}
    ${offset 240}${color lightgrey} ${top name 2}${top cpu 2}
    ${offset 240}${color lightgrey} ${top name 3}${top cpu 3}
    ${offset 240}${color lightgrey} ${top name 4}${top cpu 4}
    ${offset 240}${color slate grey}Highest MEM:
    ${offset 240}${color #ddaa00} ${top_mem name 1}${top_mem mem 1}
    ${offset 240}${color lightgrey} ${top_mem name 2}${top_mem mem 2}
    ${offset 240}${color lightgrey} ${top_mem name 3}${top_mem mem 3}
    ${offset 240}${color lightgrey} ${top_mem name 4}${top_mem mem 4}
    ${offset 240}${color slate grey}MEM: ${color } $memperc% $mem/$memmax
    ${offset 240}${membar 3,100}
    ${offset 240}${color slate grey}SWAP: ${color }$swapperc% $swap/$swapmax
    ${offset 240}${swapbar 3,100}
    ${offset 240}${color slate grey}ROOT: ${color }${fs_free /}/${fs_size /}
    ${offset 240}${fs_bar 3,100 /}
    ${offset 240}${color slate grey}HOME: ${color }${fs_free /home}/${fs_size /home}
    ${offset 240}${fs_bar 3,100 /home}
    ${offset 240}${color slate grey}NET:
    ${offset 240}${color}Up: ${color }${upspeed wlan0} k/s
    ${offset 240}${upspeedgraph wlan0 20,130 000000 ffffff}
    ${offset 240}${color}Down: ${color }${downspeed wlan0}k/s${color}
    ${offset 240}${downspeedgraph eth0 20,130 000000 ffffff}
    # conky configuration
    # edited by [email protected]
    # set to yes if you want Conky to be forked in the background
    background no
    # X font when Xft is disabled, you can pick one with program xfontsel
    #font 5x7
    #font 6x10
    #font 7x13
    #font 8x13
    #font 9x15
    #font *mintsmild.se*
    #font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
    # Use Xft?
    use_xft yes
    # Xft font when Xft is enabled
    #xftfont Bitstream Vera Sans Mono:size=8
    xftfont Terminus:size=8
    # Text alpha when using Xft
    xftalpha 0.8
    # Print everything to console?
    # out_to_console no
    # mail spool
    #mail_spool $MAIL
    # Update interval in seconds
    update_interval 2.0
    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0
    # Create own window instead of using desktop (required in nautilus)
    own_window no
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    # Minimum size of text area
    minimum_size 1000 5
    # Draw shades?
    draw_shades yes
    # Draw outlines?
    draw_outline no
    # Draw borders around text
    draw_borders no
    # Stippled borders?
    stippled_borders 8
    # border margins
    border_margin 4
    # border width
    border_width 1
    # Default colors and also border colors
    default_color white
    default_shade_color black
    default_outline_color white
    # Text alignment, other possible values are commented
    alignment top_left
    #alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 5
    gap_y 500
    # Subtract file system buffers from used memory?
    no_buffers yes
    # set to yes if you want all text to be in uppercase
    uppercase no
    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2
    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2
    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale no
    # Add spaces to keep things from moving about? This only affects certain objects.
    use_spacer yes
    #Note: doesn't work in conky 1.2 =(
    # mldonkey_hostname Hostname for mldonkey stuff, defaults to localhost
    # mldonkey_port Mldonkey port, 4001 default
    # mldonkey_login Mldonkey login, default none
    # mldonkey_password Mldonkey password, default none
    # Possible variables to be used:
    # Variable Arguments Description
    # addr (interface) IP address for an interface
    # acpiacadapter ACPI ac adapter state.
    # acpifan ACPI fan state
    # acpitemp ACPI temperature.
    # adt746xcpu CPU temperature from therm_adt746x
    # adt746xfan Fan speed from therm_adt746x
    # alignr (num) Right-justify text, with space of N
    # alignc Align text to centre
    # battery (num) Remaining capasity in ACPI or APM
    # battery. ACPI battery number can be
    # given as argument (default is BAT0).
    # buffers Amount of memory buffered
    # cached Amount of memory cached
    # color (color) Change drawing color to color
    # cpu CPU usage in percents
    # cpubar (height) Bar that shows CPU usage, height is
    # bar's height in pixels
    # cpugraph (height),(width) (gradient colour 1) (gradient colour 2)
    # CPU usage graph, with optional colours in hex,
    # minus the #.
    # downspeed net Download speed in kilobytes
    # downspeedf net Download speed in kilobytes with one
    # decimal
    # downspeedgraph net (height),(width) (gradient colour 1) (gradient colour 2)
    # Download speed graph, colours defined in
    # hex, minus the #.
    # exec shell command Executes a shell command and displays
    # the output in conky. warning: this
    # takes a lot more resources than other
    # variables. I'd recommend coding wanted
    # behaviour in C and posting a patch :-).
    # execbar shell command Same as exec, except if the first value
    # return is a value between 0-100, it
    # will use that number for a bar.
    # The size for the bar is currently fixed,
    # but that may change in the future.
    # execgraph shell command Same as execbar, but graphs values
    # execi interval, shell command
    # Same as exec but with specific interval.
    # Interval can't be less than
    # update_interval in configuration.
    # font font Specify a different font. Only applies
    # to one line.
    # fs_bar (height), (fs)Bar that shows how much space is used on
    # a file system. height is the height in
    # pixels. fs is any file on that file
    # system.
    # fs_free (fs) Free space on a file system available
    # for users.
    # fs_free_perc (fs) Free percentage of space on a file
    # system available for users.
    # fs_size (fs) File system size
    # fs_used (fs) File system used space
    # hr (height) Horizontal line, height is the height in
    # pixels
    # i2c (dev), type, n I2C sensor from sysfs (Linux 2.6). dev
    # may be omitted if you have only one I2C
    # device. type is either in (or vol)
    # meaning voltage, fan meaning fan or
    # temp/tempf (first in C, second in F)
    # meaning temperature. n is number of the
    # sensor. See /sys/bus/i2c/devices/ on
    # your local computer.
    # if_running (process) if PROCESS is running, display
    # everything if_running and the matching $endif
    # if_existing (file) if FILE exists, display everything between
    # if_existing and the matching $endif
    # if_mounted (mountpoint) if MOUNTPOINT is mounted, display everything between
    # if_mounted and the matching $endif
    # else Text to show if any of the above are not true
    # kernel Kernel version
    # linkstatus (interface) Get the link status for wireless connections
    # loadavg (1), (2), (3) System load average, 1 is for past 1
    # minute, 2 for past 5 minutes and 3 for
    # past 15 minutes.
    # machine Machine, i686 for example
    # mails Mail count in mail spool. You can use
    # program like fetchmail to get mails from
    # some server using your favourite
    # protocol. See also new_mails.
    # mem Amount of memory in use
    # membar (height) Bar that shows amount of memory in use
    # memmax Total amount of memory
    # memperc Percentage of memory in use
    # metar_ob_time
    # metar_temp
    # metar_tempf Temp in F
    # metar_windchill
    # metar_dew_point There are a bunch of these
    # metar_rh and they are self-explanatory
    # metar_windspeed
    # metar_winddir
    # metar_swinddir
    # metar_cloud
    # metar_u2d_time
    # ml_upload_counter total session upload in mb
    # ml_download_counter total session download in mb
    # ml_nshared_files number of shared files
    # ml_shared_counter total session shared in mb, buggy
    # in some mldonkey versions
    # ml_tcp_upload_rate tcp upload rate in kb/s
    # ml_tcp_download_rate tcp download rate in kb/s
    # ml_udp_upload_rate udp upload rate in kb/s
    # ml_udp_download_rate udp download rate in kb/s
    # ml_ndownloaded_files number of completed files
    # ml_ndownloading_files number of downloading files
    # mpd_artist Artist in current MPD song
    # (must be enabled at compile)
    # mpd_album Album in current MPD song
    # mpd_bar (height) Bar of mpd's progress
    # mpd_bitrate Bitrate of current song
    # mpd_status Playing, stopped, et cetera.
    # mpd_title Title of current MPD song
    # mpd_vol MPD's volume
    # mpd_elapsed Song's elapsed time
    # mpd_length Song's length
    # mpd_percent Percent of song's progress
    # new_mails Unread mail count in mail spool.
    # nodename Hostname
    # outlinecolor (color) Change outline color
    # pre_exec shell command Executes a shell command one time before
    # conky displays anything and puts output
    # as text.
    # processes Total processes (sleeping and running)
    # running_processes Running processes (not sleeping),
    # requires Linux 2.6
    # shadecolor (color) Change shading color
    # stippled_hr (space), Stippled (dashed) horizontal line
    # (height)
    # swapbar (height) Bar that shows amount of swap in use
    # swap Amount of swap in use
    # swapmax Total amount of swap
    # swapperc Percentage of swap in use
    # sysname System name, Linux for example
    # offset pixels Move text over by N pixels
    # tail logfile, lines (interval)
    # Displays last N lines of supplied text
    # text file. If interval is not supplied,
    # Conky assumes 2x Conky's interval.
    # Max of 30 lines.
    # Max of 30 lines can be displayed.
    # time (format) Local time, see man strftime to get more
    # information about format
    # totaldown net Total download, overflows at 4 GB on
    # Linux with 32-bit arch and there doesn't
    # seem to be a way to know how many times
    # it has already done that before conky
    # has started.
    # top type, num This takes arguments in the form:
    # top <name> <number>
    # Basically, processes are ranked from
    # highest to lowest in terms of cpu
    # usage, which is what <num> represents.
    # The types are: "name", "pid", "cpu", and
    # "mem".
    # There can be a max of 10 processes listed.
    # top_mem type, num Same as top, except sorted by mem usage
    # instead of cpu
    # totalup net Total upload, this one too, may overflow
    # updates Number of updates (for debugging)
    # upspeed net Upload speed in kilobytes
    # upspeedf net Upload speed in kilobytes with one
    # decimal
    # upspeedgraph net (height),(width) (gradient colour 1) (gradient colour 2)
    # Upload speed graph, colours defined in
    # hex, minus the #.
    # uptime Uptime
    # uptime_short Uptime in a shorter format
    # seti_prog Seti@home current progress
    # seti_progbar (height) Seti@home current progress bar
    # seti_credit Seti@hoome total user credit
    # variable is given either in format $variable or in ${variable}. Latter
    # allows characters right after the variable and must be used in network
    # stuff because of an argument
    # stuff after 'TEXT' will be formatted on screen
    TEXT
    ${color slate grey}/var/log/messages:
    ${color}${exec tail -n20 /var/log/messages.log}
    how can this be fixed?

  • [SOLVED] Trouble Making Conky Bottom Panel

    I'm trying to create a bottom panel with conky that will replace LXDE's panel.  Right now I have everything set up adequately except for having the conky panel appear on the bottom.  The conky manpage mentions the panel setup under own_window_type, and says that it follows the lead of the alignment variable, so I figured setting the alignment before setting own_window_type may fix the issue, but I haven't had any such luck.
    .conkyrc
    #WINDOW OPTIONS
    double_buffer yes
    own_window yes
    own_window_transparent no
    alignment bottom_left
    own_window_type panel
    own_window_hints undecorate,sticky,skip_taskbar,skip_pager
    #POSITION
    #gap_x 0
    #gap_y 0
    #BORDERS
    draw_borders no
    #SHADES
    draw_shades no
    #BEHAVIOR
    update_interval 1
    #COLOR
    own_window_colour 000000
    default_color 1793D1
    color1 FFFFFF
    #FONT
    use_xft yes
    uppercase yes
    use_spacer left
    pad_percents 3
    xftfont Anonymous Pro:pixelsize=11
    # Expands to the length of screen ()
    minimum_size 1600
    maximum_width 1600
    TEXT
    ${color}CPU:${color1} ${cpu}% ${cpubar 6,40} // ${color}MEM:${color1} $mem/$memmax ${membar 6,40}\
    ${alignr}${color}${time %B %d}${color1} |${time %_I:%M %p}
    I apologize if this is the wrong place to be posting in about conky assistance, but this section of the forum has helped me a ton in getting familiar with Arch, so its my safe guess for now.  Any direction on asking elsewhere would be equally appreciated.
    Last edited by mellowmaroon (2012-06-15 15:15:46)

    own_window_type must be panel, otherwise it doesn't behave like a panel.  And adding "above" to the hints instead of "below" doesn't fix it.
    Maybe the other options have some effect.  When i tried setting "own_window" to "no", conky would disregard my transparency option and just make it transparent.

  • [SOLVED] Error building conky 1.8.0 from ABS

    Hello,
    Since conky 1.8.1 has a bug with fonts, I'm trying to build conky 1.8.0. I got the PKGBUILD from the ABS and modified it to install 1.8.0. I also had to include a fix for curl, found here:
    http://aur.archlinux.org/packages.php?ID=31589.
    However, during make I get the following error:
    make[2]: Er hoeft niets gedaan te worden voor 'install-exec-am'.
    make[2]: Er hoeft niets gedaan te worden voor 'install-data-am'.
    make[2]: Map '/home/jente/packages/Arch/conky 1.8.0/src/conky-1.8.0' wordt verlaten
    make[1]: Map '/home/jente/packages/Arch/conky 1.8.0/src/conky-1.8.0' wordt verlaten
    make: *** [install-recursive] Fout 1
    ==> ERROR: A failure occurred in package().
    Aborting...
    It says that "nothing has to be done for..."
    Here's my PKGBUILD:
    pkgname=conky
    pkgver=1.8.0
    pkgrel=3
    pkgdesc='An advanced, highly configurable system monitor for X based on torsmo'
    arch=('i686' 'x86_64')
    url='http://conky.sourceforge.net/'
    license=('custom')
    replaces=('torsmo')
    makedepends=('pkg-config')
    depends=('alsa-lib' 'libxml2' 'curl' 'wireless_tools' 'libxft' 'glib2' 'libxdamage' 'imlib2')
    backup=('etc/conky/conky.conf' 'etc/conky/conky_no_x11.conf')
    source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"
    'current-power.patch')
    md5sums=('3fcc5bc005c6c046587134cdb9fdadfa'
    'eec51b5ccd242ed95b3b0a0fdd3252f8')
    build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    patch -p1 < ../current-power.patch # See FS#21984
    sed -i '
    /#include <curl\/types.h>/ c\
    //#include <curl/types.h>' src/eve.c
    sed -i '
    /#include <curl\/types.h>/ c\
    //#include <curl/types.h>' src/ccurl_thread.c
    ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --enable-ibm \
    --enable-curl \
    --enable-rss \
    --enable-weather-xoap \
    --enable-imlib2 \
    --disable-lua \
    --enable-wlan \
    make
    package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install
    install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    Last edited by Unia (2011-08-18 10:33:56)

    I will try to built again and post the full output!
    EDIT: Here you go:
    ┌─[jente@lappy conky 1.8.0][17:07:13]
    └─■ LC_ALL=C makepkg -si
    ==> Making package: conky 1.8.0-3 (Wed Aug 17 17:07:24 CEST 2011)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Found conky-1.8.0.tar.gz
    -> Found current-power.patch
    ==> Validating source files with md5sums...
    conky-1.8.0.tar.gz ... Passed
    current-power.patch ... Passed
    ==> Extracting Sources...
    -> Extracting conky-1.8.0.tar.gz with bsdtar
    ==> Removing existing pkg/ directory...
    ==> Starting build()...
    patching file src/linux.c
    Hunk #1 succeeded at 1654 (offset -17 lines).
    checking for a BSD-compatible install... /bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    configure: WARNING: Libtool does not cope well with whitespace in `pwd`
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking for /usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for ar... ar
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking whether gcc and cc understand -c and -o together... yes
    checking for pkg-config... yes
    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.19... yes
    checking for fopencookie... yes
    checking for funopen... no
    checking for X11... yes
    checking for Imlib2... yes
    checking iwlib.h usability... yes
    checking iwlib.h presence... yes
    checking for iwlib.h... yes
    checking for iw_sockets_open in -liw... yes
    checking for getnameinfo... yes
    checking netdb.h usability... yes
    checking netdb.h presence... yes
    checking for netdb.h... yes
    checking netinet/in.h usability... yes
    checking netinet/in.h presence... yes
    checking for netinet/in.h... yes
    checking netinet/tcp.h usability... yes
    checking netinet/tcp.h presence... yes
    checking for netinet/tcp.h... yes
    checking sys/socket.h usability... yes
    checking sys/socket.h presence... yes
    checking for sys/socket.h... yes
    checking arpa/inet.h usability... yes
    checking arpa/inet.h presence... yes
    checking for arpa/inet.h... yes
    checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
    checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
    checking for shared library run path origin... done
    checking for iconv... yes
    checking for working iconv... yes
    checking for iconv declaration... install-shextern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
    checking for Xext... yes
    checking for XDamage... yes
    checking for Xft... yes
    checking for GLib2... yes
    checking for libcurl... yes
    checking for libxml2... yes
    checking alsa/asoundlib.h usability... yes
    checking alsa/asoundlib.h presence... yes
    checking for alsa/asoundlib.h... yes
    checking for snd_pcm_open in -lasound... yes
    checking signal.h usability... yes
    checking signal.h presence... yes
    checking for signal.h... yes
    checking for unistd.h... (cached) yes
    checking sys/utsname.h usability... yes
    checking sys/utsname.h presence... yes
    checking for sys/utsname.h... yes
    checking for sys/stat.h... (cached) yes
    checking linux/soundcard.h usability... yes
    checking linux/soundcard.h presence... yes
    checking for linux/soundcard.h... yes
    checking for alsa/asoundlib.h... (cached) yes
    checking dirent.h usability... yes
    checking dirent.h presence... yes
    checking for dirent.h... yes
    checking mcheck.h usability... yes
    checking mcheck.h presence... yes
    checking for mcheck.h... yes
    checking sys/statfs.h usability... yes
    checking sys/statfs.h presence... yes
    checking for sys/statfs.h... yes
    checking sys/param.h usability... yes
    checking sys/param.h presence... yes
    checking for sys/param.h... yes
    checking pthread.h usability... yes
    checking pthread.h presence... yes
    checking for pthread.h... yes
    checking semaphore.h usability... yes
    checking semaphore.h presence... yes
    checking for semaphore.h... yes
    checking assert.h usability... yes
    checking assert.h presence... yes
    checking for assert.h... yes
    checking errno.h usability... yes
    checking errno.h presence... yes
    checking for errno.h... yes
    checking time.h usability... yes
    checking time.h presence... yes
    checking for time.h... yes
    checking for sys/mount.h... yes
    checking sys/inotify.h usability... yes
    checking sys/inotify.h presence... yes
    checking for sys/inotify.h... yes
    checking for calloc... yes
    checking for malloc... yes
    checking for free... yes
    checking for popen... yes
    checking for sysinfo... yes
    checking for getloadavg... yes
    checking for memrchr... yes
    checking for strndup... yes
    checking for gethostbyname_r... yes
    checking for library containing clock_gettime... -lrt
    checking for struct statfs.f_fstypename... no
    checking zlib.h usability... yes
    checking zlib.h presence... yes
    checking for zlib.h... yes
    checking for db2x_xsltproc... no
    checking for db2x_manxml... no
    checking for xsltproc... xsltproc
    checking if /usr/bin/ld -m elf_x86_64 accepts -O1... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating data/Makefile
    config.status: creating doc/Makefile
    config.status: creating src/Makefile
    config.status: creating src/build.h
    config.status: creating lua/Makefile
    config.status: creating src/config.h
    config.status: src/config.h is unchanged
    config.status: executing depfiles commands
    config.status: executing libtool commands
    conky 1.8.0 configured successfully:
    Installing into: /usr
    System config dir: /etc
    C compiler flags: -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -W
    Libraries: -liw -lncurses -lm -lX11 -lImlib2 -lXext -lXdamage -lXfixes -lXft -lglib-2.0 -lcurl -lxml2 -lasound -lrt
    Linker flags: -Wl,-O1
    * X11:
    X11 support: yes
    XDamage support: yes
    XDBE support: yes
    Xft support: yes
    ARGB support yes
    * Music detection:
    Audacious: no
    BMPx: no
    MPD: yes
    MOC: yes
    XMMS2: no
    * General:
    math: yes
    hddtemp: yes
    portmon: yes
    RSS: yes
    Curl: yes
    Weather
    METAR: yes
    XOAP: yes
    wireless: yes
    IBM: yes
    nvidia: no
    eve-online: no
    config-output: yes
    Imlib2: yes
    ALSA mixer: yes
    apcupsd: yes
    I/O stats: yes
    * Lua (no) bindings:
    Cairo: no
    Imlib2: no
    Making all in src
    make[1]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/src'
    make all-am
    make[2]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/src'
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -MT conky-linux.o -MD -MP -MF .deps/conky-linux.Tpo -c -o conky-linux.o `test -f 'linux.c' || echo './'`linux.c
    linux.c: In function 'update_net_stats':
    linux.c:345:12: warning: variable 'has_bitrate' set but not used [-Wunused-but-set-variable]
    linux.c: In function 'is_disk':
    linux.c:2287:18: warning: 'dev_last' may be used uninitialized in this function [-Wuninitialized]
    mv -f .deps/conky-linux.Tpo .deps/conky-linux.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -MT conky-ccurl_thread.o -MD -MP -MF .deps/conky-ccurl_thread.Tpo -c -o conky-ccurl_thread.o `test -f 'ccurl_thread.c' || echo './'`ccurl_thread.c
    mv -f .deps/conky-ccurl_thread.Tpo .deps/conky-ccurl_thread.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -MT conky-conky.o -MD -MP -MF .deps/conky-conky.Tpo -c -o conky-conky.o `test -f 'conky.c' || echo './'`conky.c
    conky.c: In function 'generate_text_internal':
    conky.c:761:19: warning: variable 'needed' set but not used [-Wunused-but-set-variable]
    conky.c: In function 'draw_each_line_inner':
    conky.c:3099:13: warning: 'font_h' may be used uninitialized in this function [-Wuninitialized]
    mv -f .deps/conky-conky.Tpo .deps/conky-conky.Po
    gcc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE=\"/etc/conky/conky.conf\" -DPACKAGE_LIBDIR=\"/usr/lib/conky\" -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -MT conky-core.o -MD -MP -MF .deps/conky-core.Tpo -c -o conky-core.o `test -f 'core.c' || echo './'`core.c
    mv -f .deps/conky-core.Tpo .deps/conky-core.Po
    /bin/sh ../libtool --tag=CC --mode=link gcc -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -lpthread -lm -Wl,--hash-style=gnu -Wl,--as-needed -o conky conky-conf_cookie.o conky-ibm.o conky-smapi.o conky-mpd.o conky-libmpdclient.o conky-moc.o conky-linux.o conky-top.o conky-users.o conky-sony.o conky-i8k.o conky-libtcp-portmon.o conky-tcp-portmon.o conky-x11.o conky-fonts.o conky-hddtemp.o conky-ccurl_thread.o conky-rss.o conky-prss.o conky-weather.o conky-imlib2.o conky-apcupsd.o conky-iconv_tools.o conky-colours.o conky-combine.o conky-common.o conky-conky.o conky-core.o conky-diskio.o conky-entropy.o conky-exec.o conky-fs.o conky-mail.o conky-mixer.o conky-net_stat.o conky-template.o conky-timed_thread.o conky-mboxscan.o conky-read_tcp.o conky-scroll.o conky-specials.o conky-tailhead.o conky-temphelper.o conky-text_object.o conky-timeinfo.o conky-algebra.o conky-proc.o conky-user.o -liw -lncurses -lm -lX11 -lImlib2 -lXext -lXdamage -lXfixes -lXft -lglib-2.0 -lcurl -lxml2 -lasound -lrt
    libtool: link: gcc -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -W -march=x86-64 -mtune=generic -O2 -pipe -Wl,--hash-style=gnu -Wl,--as-needed -o conky conky-conf_cookie.o conky-ibm.o conky-smapi.o conky-mpd.o conky-libmpdclient.o conky-moc.o conky-linux.o conky-top.o conky-users.o conky-sony.o conky-i8k.o conky-libtcp-portmon.o conky-tcp-portmon.o conky-x11.o conky-fonts.o conky-hddtemp.o conky-ccurl_thread.o conky-rss.o conky-prss.o conky-weather.o conky-imlib2.o conky-apcupsd.o conky-iconv_tools.o conky-colours.o conky-combine.o conky-common.o conky-conky.o conky-core.o conky-diskio.o conky-entropy.o conky-exec.o conky-fs.o conky-mail.o conky-mixer.o conky-net_stat.o conky-template.o conky-timed_thread.o conky-mboxscan.o conky-read_tcp.o conky-scroll.o conky-specials.o conky-tailhead.o conky-temphelper.o conky-text_object.o conky-timeinfo.o conky-algebra.o conky-proc.o conky-user.o -lpthread -liw -lncurses -lm -lX11 -lImlib2 -lXext -lXdamage -lXfixes -lXft -lglib-2.0 -lcurl -lxml2 -lasound -lrt
    make[2]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/src'
    make[1]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/src'
    Making all in doc
    make[1]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/doc'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/doc'
    Making all in lua
    make[1]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/lua'
    make all-am
    make[2]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/lua'
    make[2]: Nothing to be done for `all-am'.
    make[2]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/lua'
    make[1]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/lua'
    Making all in data
    make[1]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/data'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/data'
    make[1]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0'
    make[1]: Nothing to be done for `all-am'.
    make[1]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0'
    ==> Entering fakeroot environment...
    ==> Starting package()...
    Making install in src
    make[1]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/src'
    make install-am
    make[2]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/src'
    make[3]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/src'
    test -z "/usr/bin" || /bin/mkdir -p "/home/jente/packages/arch/conky 1.8.0/pkg/usr/bin"
    /bin/sh ../libtool --mode=install /bin/install -c conky '/home/jente/packages/arch/conky 1.8.0/pkg/usr/bin'
    libtool: install: /bin/install -c conky /home/jente/packages/arch/conky 1.8.0/pkg/usr/bin/conky
    /bin/install: target `1.8.0/pkg/usr/bin/conky' is not a directory
    make[3]: *** [install-binPROGRAMS] Error 1
    make[3]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/src'
    make[2]: *** [install-am] Error 2
    make[2]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/src'
    make[1]: *** [install] Error 2
    make[1]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/src'
    Making install in doc
    make[1]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/doc'
    make[2]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/doc'
    make[2]: Nothing to be done for `install-exec-am'.
    test -z "/usr/share/man/man1" || /bin/mkdir -p "/home/jente/packages/arch/conky 1.8.0/pkg/usr/share/man/man1"
    /bin/install -c -m 644 conky.1 '/home/jente/packages/arch/conky 1.8.0/pkg/usr/share/man/man1'
    make[2]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/doc'
    make[1]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/doc'
    Making install in lua
    make[1]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/lua'
    make install-am
    make[2]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/lua'
    make[3]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/lua'
    test -z "/usr/lib/conky" || /bin/mkdir -p "/home/jente/packages/arch/conky 1.8.0/pkg/usr/lib/conky"
    make[3]: Nothing to be done for `install-data-am'.
    make[3]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/lua'
    make[2]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/lua'
    make[1]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/lua'
    Making install in data
    make[1]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/data'
    make[2]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/data'
    make[2]: Nothing to be done for `install-exec-am'.
    test -z "/etc/conky" || /bin/mkdir -p "/home/jente/packages/arch/conky 1.8.0/pkg/etc/conky"
    /bin/install -c -m 644 conky.conf conky_no_x11.conf '/home/jente/packages/arch/conky 1.8.0/pkg/etc/conky'
    make[2]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/data'
    make[1]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0/data'
    make[1]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0'
    make[2]: Entering directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0'
    make[2]: Nothing to be done for `install-exec-am'.
    make[2]: Nothing to be done for `install-data-am'.
    make[2]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0'
    make[1]: Leaving directory `/home/jente/packages/arch/conky 1.8.0/src/conky-1.8.0'
    make: *** [install-recursive] Error 1
    ==> ERROR: A failure occurred in package().
    Aborting...
    Last edited by Unia (2011-08-17 15:08:43)

  • [SOLVED] Adapting conky "# of new emails" script to a message preview

    The Conky wiki has a section to display the number of new emails (Gmail) with a python script. It appears that script uses urllib for credentials and then xml.etree to navigate the xml.
    I'm trying to adapt the script to display the sender and title, since they exist in the xml.
    I've been reading the documentation and after looking at the xml I'm pretty sure I need to use indexing, can't get it to work though.
    Here's the script from the wiki with my comments on what I'm trying to add in.
    #! /usr/bin/env python
    import urllib.request
    from xml.etree import ElementTree as etree
    # Enter your username and password below within quotes below, in place of ****.
    # Set up authentication for gmail
    auth_handler = urllib.request.HTTPBasicAuthHandler()
    auth_handler.add_password(realm='New mail feed',
    uri='https://mail.google.com/',
    user= '****',
    passwd= '****')
    opener = urllib.request.build_opener(auth_handler)
    # ...and install it globally so it can be used with urlopen.
    urllib.request.install_opener(opener)
    gmail = 'https://mail.google.com/gmail/feed/atom'
    NS = '{http://purl.org/atom/ns#}'
    with urllib.request.urlopen(gmail) as source:
    tree = etree.parse(source)
    fullcount = tree.find(NS + 'fullcount').text
    # attempt to navigate to sender of email (feed/entry/author/name)
    firstemailsender = tree[0][5][5][0].text
    secondemailsender = tree[0][6][5][0].text
    # attempt to navigate to title of email (feed/entry/title)
    firstemailtitle = tree[0][5][0].text
    firstemailtitle = tree[0][5][0].text
    print(fullcount + ' new')
    # added print that doesn't work because of other things not working
    print (firstemailsender + ' - ' + firstemailtitle)
    print (secondemailsender + ' - ' + secondemailtitle)
    Last edited by heyitstallchris (2015-02-06 14:55:07)

    Hey,
    I've re-written the code to use XPath instead of indexing, IMO it's more robust and compact. findall() returns a list of all Elements that match the given XPath. Make sure to include the namespace before each element name in the path (you can see that below when I use findall() to get all "author/name" elements.
    The code saves all new mails in an array (mails) full of dicts, each with a 'sender' and 'title' keys. The script will blow up if you have zero or one new emails, but you can trivially check the length of the mails array before printing at the end.
    If you have any questions about the code just ask.
    #! /usr/bin/env python
    import urllib.request
    from xml.etree import ElementTree as etree
    # Enter your username and password below within quotes below, in place of ****.
    # Set up authentication for gmail
    auth_handler = urllib.request.HTTPBasicAuthHandler()
    auth_handler.add_password(realm='New mail feed',
    uri='https://mail.google.com/',
    user= '*****',
    passwd= '*****')
    opener = urllib.request.build_opener(auth_handler)
    # ...and install it globally so it can be used with urlopen.
    urllib.request.install_opener(opener)
    gmail = 'https://mail.google.com/gmail/feed/atom'
    NS = '{http://purl.org/atom/ns#}'
    with urllib.request.urlopen(gmail) as source:
    tree = etree.parse(source)
    root = tree.getroot()
    mails = []
    # only iterate over new mails, which have a tag "entry"
    for entry in root.findall(NS+'entry'):
    message = {}
    # locate sender and title info using XPath (?) again
    message['sender'] = entry.findall(NS+'author/'+NS+'name')[0].text
    message['title'] = entry.findall(NS+'title')[0].text
    mails.append(message)
    print(str(len(mails)) + ' new')
    print (mails[0]['sender'] + ' - ' + mails[0]['title'])
    print (mails[1]['sender'] + ' - ' + mails[1]['title'])
    Last edited by spupy (2015-01-28 14:00:56)

  • Conky: scrolling package notifier using perl

    This post looks bigger than it actually is. Anyway, I hope this is clear... if not, just ask.
    Majkhii's update notifier in python made me wonder if it would be possible to create a scrolling notifier in conky to display upgradable packages.  A scrolling notifier would be able to display all the packages within a defined space without having your conky layout stretched across the screen if the package list gets too long.
    I did this mostly as a programming exercise but thought that someone might find it useful, so here it is. If nothing else, you have a little client-server script pair to play with.
    The best way that I came up with to do this (read: least overhead without patching conky) is to run a server script in the background that keeps track of upgradable packages and then to let conky exec a client script to get info from the server script. This avoids invoking pacman with "pacman -Qu" each time the scrolling text updates.
    Automatically Syncing Pacman
    First, you need to automatically sync pacman at regular intervals. Save this script...
    #!/bin/sh
    /usr/bin/pacman -Sy
    ...as "sync_pacman" or whatever you want to call it. Then do this:
    chmod 744 sync_pacman
    mv sync_pacman /etc/cron.hourly/
    Everything in the cron.hourly directory will get run automatically every hour (unless you've killed cron).
    The Server
    Save the server as "conkyPkgListServer" (or whatever), make it executable, then start it in the background by passing it a port and, optionally*, an update interval (in minutes). E.g.
    conkyPkgListServer 64564 15 &
    Add this to your autostart list if you have one.
    This starts the server on port 64564 and tells it to update every 15 minutes (this server is running on localhost and should only be accessible on your computer, i.e. not to anyone else on your network).
    The Client
    Save the client as "conkyPkgListClient", make it executable, then put it where conky can find it.
    To get the number of upgradable packages, add a line like this to your conky config:
    ${execi 900 conkyPkgListClient 64564}
    Conky will execute the client every 15 minutes, connect to the server script on port 64564, and get the number of packages.
    Now, the interesting part... the scrolling package list. There are 2 different styles: horizontal and vertical.
    Vertical Scroll
    pkgA pkgB pkgC
    pkgB -> pkgC ->
    pkgC pkgA
    pkgA pkgB
    Horizontal Scroll/
    pkgA pkgB -> gA pkgB pk -> pkgB pkgC
    Add this to conky:
    ${execi <interval> conkyPkgListClient <port> <interval> <direction> <size>}
    Replace "<port>" with the port number that you started the server on (64564 in the example above).
    Replace "<interval>" with the update interval, in seconds.
    Replace "<direction>" with "n","e","s", or "w" (for north, east, south, west, respectively). North and south create a vertical scroll moving up or down, resp., and east and west a horizontal scroll moving right or left, resp.
    Replace "<size>" with either the number of lines to display for a vertical scroll or the number of characters to display for a horizontal scroll.
    e.g.
    7 lines showing a vertically scrolling package list that moves up 1 line every 2 seconds:
    ${execi 2 conkyPkgListClient 64564 2 n 7}
    A single horizontally scrolling field 25 characters wide that moves left 1 character every 2 seconds:
    ${execi 2 conkyPkgListClient 64564 2 e 25}
    SERVER SCRIPT
    #!/usr/bin/perl
    use strict;
    use IO::Socket;
    my ($port,$update_interval) = @ARGV;
    my $n = 0;
    my @pkgs;
    my $sock = new IO::Socket::INET(
    LocalPort => $port,
    Listen => 1,
    Reuse => 1,
    Proto => 'tcp')
    || die "Error creating socket: $!";
    sub receive ($)
    my ($client) = @_;
    my $received = '';
    READ: while(1)
    my ($data, $output);
    while(sysread( $client, $data, 1 ))
    $received .= $data;
    if ($received =~ m/\n$/)
    chomp $received;
    last READ;
    return $received;
    sub send ($ $)
    my ($client,$data) = @_;
    print $client "$data\r\n";
    $client->flush;
    close($client);
    sub getPkgList
    my $pkgs = `pacman -Qu`;
    my @lines = split "\n\n", $pkgs;
    if (scalar @lines > 1)
    $pkgs = $lines[-2];
    $pkgs =~ s/\s*\n\s*/ /g;
    ($n,$pkgs) = $pkgs =~ m/^\S+\s\((\d+)\):\s(.+)$/;
    @pkgs = split /\s+/,$pkgs;
    sub getMarquee ($ $ $)
    my ($interval,$direction,$size) = @_;
    my $marquee = '';
    if ($direction eq 'n' or $direction eq 's')
    if ($size > $n)
    push @pkgs, ('') x ($size-$n);
    $n = $size;
    if ($n > 0)
    my $t = time;
    $t = int($t/$interval);
    my $i = $t % $n;
    for (1..$size)
    $i = ($direction eq 'n' ? $i + 1 : $i - 1);
    if ($i >= $n or $i < 0)
    $i = $i % $n;
    $marquee .= $pkgs[$i]."\n";
    elsif ($direction eq 'e' or $direction eq 'w')
    my $pkg_str = "@pkgs ";
    $n = length($pkg_str);
    if ($size > $n)
    $pkg_str .= ' ' x ($size - $n);
    $n = $size;
    if ($n > 0)
    my $t = time;
    $t = int($t/$interval);
    $t = -$t if ($direction eq 'e');
    my $i = $t % $n;
    if ($i >= $n or $i < 0)
    $i = $i % $n;
    $marquee .= substr( substr($pkg_str,$i).substr($pkg_str,0,($i-length($pkg_str))), 0, $size);
    return $marquee;
    &getPkgList;
    $update_interval *= 60 if (defined($update_interval));
    my $last_update = time;
    while ( defined($sock) )
    my $client = $sock->accept();
    if (defined($update_interval) and (time-$last_update) > $update_interval)
    &getPkgList;
    $last_update = time;
    my $received = &receive($client);
    if ($received eq 'update')
    &getPkgList;
    &send($client,$n);
    if ($received =~ m/(\d+) ([nesw]) (\d+)/)
    &send($client,&getMarquee($1,$2,$3));
    else
    &send($client,$n);
    CLIENT SCRIPT
    #!/usr/bin/perl
    use strict;
    use warnings;
    use IO::Socket;
    my $port = shift;
    my $message = "@ARGV\n";
    my $sock = new IO::Socket::INET(PeerAddr => 'localhost',PeerPort => $port,Proto => 'tcp') || die "Error creating socket: $!";
    print $sock $message;
    $sock->flush;
    sub receive ($)
    my ($client) = @_;
    my $received = '';
    READ: while(1)
    my ($data, $output);
    while(sysread( $client, $data, 1 ))
    $received .= $data;
    if ($received =~ m/\r\n$/)
    $received =~ s/\r\n$//;
    last READ;
    return $received;
    print &receive($sock);
    close($sock);
    *If you skip the update interval, replace "${execi 900 conkyPkgListClient 64564}" with "${execi 900 conkyPkgListClient 64564 update}" to update the server script's package list each time conky execs the client.
    Last edited by Xyne (2008-12-16 03:48:45)

    The way the script parses the output of `pacman -Qu` could cause some problems.
    Here's my `pacman -Qu` output when I enable the testing repo.
    # pacman -Qu
    Checking for package upgrades...
    warning: emerald-themes-git: local (20080612-1) is newer than compiz-fusion (20080524-1)
    warning: jdk: local (6-2) is newer than community (6u11-1)
    Remove (1): bluez-libs-3.32-1
    Total Removed Size: 0.31 MB
    Targets (73): bluez-4.1-1 audacity-1.3.6-2 bash-3.2.048-1 binutils-2.19-1 bison-2.4.1-1 ca-certificates-20080809-5 cheese-2.24.2-2 cups-1.3.9-3
    cvs-1.11.23-3 devilspie-0.22-3 dhcpcd-4.0.7-1 dsniff-2.4b1-13 ettercap-NG_0.7.3-11 ettercap-gtk-NG_0.7.3-5 evince-2.24.2-2
    evolution-data-server-2.24.2-2 flashplugin-10.0.12.36-4 gcc-4.3.2-2 gcc-libs-4.3.2-2 ghc-6.10.1-1 ghostscript-8.63-4 glibc-2.9-2
    gnome-control-center-2.24.0.1-4 gnome-panel-2.24.2-2 gnome-python-desktop-2.24.0-3 gnome-vfs-2.24.0-2 gstreamer0.10-bad-plugins-0.10.9-2
    gtk2-2.14.5-2 gvfs-1.0.3-2 hal-0.5.11-7 hdparm-9.3-1 heimdal-1.2.1-2 imagemagick-6.4.7.8-1 kdelibs-4.1.3-2 kdelibs3-3.5.10-2
    kernel-headers-2.6.27.6-2 kernel26-2.6.27.9-1 lftp-3.7.7-1 libcups-1.3.9-2 libgnomecups-0.2.3-4 libgnomeprint-2.18.3-4
    libnetworkmanager-0.7.0-1 libpcap-1.0.0-1 libspectre-0.2.2-2 libx86-1.1-2 live-media-2008.11.13-1 man-pages-3.15-1 mkinitcpio-0.5.19.1-2
    module-init-tools-3.5-1 mplayer-1.0rc2-9 neon-0.28.3-2 nmap-4.76-3 openoffice-base-3.0.0-4 openssh-5.1p1-2 openssl-0.9.8i-3
    pacman-3.2.1-2 ppp-2.4.4-7 python-clientform-0.2.10-1 python-mechanize-0.1.10-1 qemu-0.9.1-11 samba-3.2.5-2 smbclient-3.2.5-2
    subversion-1.5.4-2 syslog-ng-2.1.3-2 tcpdump-4.0.0-2 totem-plparser-2.24.2-2 udev-132-1 vi-7.2.65-1 vim-7.2.65-1.1 wine-1.1.10-2
    wireshark-1.0.4-3 xf86-input-evdev-2.1.0-1 xine-lib-1.1.15-4
    Total Download Size: 0.00 MB
    Total Installed Size: 1611.16 MB
    The getPkgList subroutine will parse "Remove (1): bluez-libs-3.32-1" Rather than targets in this case.
    Something I noticed when I was working on a conkypac rewrite (that I never bothered to finish.. sigh..). I ended up doing the python equivalent of..
    $pkgs = $lines[-2];
    Anywho.. great script, pretty cool idea.

  • Calculating and displaying the Length of the side of a triangle

    Hi everyone. I am currently working on Dragging and Stretching a triangle on screen. Ive got it working to a certain extent but the only problem is that whenever I go to the point from which i have to drag my triangle i.e. the Left hand Corner of the BAse at exactly 300,300 it redraws a new triangle below the existing one and then when i stretch it from the top and the right it leaves a trail of triangles everytime. But when i resize my window it clears the trail only to start agian when I drag or stretch it...
    All my code for wahtever I have done is displayed below. I would appreciate all the help that any one can offer.
    Secondly , as I stretch my triangle I would like to calculate My Length of the hypotenuse and the other 2 sides as they change and display it in System.out.println for now...
    PLEASE HELP
    the code is
    This is my Main Form --- Interactive Geometry.java
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JFrame;
    * InteractiveGeometry.java
    * Created on 30 November 2004, 20:29
    * @author  Kripa Bhojwani
    public class InteractiveGeometry extends javax.swing.JFrame {
        public EastPanel eastpanel;
        public Container container;
        public GeomPanel gp;
        public boolean pressed = false;
        public boolean pressT = false;
        public boolean pressR = false;
        /** Creates new form InteractiveGeometry */
        public InteractiveGeometry() {
            initComponents();
            eastpanel = new EastPanel();
            container = new Container();
            Model model = new Model(300,150,450,300,300,300);
            gp = new GeomPanel(model);
            container = getContentPane();
            container.add(eastpanel,BorderLayout.EAST);
            container.add(gp,BorderLayout.CENTER);
            setSize(1400,9950);
            gp.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                public void mouseDragged(MouseEvent me) {
                    setTitle("Dragging: x=" + me.getX() + "; y=" + me.getY());
                public void mouseMoved(MouseEvent me) {
                    setTitle("Moving: x=" + me.getX() + "; y=" + me.getY());
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            jMenuBar2 = new javax.swing.JMenuBar();
            jMenu2 = new javax.swing.JMenu();
            jMenuItem1 = new javax.swing.JMenuItem();
            jMenu1 = new javax.swing.JMenu();
            jMenuItem2 = new javax.swing.JMenuItem();
            addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
                public void mouseDragged(java.awt.event.MouseEvent evt) {
                    formMouseDragged(evt);
                public void mouseMoved(java.awt.event.MouseEvent evt) {
                    formMouseMoved(evt);
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            jMenuBar2.setBackground(new java.awt.Color(0, 102, 204));
            jMenu2.setBackground(new java.awt.Color(222, 222, 238));
            jMenu2.setText("File");
            jMenu2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenu2ActionPerformed(evt);
            jMenuItem1.setBackground(new java.awt.Color(204, 255, 255));
            jMenuItem1.setText("Exit");
            jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem1ActionPerformed(evt);
            jMenu2.add(jMenuItem1);
            jMenuBar2.add(jMenu2);
            jMenu1.setBackground(new java.awt.Color(199, 215, 255));
            jMenu1.setText("Theorem ");
            jMenuItem2.setText("Pythagoras Theorem");
            jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem2ActionPerformed(evt);
            jMenu1.add(jMenuItem2);
            jMenuBar2.add(jMenu1);
            setJMenuBar(jMenuBar2);
            pack();
        private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:
        private void formMouseDragged(java.awt.event.MouseEvent evt) {
            // TODO add your handling code here:
        private void formMouseMoved(java.awt.event.MouseEvent evt) {
            // TODO add your handling code here:
        public void mouseDragged(MouseEvent me) {
            setTitle("Dragging: x=" + me.getX() + "; y=" + me.getY());
        private void jMenu2ActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:
        private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:
            System.exit(0);
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {
            System.exit(0);
         * @param args the command line arguments
        public static void main(String args[]) {
            InteractiveGeometry ig = new InteractiveGeometry();
            ig.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            ig.show();
            // new InteractiveGeometry().show();
        // Variables declaration - do not modify
        private javax.swing.JMenu jMenu1;
        private javax.swing.JMenu jMenu2;
        private javax.swing.JMenuBar jMenuBar2;
        private javax.swing.JMenuItem jMenuItem1;
        private javax.swing.JMenuItem jMenuItem2;
        // End of variables declaration
    This is my Panel -- GeomPanel.java which draws everything -- /*
    * GeomPanel.java
    * Created on 30 November 2004, 20:29
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.Graphics.*;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    import java.awt.geom.Line2D;
    import java.awt.geom.Point2D;
    import java.awt.event.*;
    import java.awt.Graphics2D;
    import java.awt.geom.Ellipse2D;
    import javax.swing.event.TableModelListener;
    import javax.swing.JScrollPane;
    import javax.swing.event.*;
    import java.awt.Dimension;
    import java.awt.Container.*;
    * @author Kripa Bhojwani
    public class GeomPanel extends javax.swing.JPanel implements Observer, MouseMotionListener, MouseListener {
    private Model model;
    private boolean pressed = false;
    private boolean pressT = false;
    private boolean pressR = false;
    /** Creates new form GeomPanel */
    public GeomPanel(Model model) {
    this.model = model;
    model.addObserver(this);
    addMouseListener(this);
    addMouseMotionListener(this);
    initComponents();
    setBackground(Color.getHSBColor(6,600,660));
    public void paintComponent(Graphics gfx) {
    Graphics2D g = (Graphics2D) gfx;
    Point tc = model.getTop();
    Point lc = model.getLeft();
    Point rc = model.getRight();
    Point2D.Double p1 = new Point2D.Double(tc.getX(),tc.getY());
    Point2D.Double p2 = new Point2D.Double(lc.getX(),lc.getY());
    Point2D.Double p3 = new Point2D.Double(rc.getX(),rc.getY());
    Line2D.Double line = new Line2D.Double(p1, p2);
    Line2D.Double line1 = new Line2D.Double(p2, p3);
    Line2D.Double line2 = new Line2D.Double(p1, p3);
    g.setColor(Color.BLACK);
    g.draw(line);
    g.draw(line2);
    g.draw(line1);
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    private void initComponents() {
    setLayout(new java.awt.BorderLayout());
    addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
    public void mouseDragged(java.awt.event.MouseEvent evt) {
    formMouseDragged(evt);
    private void formMouseDragged(java.awt.event.MouseEvent evt) {
    // TODO add your handling code here:
    public void mouseClicked(MouseEvent e) {
    public void mouseDragged(MouseEvent e) {
    System.out.println("Dragged at "+ e.getX()+ "," + e.getY());
    if(pressed == true){
    model.setLeft(e.getX() , e.getY());
    else if(pressT == true){
    model.setTop(e.getX() , e.getY());
    else if (pressR == true){
    model.setRight(e.getX(), e.getY());
    else{
    pressed = false;
    pressT= false;
    pressR=false;
    repaint();
    public void mouseEntered(MouseEvent e) {
    public void mouseExited(MouseEvent e) {
    public void mouseMoved(MouseEvent e) {
    System.out.println("Mouse at " + e.getX() +"," + e.getY());
    public void mousePressed(MouseEvent e) {
    if (model.getLeft().getX()== e.getX() && model.getLeft().getY()== e.getY()){
    pressed = true;
    else if (model.getTop().getX()==e.getX() && model.getTop().getY()==e.getY()){
    pressT = true;
    else if(model.getRight().getX() == e.getX() && model.getRight().getY()==e.getY()){
    pressR = true;
    // else if(model.getCircle().getX() == e.getX() && model.getCircle().getY() == e.getY()){
    // inoval = true;
    else {
    pressed =false;
    pressT = false;
    pressR = false;
    } repaint();
    public void mouseReleased(MouseEvent e) {
    if(pressed == true){
    model.setLeft(e.getX(),e.getY());
    else if (pressT ==true ){
    model.setTop(e.getX(), e.getY());
    else if(pressR ==true){
    model.setRight(e.getX(),e.getY());
    else {
    pressed = false;
    pressT = false;
    pressR = false;
    repaint();
    public void update(Observable o, Object arg) {
    repaint();
    // Variables declaration - do not modify
    // End of variables declaration
    This is my Model class called Model.java which Holds all teh data for my triangle
    import java.awt.Point;
    import java.util.Observable;
    * Model.java
    * Created on 05 December 2004, 14:11
    * @author  Kripa Bhojwani
    public class Model extends Observable{
        private int  x1,x2,x3, y1,y2,y3;
        private int _transx;
        private int _transy;
        private int _c;
        private int _d;
        /** Creates a new instance of Model */
        public Model(int x1, int y1, int x2, int y2, int x3, int y3) {
            this.x1 = x1;
            this.y1 = y1;
            this.x2 = x2;
            this.y2 = y2;
            this.x3 = x3;
            this.y3 = y3;
            setChanged();
            notifyObservers();
        public void setTop(int x1, int y1){
            //this.x1 =x1;
            this.y1= y1;
            setChanged();
            notifyObservers();
        public void setRight(int x2, int y2){
            this.x2 = x2;
            // this.y2 =y2;
            setChanged();
            notifyObservers();
        public void setLeft(int x3, int y3){
            _transx = x3 - this.x3;
            _transy = y3 - this.y3;
            this.x3 += _transx;
            this.y3 += _transy;
            this.y2 += _transy;
            this.x2 += _transx;
            this.x1 += _transx;
            this.y1 += _transy;
            setChanged();
            notifyObservers();
        public Point getTop(){
            Point p = new Point(x1,y1);
            return p;
        public Point getRight(){
            Point p1 = new Point(x2,y2);
            return p1;
        public Point getLeft(){
            Point p3 = new Point(x3,y3);
            return p3;
        public void update() {
            setChanged();
            notifyObservers();
    This is my TableModel which is the JTable to display all the Cordinates and Lengths and other Measurements like angles etc./*
    * TableModel.java
    * Created on 03 December 2004, 15:08
    import javax.swing.JTable;
    import javax.swing.JScrollPane;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Observer;
    import javax.swing.event.TableModelEvent;
    import javax.swing.table.AbstractTableModel;
    * @author Kripa Bhojwani
    public class TableModel extends AbstractTableModel implements Observer{
    private String[] columnNames = {"Point", "X Coordinate", "Y Coordinate"};
    private Object[][] data = {};
    private int rowCount;
    private int columnCount;
    /** Creates a new instance of TableModel */
    public TableModel() {
    rowCount = 0;
    columnCount = 3;
    public int getColumnCount() {
    return columnCount;
    public int getRowCount() {
    return rowCount;
    public String getColumnName(int col) {
    return columnNames[col];
    public void setColumnName (String[] name){
    columnNames = name;
    public void setValueAt(Object obj, int row, int col) {
    data[row][col] = obj;
    fireTableCellUpdated(row, col);
    TableModelEvent tme = new TableModelEvent(this);
    fireTableChanged(tme);
    public Object getValueAt(int row, int col) {
    return data[row][col];
    public void update(java.util.Observable o, Object arg) {
    This is the Panel on the east side of My Main application form which will display all the measurements and Cordinates ---EastPanel.java
    import java.awt.BorderLayout;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.event.TableModelListener;
    import java.awt.Dimension;
    * EastPanel.java
    * Created on 04 December 2004, 23:07
    * @author  Kripa Bhojwani
    public class EastPanel extends javax.swing.JPanel implements TableModelListener{
        private TableModel tm;
        /** Creates new form EastPanel */
        public EastPanel() {   
          initComponents();
            tm = new TableModel();
            JTable table1 = new JTable(tm);
            table1.setPreferredScrollableViewportSize(new Dimension(250,264));
            table1.getModel().addTableModelListener(this);
            JScrollPane sp = new JScrollPane(table1);
            add(sp,BorderLayout.EAST);
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            setLayout(new java.awt.BorderLayout());
        public void tableChanged(javax.swing.event.TableModelEvent e) {
        // Variables declaration - do not modify
        // End of variables declaration
    }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    public class G
    public G()
    TriangleModel tri = new
    ri = new TriangleModel(175,100,175,250,325,250);
    TriangleView view = new TriangleView(tri);
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(view.getUIPanel(),
    Panel(), "North");
    f.getContentPane().add(view);
    f.getContentPane().add(view.getTablePanel(),
    Panel(), "South");
    f.setSize(500,500);
    f.setLocation(200,200);
    f.setVisible(true);
    public static void main(String[] args)
    new G();
    class TriangleModel // (x1,
    y1)
    {                                         //      |\
    static final int SIDES = 3; // | \
    private int cx, cy; // |
    | \
    Polygon triangle; // |_
    |_ _\ (x3, y3)
    int selectedIndex; // (x2,
    (x2, y2)
    NumberFormat nf;
    Line2D[] medians;
    Point2D centroid;
    public TriangleModel(int x1, int y1, int x2, int
    int y2, int x3, int y3)
    int[] x = new int[] { x1, x2, x3 };
    int[] y = new int[] { y1, y2, y3 };
    triangle = new Polygon(x, y, SIDES);
    nf = NumberFormat.getNumberInstance();
    nf.setMaximumFractionDigits(1);
    public boolean contains(Point p)
    // Polygon.contains doesn't work well enough
    return (new Area(triangle)).contains(p);
    public boolean isLineSelected(Rectangle r)
    Line2D line = new Line2D.Double();
    for(int j = 0; j < SIDES; j++)
    int[] x = triangle.xpoints;
    int[] y = triangle.ypoints;
    int x1 = x[j];
    int y1 = y[j];
    int x2 = x[(j + 1) % SIDES];
    int y2 = y[(j + 1) % SIDES];
    line.setLine(x1, y1, x2, y2);
    if(line.intersects(r))
    selectedIndex = j;
    return true;
    selectedIndex = -1;
    return false;
    * Only works for right triangle with right angle
    angle at (x2, y2)
    public void moveSide(int dx, int dy, Point p)
    int[] x = triangle.xpoints;
    int[] y = triangle.ypoints;
    switch(selectedIndex)
    case 0:
    x[0] += dx;
    x[1] += dx;
    break;
    case 1:
    y[1] += dy;
    y[2] += dy;
    break;
    case 2:
    double rise = y[2] - y[0];
    double run = x[2] - x[0];
    double slope = rise/run;
    // rise / run == (y[2] - p.y) / (x[2]
    ] - p.y) / (x[2] - p.x)
    x[2] = p.x + (int)((y[2] - p.y) /
    )((y[2] - p.y) / slope);
    // rise / run == (p.y - y[0]) / (p.x
    y - y[0]) / (p.x - x[0])
    y[0] = p.y - (int)((p.x - x[0]) *
    )((p.x - x[0]) * slope);
    public void translate(int dx, int dy)
    triangle.translate(dx, dy);
    public Polygon getTriangle()
    return triangle;
    public String findCentroid()
    int[] x = triangle.xpoints;
    int[] y = triangle.ypoints;
    // construct the medians defined as the line
    the line from
    // any vertex to the midpoint of the opposite
    opposite line
    medians = new Line2D[x.length];
    for(int j = 0; j < x.length; j++)
    int next = (j + 1) % x.length;
    int last = (j + 2) % x.length;
    Point2D vertex = new Point2D.Double(x[j],
    Double(x[j], y[j]);
    // get midpoint of line opposite vertex
    double dx = ((double)x[last] -
    le)x[last] - x[next])/2;
    double dy = ((double)y[last] -
    le)y[last] - y[next])/2;
    Point2D oppLineCenter = new
    Center = new Point2D.Double(x[next] + dx,
    y[next]
    y[next] + dy);
    medians[j] = new Line2D.Double(vertex,
    uble(vertex, oppLineCenter);
    // centroid is located on any median 2/3 the
    2/3 the way from the
    // vertex (P1) to the midpoint (P2) on the
    ) on the opposite side
    double[] lengths = getSideLengths();
    double dx = (medians[0].getX2() -
    etX2() - medians[0].getX1())*2/3;
    double dy = (medians[0].getY2() -
    etY2() - medians[0].getY1())*2/3;
    double px = medians[0].getX1() + dx;
    double py = medians[0].getY1() + dy;
    //System.out.println("px = " + nf.format(px)
    rmat(px) +
    // "\tpy = " +
    py = " + nf.format(py));
    centroid = new Point2D.Double(px, py);
    return "(" + nf.format(px) + ", " +
    ", " + nf.format(py) + ")";
    public String[] getAngles()
    double[] lengths = getSideLengths();
    String[] vertices = new
    es = new String[lengths.length];
    for(int j = 0; j < lengths.length; j++)
    int opp = (j + 1) % lengths.length;
    int last = (j + 2) % lengths.length;
    double top = lengths[j] * lengths[j] +
    lengths[last] *
    lengths[last] * lengths[last] -
    lengths[opp] *
    lengths[opp] * lengths[opp];
    double divisor = 2 * lengths[j] *
    lengths[j] * lengths[last];
    double vertex = Math.acos(top /
    h.acos(top / divisor);
    vertices[j] =
    ertices[j] = nf.format(Math.toDegrees(vertex));
    return vertices;
    public String[] getLengths()
    double[] lengths = getSideLengths();
    String[] lengthStrs = new
    rs = new String[lengths.length];
    for(int j = 0; j < lengthStrs.length; j++)
    lengthStrs[j] = nf.format(lengths[j]);
    return lengthStrs;
    public String[] getSquares()
    double[] lengths = getSideLengths();
    String[] squareStrs = new
    rs = new String[lengths.length];
    for(int j = 0; j < squareStrs.length; j++)
    squareStrs[j] = nf.format(lengths[j] *
    lengths[j] * lengths[j]);
    return squareStrs;
    private double[] getSideLengths()
    int[] x = triangle.xpoints;
    int[] y = triangle.ypoints;
    double[] lengths = new double[SIDES];
    for(int j = 0; j < SIDES; j++)
    int next = (j + 1) % SIDES;
    lengths[j] = Point.distance(x[j], y[j],
    (x[j], y[j], x[next], y[next]);
    return lengths;
    class TriangleView extends JPanel
    private TriangleModel model;
    private Polygon triangle;
    private JTable table;
    private JLabel centroidLabel;
    private boolean showConstruction;
    TriangleControl control;
    public TriangleView(TriangleModel model)
    this.model = model;
    triangle = model.getTriangle();
    showConstruction = false;
    control = new TriangleControl(this);
    addMouseListener(control);
    addMouseMotionListener(control);
    public void paintComponent(Graphics g)
    super.paintComponent(g);
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.draw(triangle);
    if(model.medians == null)
    centroidLabel.setText("centroid location:
    id location: " + model.findCentroid());
    // draw medians and centroid point
    if(showConstruction && !control.dragging)
    g2.setPaint(Color.red);
    for(int j = 0; j < 3; j++)
    g2.draw(model.medians[j]);
    g2.setPaint(Color.blue);
    g2.fill(new
    g2.fill(new Ellipse2D.Double(model.centroid.getX() -
    2,
    model.centroid.getY()
    model.centroid.getY() - 2, 4, 4));
    public TriangleModel getModel()
    return model;
    public JTable getTable()
    return table;
    public JLabel getCentroidLabel()
    return centroidLabel;
    public JPanel getUIPanel()
    JCheckBox showCon = new JCheckBox("show
    ox("show construction");
    showCon.addActionListener(new
    ener(new ActionListener()
    public void actionPerformed(ActionEvent
    (ActionEvent e)
    boolean state =
    boolean state =
    ((JCheckBox)e.getSource()).isSelected();
    showConstruction = state;
    repaint();
    JPanel panel = new JPanel();
    panel.add(showCon);
    return panel;
    public JPanel getTablePanel()
    String[] headers = new String[] { "", "", "",
    // row and column data labels
    String[] rowHeaders = {
    "sides", "lengths", "squares", "angles",
    ", "angles", "degrees"
    String[] sidesRow = { "vertical",
    rtical", "horizontal", "hypotenuse" };
    String[] anglesRow = { "hyp to ver", "ver to
    "ver to hor", "hor to hyp" };
    // collect data from model
    String[] angles = model.getAngles();
    String[] lengths = model.getLengths();
    String[] squares = model.getSquares();
    String[][] allData = { sidesRow, lengths,
    lengths, squares, anglesRow, angles };
    int rows = 5;
    int cols = 4;
    Object[][] data = new Object[rows][cols];
    for(int row = 0; row < rows; row++)
    data[row][0] = rowHeaders[row];
    for(int col = 1; col < cols; col++)
    data[row][col] = allData[row][col -
    lData[row][col - 1];
    table = new JTable(data, headers)
    public boolean isCellEditable(int row,
    ble(int row, int col)
    return false;
    DefaultTableCellRenderer renderer =
    (DefaultTableCellRenderer)table.getDefaultRenderer(St
    ring.class);
    renderer.setHorizontalAlignment(JLabel.CENTER);
    centroidLabel = new JLabel("centroid
    centroid location: ", JLabel.CENTER);
    Dimension d =
    sion d = centroidLabel.getPreferredSize();
    d.height = table.getRowHeight();
    centroidLabel.setPreferredSize(d);
    JPanel panel = new JPanel(new
    anel(new BorderLayout());
    panel.setBorder(BorderFactory.createTitledBorder("tri
    angle data"));
    panel.add(table);
    panel.add(centroidLabel, "South");
    return panel;
    class TriangleControl extends MouseInputAdapter
    TriangleView view;
    TriangleModel model;
    Point start;
    boolean dragging, altering;
    Rectangle lineLens; // used for line
    line selection
    public TriangleControl(TriangleView tv)
    view = tv;
    model = view.getModel();
    dragging = altering = false;
    lineLens = new Rectangle(0, 0, 6, 6);
    public void mousePressed(MouseEvent e)
    Point p = e.getPoint();
    lineLens.setLocation(p.x - 3, p.y - 3);
    // are we over a line
    if(model.isLineSelected(lineLens))
    start = p;
    altering = true;
    // or are we within the triangle
    else if(model.contains(p))
    start = p;
    dragging = true;
    public void mouseReleased(MouseEvent e)
    altering = false;
    dragging = false;
    view.getCentroidLabel().setText("centroid
    centroid location: " +
    model.findCentroid());
    view.repaint(); // for the construction
    truction lines
    public void mouseDragged(MouseEvent e)
    Point p = e.getPoint();
    if(altering)
    int x = p.x - start.x;
    int y = p.y - start.y;
    model.moveSide(x, y, p);
    updateTable();
    view.repaint();
    start = p;
    else if(dragging)
    int x = p.x - start.x;
    int y = p.y - start.y;
    model.translate(x, y);
    view.repaint();
    start = p;
    private void updateTable()
    String[] lengths = model.getLengths();
    String[] squares = model.getSquares();
    String[] angles = model.getAngles();
    JTable table = view.getTable();
    for(int j = 0; j < angles.length; j++)
    table.setValueAt(lengths[j], 1, j + 1);
    table.setValueAt(squares[j], 2, j + 1);
    table.setValueAt(angles[j], 4, j + 1);
    view.getCentroidLabel().setText("centroid
    centroid location: " +
    model.findCentroid());
    Hey sorry mate.. ive got a nother problem.
    I need to add loads of theorems to this tool. so i need a JMenu Bar called File with all the normal things. then another Menu called Theorems where i can have a list of JMenuItems with the theorem names --- Like when they click on Pythagoras Theorem it opens up all the triangle and the traingle data that u helped me with.
    The thing is im using netbeans and in netbeans i can do it coz its there and all you got to do is put the components together.
    Please Help
    Thanks...
    Sharan

  • [SOLVED] Problem With conky and or xcompmgr

    So I tried to search for this issue but i don't know quite how to explain through words on what is going on. basically i got corky installed. and so when i login my screen all around corky doesn't refresh. and i believe this to be because of xcompmgr. because thats when I installed it that is when my problem started. so here is a screenshot
    Last edited by Sicariuxs (2012-11-14 21:13:45)

    no i don't have the problem when xcompmgr is running (lol didn't mean corky!! kept thinking about league of legends xD) but the problem is that if i don't have xcompmgr running that i don't have true trnasparancy on guake or any of my other applications. what i believe it to be is that maybe conky doesn't do so well with compositing. because this also has happened to me with compiz. but i know it has to be possible to combine the two! i've seen it done all over youtube. but i keep getting this problem. any suggestions? and thanks for the quick response

  • Field Length issue in ALV Report

    Hi,
    I am using FM REUSE_ALV_GRID_DISPLAY to display few fields. Among them I have a field with length 200 characters text.
    During ALV report display I am able to see only 128 characters, But when I download it and see the field, the it is showing complete text.
    Can anybody help me out?
    Thanks,
    Ramakrishna

    Check out the last answer of this post.
    Re: ALV Grid Display - 255 characters
    <i>I found a SAP document called "Using ALV for list display.pdf" that says the following:
    "Size of data fields: While the list-based ALVList can display only tables of up to 90 columns, the control-based ALVGrid and ALVFullscreen have the limitation of 128 characters per data cell."</i>
    Please make sure to award point for helpful answers and mark the post as solved.  Thanks.
    Regards,
    Rich HEilman

Maybe you are looking for

  • How to connect multiple monitors to a R6970 2PM2D2GD5?

    This issue is driving me round the bend because everytime I want to connect a new monitor to my card I run into problems and I can't seem to find a complete authorative answer as to how and what I can connect. Currently I have 3 monitors connected: 2

  • Buying new iMac - Advices

    Hello, in a few days I'll buy a new iMac, I'm already a holder of an old 2010 iMac 21,5. I thought to remain on a 21,5 because for how expensive it can be, it is less than a 27, even if in this one there is the possibility to add RAM in future, would

  • Acrobat X scan problem

    When I try to scan using Acrobat X I get a Windows 7 pop up that says there is a problem and then Acrobat closes. Very frustrating. I use a Samsung printer/scanner and have downloaded drivers for Win 7.

  • Error when trying implementing BADI --- IDCO_BPL_RCKM_MR21.

    Hi Folks, I have to implement the BADI "IDCO_BPL_RCKM_MR21" to update the standard price in MR21. Could any one help me how to implement this BADI. When I tried to implement this BADI I am getting an error message "BADI definition IDCO_BPL_RCKM_MR21

  • Module unload during reboot

    Hi, i have loaded my kernel module through modload cmd in Solaris 10, but when i m rebooting my machine then module is automatically unloaded from kernel , how i can solve this problem.