LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2006, 10:53 PM   #1
debiant
Member
 
Registered: Jul 2006
Distribution: Source Mage 0.9.6
Posts: 196

Rep: Reputation: 30
Script for displaying cal in translucent eterm


Okay, so I want to display cal on my desktop, and here's what I have:
Code:
Eterm --name ettopc --default-font-index 4 --trans --no-input -x \
 --buttonbar no --scrollbar no --no-cursor yes  \
 --geometry 30x8+1245+50 -e cal &
but it appears and disappears, and I figure it is because there is no prompt for input so it executes and disappears.

I tried -e cal;read
but it didn't work. Any suggestions?

Last edited by debiant; 08-18-2006 at 11:02 PM.
 
Old 08-18-2006, 11:04 PM   #2
debiant
Member
 
Registered: Jul 2006
Distribution: Source Mage 0.9.6
Posts: 196

Original Poster
Rep: Reputation: 30
Never mind, I made a really small script called calread that had cal and read in it and it worked.

now what I'm wondering is will the calendar update (probably not when the date changes?

If not how can I go about this.

Last edited by debiant; 08-18-2006 at 11:11 PM.
 
Old 08-19-2006, 12:01 AM   #3
debiant
Member
 
Registered: Jul 2006
Distribution: Source Mage 0.9.6
Posts: 196

Original Poster
Rep: Reputation: 30
Ok so I'm talking to myself as I go, I do it all the time.

I tried to make a script that would update the cal eterm automaticaly, can someone tell me if it's going to work?

Code:
while [ 1 -gt 0 ]
do
  clear
  cal
  sleep 20m
done
I know there is a better way to do this using actual math to determine when one day ends and the next begins, but I'm just looking for cheap and easy right now.

Last edited by debiant; 08-19-2006 at 09:55 AM.
 
Old 08-19-2006, 04:36 PM   #4
debiant
Member
 
Registered: Jul 2006
Distribution: Source Mage 0.9.6
Posts: 196

Original Poster
Rep: Reputation: 30
Allright my final solution, which may not be the cleanest was this:

I did not want to install at as I do not need a mail application on my computer and I did not want to install one, so I used fcron to kill the cal.

These are my scripts

.et:
Code:
/usr/local/bin/Eterm --name ettopc --default-font-index 4 --trans --no-input -x \
 --buttonbar no --scrollbar no --no-cursor yes --geometry 30x8+1245+50 -e .etcal &
.etcal:
cal
sleep 24h

.reetcal:
killall -KILL sleep
.et

fcrontab:
0 0 * * * .reetcal

It works for me, of course there would be an issue if I had any other sleeps running, but I'll work on something to store the pid and kill it eventually

Thank me so much for my help, I couldn't have done it without me. :P

Last edited by debiant; 08-19-2006 at 07:42 PM.
 
  


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
Esetroot (Eterm) error - starting Eterm in transparent mode? nimcha Linux - Software 2 07-14-2007 06:58 AM
Use Cal instead of date command - Bash Blackout_08 Programming 1 06-22-2006 12:39 PM
Cal command Blackout_08 Programming 9 06-08-2006 06:56 PM
cal and the country code ekdya Debian 1 04-14-2006 09:13 PM
perl newbie. hangman.cgi script displaying strangely (additional code) on the web. WorldBuilder Programming 4 11-21-2003 08:09 AM


All times are GMT -5. The time now is 08:33 PM.

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