CLI Magic: Use ANSI escape sequences to display a clock in your terminal


 
Thread Tools Search this Thread
Special Forums News, Links, Events and Announcements UNIX and Linux RSS News CLI Magic: Use ANSI escape sequences to display a clock in your terminal
# 1  
Old 01-22-2008
CLI Magic: Use ANSI escape sequences to display a clock in your terminal

Tue, 22 Jan 2008 09:00:00 GMT
When I'm in a Linux terminal, I often find myself typing date just to see the time. To make life a bit easier, I wrote a script to always display a clock in the top right corner of the screen.


Source...
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to remove escape sequences from a text file?

Hello friends, Could anyone please advise on how to remove escape sequences from a text file? $ file input.txt input.txt: ASCII English text, with escape sequences I'm able to see those escape characters when opened in vi editor like shown below: ^ but not when I run more... (6 Replies)
Discussion started by: magnus29
6 Replies

2. Shell Programming and Scripting

Escape Sequences

Hi Gurus, Escape sequences \n, \t, \b, \t, \033(1m are not working. I just practiced these escape sequences. It worked first. Later its not working. Also the command - echo inside the script editor shows as shaded by a color. Before that echo inside the script editor wont show like this.... (4 Replies)
Discussion started by: GaneshAnanth
4 Replies

3. Shell Programming and Scripting

Mail utility not displaying escape sequences

Hello! I created a file that displays text underlined. However when I pass the file into the mail utility it doesnt display the underline. Here is the code: echo "\n\033 cat test_underline.txt mail -s "testing of underline" <email_address> < test_underline.txt Any ideas?... (8 Replies)
Discussion started by: DPERTS
8 Replies

4. Shell Programming and Scripting

zsh, prompt, variable expansion, ANSI color sequences

Hi! I am using latest ZSH and I have setopt prompt_subst I have a global hash array variable which contains some color definitions with color names as keys and 256-color ANSI codes (with %{ and %}) as values, eg %{\ePS1="$FG Hello World (%M) > " or PS1=$'$FG Hello World (%M) > ' then it... (3 Replies)
Discussion started by: galanom
3 Replies

5. UNIX for Dummies Questions & Answers

How to input escape sequences in Linux tty?

More details: Unicode, Framebuffer. I tried to press Esc and then what should follow, letters or brackets, but seems not to work. Probably i do something wrong. If somebody is familiar with escape sequences in the console, how do you do that? Thanks in advance. (4 Replies)
Discussion started by: Action
4 Replies

6. UNIX for Dummies Questions & Answers

Escape Sequences appearing in scripts

I hope this question isn't too vague... i recently switched from RedHat to Solaris 10, and found that the parts of a script that copy files between directories no longer work because escape sequences are appearing at the start and end of the filenames being read #!/usr/bin/bash cd... (1 Reply)
Discussion started by: jwm-wm
1 Replies

7. Solaris

Available escape sequences

:) Hi, Can any one help me to find available escape sequences in UNIX shell programming? ( Like \n, \c etc,. in C or C++) Iam generating one report using one of the script, in that it is very much essential. Regards, LOVE (6 Replies)
Discussion started by: Love
6 Replies
Login or Register to Ask a Question
dclock(1)                                                     General Commands Manual                                                    dclock(1)

NAME
dclock - digital clock SYNOPSIS
dclock [ -cmjd ] [ -sslant ] [ -tthickness ] [ -frate ] DESCRIPTION
Dclock displays a scalable digital clock. The time is updated from the local host clock every minute as a background process. The current date is displayed across the top of the window in the format Sat Aug 16 1986 (or some subset of such if there's not enough room). Options to control the clock's appearance, size and placement are as follows: -c Display in 12-hour format ("civilian" time) -- the default. -m Display in 24-hour format ("military" time). -j "John's flag." Puts a tail on the digit `9'. -d Do not display the current date across the top of the clock view. -b Display a border (horizontal line) between the date string and the time display. -T Do not display the Time in the clock view (leaving just the date). -sslant Set the slant of the digits. A slant of 100 (the maximum) corresponds to a slant of one digit width. A slant of 0 (the minimum) is vertical. Default is -s30. A special form is -s, which is equivalent to -s0. -tthickness Set the thickness of the digit segments. Allowable values are between 5 and 25. A thickness of 25 results in segments which are one quarter (25%) of the digit width. Default is -t15. -frate Set the rate at which the segments fade when the time changes. A value of 0 is fastest and 4 is slowest. Default is -f4. A special form is -f, which is equivalent to -f0. To exit dclock, type a `q' in the window. dclock(1)