You are not logged in.

#1 2009-08-10 16:26:56

helpvampire
Member
Registered: 2009-08-10
Posts: 32

Linux clock.

Hi,

I want a program that displays the time. I tried to make one using zenity:

#!/bin/bash
A=`date +%R`
zenity --info --title=Time --text=$A
exit 0

Also my script does not update the time but I want it to update.

Thanks.

Last edited by helpvampire (2009-08-10 22:27:40)

Offline

#2 2009-08-10 16:33:15

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: Linux clock.

xclock?

Last edited by hbekel (2009-08-10 16:34:06)

Offline

#3 2009-08-10 16:38:47

helpvampire
Member
Registered: 2009-08-10
Posts: 32

Re: Linux clock.

Xclock works except the window doesn't focus when I click on it which means I have to use terminal to close it.

Last edited by helpvampire (2009-08-10 17:02:13)

Offline

#4 2009-08-10 21:29:16

Arisna
Member
Registered: 2009-02-13
Posts: 81

Re: Linux clock.

I'm guessing you'll need to throw a while loop in the bash code to make it update.  Not sure how to handle getting rid of the icon and button.  Would using a panel clock be just as good?

Offline

#5 2009-08-10 22:16:52

scj
Member
From: Sweden
Registered: 2007-09-23
Posts: 158

Re: Linux clock.

Are you married to the idea of using zenity? dzen is pretty suitable for this.

while true; do
   echo $(date +'%R') | dzen
   sleep 1m
done;

Offline

#6 2009-08-11 06:34:35

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 714

Re: Linux clock.

!rage
xclock actaully rocks, or use a bar to display your clock

Last edited by jelly (2009-08-11 06:35:06)

Offline

Board footer

Powered by FluxBB