You are not logged in.

#1 2017-06-28 19:06:55

riddle00
Member
From: Lithuania
Registered: 2015-05-26
Posts: 81

[SOLVED] conky overlaps with itself

Hi,

I have this code in my .aliases file, which is sourced by .zshrc:

    APPCHK=$(ps aux | grep conky | grep -v "grep conky" | wc -l)
     
    if [ "$APPCHK" = '1' ];
    then
    	echo "Conky isn't running!" 
        conky -c $DOTFILES_DIR/xorg/.conky/clock_blue > /dev/null 2>&1 &
        conky -c $DOTFILES_DIR/xorg/.conky/stats_blue > /dev/null 2>&1 &
    else
    	echo "Conky is running fine" 
    fi

I've tried another one as well:

## launch conky scripts (if installed && exist)
ps cax | grep conky > /dev/null 2>&1
if [ $? -eq 0 ]; then
    echo "Conky is running fine" 
else 
    echo "Conky isn't running!" 
    conky -c $DOTFILES_DIR/xorg/.conky/clock_blue > /dev/null 2>&1 &
    conky -c $DOTFILES_DIR/xorg/.conky/stats_blue > /dev/null 2>&1 &
fi   

The problem is that I get "Conky is running fine" every time after the first one, however, conky generated text (by both two instances "clock_blue" and "stats_blue" keeps overlapping itself with a very small difference, which makes text unreadable.
The output of

ps aux | grep conky

when the conky is overlapped shows only two instances:

riddle    1198  0.0  0.2 181940 17572 pts/3    SN   21:56   0:00 conky -c /home/dotfiles/xorg/.conky/clock_blue
riddle    1245  0.9  0.1 997352 15380 pts/3    SNl  21:56   0:04 conky -c /home/dotfiles/xorg/.conky/stats_blue

if I launch those scripts many times, I get many rows in "ps aux | grep conky" output, however, the conky does not overlap with itself this time, everything looks normal (except for many instances running and consuming memory).

So that's mainly my problem.

Last edited by riddle00 (2017-06-28 19:42:36)


Vim is not just an editor (...); it is for all intents and purposes a universal design pattern. --  Jason Ryan

Offline

#2 2017-06-28 19:13:17

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] conky overlaps with itself

Your problem is you launch conky from a file that is sourced every time you start a shell. That is not a good idea. Start conky properly, as described in the wiki.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-06-28 19:41:41

riddle00
Member
From: Lithuania
Registered: 2015-05-26
Posts: 81

Re: [SOLVED] conky overlaps with itself

Thank you, @jasonwryan, I guess it really isn't a good idea.

The thing is, I'm using Openbox, however, I had a completely empty autostart.sh file, all the startups (with checks if program is running or not) being done together with loading zsh every time. Anyway, I've put conky commands in autostart.sh, and that's solved I guess.


Vim is not just an editor (...); it is for all intents and purposes a universal design pattern. --  Jason Ryan

Offline

Board footer

Powered by FluxBB