LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-04-2005, 03:48 PM   #1
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
constant OSD via xosdlib


Ive been toying atound with xosdlib and osd_cat that comes with it.. The one thing it seems to lack, is to draw the same stuff "permanent" or rather repeat it with an interval.

There are apps that draw a clock with xosdlib constantly, and other similar progs, but I cant get any sense out of their code as im not much of a programmer yet..

What I need is a way to get the output of a command drawn to the screen (with xosdlib preferably, or similar) so that it refreshes every few seconds. Below is my try at this that works in a way, but causes too much resource burden and a flickering between updates. Well, because they arnt realy updates, but and attempt to redraw at the exact moment the last expires. This would work if sleep could handle milliseconds.. *sigh*

Even if I time it exactly to 1 sec (both the redraw and repeat sleep) it will still flicker, also if there is no sleep period at all..

Heres the script I use for the repeat:

Code:
#!/bin/bash

## USAGE: /bin/repeat "command to be repeated" interval

if [  -z $2 ]; then
sleep_time="1"
else
sleep_time=$2
fi

## code

again=true
while [ $again = true ]; do
$1
sleep $sleep_time
done
And I run it like this, the last number represents the sleep time:
Code:
repeat "osd_cat -p bottom -A right -c green -s 5 -d 1 /home/user/np.txt" 1

Even vague ideas are welcome..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i can not get the constant ip addres..please. bruse Linux - Networking 13 04-16-2005 08:10 AM
transparency/system monitoring/osd ? inv|s|ble Linux - Software 4 02-16-2005 05:30 AM
Constant HD access LouFogle SUSE / openSUSE 4 11-24-2004 11:00 AM
gaim osd notifications biscristi Linux - Software 0 05-30-2004 06:07 AM
Oh, that constant pinging... thosm Linux - Networking 4 07-31-2003 01:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration