Scripts quick access edit this |
- Author: Hiraoka Kazuyuki <khi@users.sourceforge.jp>
- Version: 1.16
- License: GNU GPL 2 or later
- Download: rich-title.jl
- Homepage: http://howm.sourceforge.jp/a/rich-title/
Synopsis[]
Show time, mail arrival, etc. on the title bar.
Installation[]
- Put the file on your load-path. In order to confirm your load-path, type 'sawfish-client -' on a console and then type 'load-path'.
- Write this in your ~/.sawfishrc
(load "rich-title")
- Restart sawfish.
Note: If an error occures, write
(require 'rep.io.timers)
before (2).
Configuration[]
Simply change these variables for basic customize. e.g. put the below in ~/.sawfishrc.
(setq rttl-title-interval 10)
update interval (seconds): (defvar rttl-title-interval 60)
By default, the title is updated when the focus is changed. If you have troubles on this behavior, put the below in ~/.sawfishrc before loading this file.
(setq rttl-title-interval 1) ;; update every second (setq rttl-update-on-focus nil) ;; not update on focus change (defvar rttl-update-on-focus t)
;; shell (defvar rttl-shell-default-wait-sec 0) ;; not work?? (defvar rttl-shell-default-wait-millisec 1000) ;; not work?? (defvar rttl-shell-sh (list "/bin/sh" "-c"))
Write 'rttl-set-format' in your ~/.sawfishrc, like the below.
You can put any strings and 'items' in it.
(load "rich-title") (setq rttl-title-interval 1) ;; update every second (rttl-set-format ;; window name (rttl-name-item) " " ;; date & time. As for format string, see 'man strftime'. (rttl-time-item "%m/%d(%a)[%I:%M:%S]") " " ;; check /var/spool/mail/xxxx and show "mail!" or "mail-" accordingly (rttl-biff-item "/var/spool/mail/xxxx" "mail!" "mail-") " " ;; twirling baton :-) (rttl-animation-item '("|" "/" "-" "\\")) " {" ;; invoke a shell command at every 1200 seconds (rttl-timer (rttl-shell-item "df -h | tail +2 | tr -s ' ' | cut -d' ' -f4 | tr '\n' ' '") 1200) "} >" ;; run a shell command on background and watch its output. ;; keep the previous output if no new output is obtained. (rttl-hold (rttl-background-shell-item "tail -f /var/log/messages")) )