12.8. The Floating Clock PromptI've rewritten this prompt several times. It was originally written using octal escape sequences, but the ones I needed most for this (save and restore cursor position) aren't honoured by one of the commonest terminal emulators, rxvt. I rewrote it using tput, and that's what you see here. The required tput codes seem to be universally honoured. The body of the prompt is essentially the same as the "Lightweight" prompt shown earlier, but a clock is kept floating in the upper right corner of the term. It will reposition itself correctly even if the term is resized.
The floating clock prompt in action. The clock will stay in correct position even if the term is resized. Linux HOWTO full list |
|
This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |