home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / terminal / sysline-.1 / sysline- / sysline-1.1 / make.termcap-entry < prev    next >
Encoding:
Text File  |  1996-03-13  |  1.3 KB  |  56 lines

  1. #!/bin/sh
  2.  
  3. # make referring termcap entries, one for a status-line on the bottom line,
  4. # and one with the status-line on the top line -- bjd
  5.  
  6. how_many()
  7. {
  8.     echo -en "hardware has how many $1? " >&2
  9.     read answer
  10. }
  11.  
  12. echo >&2
  13. echo "('make.termcap-entry >file' to write output to file)" >&2
  14. echo >&2
  15. how_many "columns"
  16. columns=$answer
  17. how_many "rows   "
  18. rows=$answer
  19. echo >&2
  20.  
  21. cat <<EOT
  22. # ${columns}x${rows} capable of displaying a status-line on the bottom line
  23. # note 1: the names "lx" and "con-unk" might have to be replaced
  24. # note 2: name carries the suffix "-s"
  25. lx|con${columns}x${rows}-s:\\
  26.     :co#${columns}:li#${rows}:\\
  27.     :hs:\\
  28.     :es:\\
  29.     :ts=\E7\E[m\E[%i${rows};%dH\E[1K:\\
  30.     :fs=\E[0K\E8:\\
  31.     :ds=\E7\E[${rows};1H\E[2K\E8:\\
  32.     :i2=\E[1;$((${rows}-1))r\E[H\E[J:\\
  33.     :cs=\E[%i%d;%dr:\\
  34.     :cl=\E[$((${rows}-1));${columns}H\E[1J\E[H:\\
  35.     :cd=\E[K:\\
  36.     :tc=con-unk:
  37.  
  38. # ${columns}x${rows} capable of displaying a status-line on the top line
  39. # note 1: the names "lx" and "con-unk" might have to be replaced
  40. # note 2: name carries the suffix "-top-s"
  41. lx|con${columns}x${rows}-top-s:\\
  42.     :co#${columns}:li#${rows}:\\
  43.     :hs:\\
  44.     :es:\\
  45.     :ts=\E7\E[m\E[%i1;%dH\E[1K:\\
  46.     :fs=\E[0K\E8:\\
  47.     :ds=\E7\E[1;1H\E[2K\E8:\\
  48.     :i2=\E[2;${rows}r\E[2;1H\E[J:\\
  49.     :.cs=\E[2;${rows}r:\\
  50.     :cs=\E[%i%i%d;%dr:\\
  51.     :cl=\E[2;1H\E[J:\\
  52.     :cm=\E[%i%a+c\001%d;%dH:\\
  53.     :ho=\E[2;1H:\\
  54.     :tc=con-unk:
  55. EOT
  56.