PDA

View Full Version : is there such a thing as a terminal clock?



chucky chuckaluck
May 5th, 2008, 01:54 AM
you know, a clock for the terminal/console, without having to install something else just so you can use the clock, and not something you have to fly to the moon just to get working. something that you just go 'clock' for and voila - "i'm already late!"

Ozor Mox
May 5th, 2008, 01:55 AM
date

chucky chuckaluck
May 5th, 2008, 01:58 AM
i mean something that keeps on ticking. date is a one shot deal.

elmer_42
May 5th, 2008, 02:00 AM
date
date
date
date
Rinse, repeat. :) :P

chucky chuckaluck
May 5th, 2008, 02:01 AM
i suppose i could just get a nice clock for my wall.

klange
May 5th, 2008, 02:02 AM
while true; do date; done

or better yet:

while true; do date; echo -ne "\033[1F"; sleep 1; done

Dr Small
May 5th, 2008, 02:03 AM
Like this?

#!/bin/bash
# clock - A bash clock that can run in your terminal window.

while true;do clear;date +"%r";sleep 1;done

chucky chuckaluck
May 5th, 2008, 02:11 AM
Like this?

#!/bin/bash
# clock - A bash clock that can run in your terminal window.

while true;do clear;date +"%r";sleep 1;done



our winner! thanks.


edit: that sure is clean looking.

Ozor Mox
May 5th, 2008, 02:15 AM
Wouldn't you have to keep a separate terminal window or tab open for that though? And then typing 'date' when you want to know the time is probably just as fast as switching windows/tabs :)

DBO
May 5th, 2008, 02:19 AM
watch -n 1 echo ""

chucky chuckaluck
May 5th, 2008, 02:20 AM
Wouldn't you have to keep a separate terminal window or tab open for that though? And then typing 'date' when you want to know the time is probably just as fast as switching windows/tabs :)

it's just one more xterm. i don't see it as much of a problem. i could always just use date if it became one.

Ozor Mox
May 5th, 2008, 02:22 AM
it's just one more xterm. i don't see it as much of a problem. i could always just use date if it became one.

Ohh split screen terminals, didn't know that was possible!

chucky chuckaluck
May 5th, 2008, 02:26 AM
Ohh split screen terminals, didn't know that was possible!

it's xmonad, a tiling wm. i think it's available in hardy (it wasn't in gutsy). there's also awesome, wmii, dwm and a bunch of others (ion3, ratpoison, etc).

bettlebrox
May 5th, 2008, 02:50 AM
U can set your prompt to tell the time (it updates after each carriage return).

ubuntu-freak
May 5th, 2008, 03:09 AM
This is the most interesting thread on page 1 of the cafe, seriously. I also like the thread concerning the MS keyboad and mouse seemingly made for Kubuntu as well, though.

Nathan

original_jamingrit
May 5th, 2008, 03:25 AM
My user account:

PS1="\[\e[01;34m\][\t]\[\e[01;32m\]\W $\[\e[00m\] "
My root account:

PS1="\[\e[01;34m\][\t]\[\e[01;31m\]\W #\[\e[00m\] "

Copy and paste into your terminal, and if you like it, also you .bashrc. Updates whenever an operation is finished, so maybe not as useful as a regular clock.

soapytheclown
May 5th, 2008, 03:42 AM
it's xmonad, a tiling wm. i think it's available in hardy (it wasn't in gutsy). there's also awesome, wmii, dwm and a bunch of others (ion3, ratpoison, etc).

could also use terminator which is just a normal terminal u can split horizontally or vertically as many times as you like :)

init1
May 5th, 2008, 03:47 AM
watch -n 1 date

mali2297
May 5th, 2008, 12:50 PM
If you use mpd, then ncmpc has a nice clock-screen (if compiled with this option).

http://hem.bredband.net/kaw/ncmpc/images/thumb-ncmpc-tux3.png (http://hem.bredband.net/kaw/ncmpc/images/ncmpc-tux3.png)

rolnics
May 5th, 2008, 01:09 PM
very interesting thread, i'm amazed at what can so simply be done through terminal!

on another note, how would you set one of the suggestions to run every time you opened a terminal?

chucky chuckaluck
May 5th, 2008, 03:00 PM
If you use mpd, then ncmpc has a nice clock-screen (if compiled with this option).

http://hem.bredband.net/kaw/ncmpc/images/thumb-ncmpc-tux3.png (http://hem.bredband.net/kaw/ncmpc/images/ncmpc-tux3.png)

i used to use ncmpc like a clock, but i've found just tossing a bunch of music in a file called 'playlist', then playing it with mplayer, to be much simpler. as i already need mplayer, it's one less app, so to use it just for a clock would be like getting a drink of water out of a fire hose.

elmer_42
May 5th, 2008, 03:41 PM
Now I just have to get this working in conky.

mkeuter
May 2nd, 2012, 11:27 AM
I use dclock, although not in terminal, using xmonad it does the trick you're looking for. Other option could be xclock, cairo-clock did not work.

nothingspecial
May 2nd, 2012, 11:49 AM
http://img696.imageshack.us/img696/7058/necrov.png