You are not logged in.
Pages: 1
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"
fiI'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 conkywhen 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_blueif 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
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.
Offline
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
Pages: 1