fbpad.h: a comment for term.c functions
[fbpad.git] / README
blob9bfa5a3dca053f71721110dc95fb284207257d06
1 FBPAD
2 =====
4 Fbpad is a small linux framebuffer virtual terminal.  It manages many
5 terminals through single-letter tags; each tag can hold two terminals.
6 The following table indicates fbpad's key-bindings (m-k means pressing
7 k, while holding the alt key).
9 ==============  =======================================
10 KEY             COMMAND
11 ==============  =======================================
12 m-c             execute a shell (SHELL)
13 m-m             execute mail program (MAIL)
14 m-e             execute editor program (EDITOR)
15 m-x             switch to tag 'x' (TAGS)
16 m-j             switch to current tag's alternative terminal
17 m-k             like m-j
18 m-p             show tag summary
19 m-o             jump to the previous tag
20 m-tab           show the next terminal
21 m-s             create a text screenshot (SCRSHOT)
22 m-y             redraw the terminal
23 c-m-l           lock the screen; use PASS to unlock
24 c-m-o           disable/enable tag switching
25 c-m-q           quit fbpad
26 m-,             scroll up
27 m-.             scroll down
28 m-=             split tag horizontally/vertically
29 m--             unsplit tag
30 ==============  =======================================
32 To execute only a single program in fbpad, the program and its
33 arguments should be passed as command line arguments of fbpad.  Fbpad
34 executes the specified program in a terminal, disables all terminal
35 switching commands, and exits as soon as the program finishes.
37 Programs like fbpdf, fbvnc, and fbff read the FBDEV environment
38 variable, which can specify the framebuffer device and its drawing
39 region, like "/dev/fb0:1438x448+1+451".  Fbpad defines this
40 environment variable when executing a program, so that if a tag is
41 split, the program running in its terminal is limited to its
42 corresponding framebuffer region.
44 SETTING UP
45 ==========
47 To configure fbpad, you should edit conf.h.  To get fbpad running you
48 need to make sure FR points to a valid fbpad font (for testing you can
49 try http://litcave.rudi.ir/courr.tf) and SHELL to the shell you want
50 fbpad to execute.  Once these are set, you should be able to start
51 fbpad without problems.
53 Fbpad fonts can be generated using fbpad_mkfn program
54 (http://litcave.rudi.ir/).  The FR, FI, and FB macros specify the path
55 of fbpad fonts for regular, italic, and bold fonts.  If FI or FB is
56 NULL, the regular font is used for italic or bold text.
58 Next, you may want to change the list of fbpad tags by changing TAGS.
59 FGCOLOR and BGCOLOR macros specify foreground and background colors,
60 for instance the FGCOLOR of 2 and BGCOLOR of 0 creates green on black
61 terminals.  Individual colors can be customized by editing the hex RGB
62 color description of COLOR* macros.  Also SCRSHOT macro specifies where
63 fbpad text screenshots, created by "m-s" command, must be saved.
65 If you want to use fbpad's scrsnap feature, you can edit TAGS_SAVED to
66 change the list of saved terminals.  Framebuffer memory is saved and
67 reloaded for these tags, which is very convenient when you are using
68 programs that change the framebuffer simultaneously, like fbpdf.
71 256-COLOR MODE
72 ==============
74 Fbpad supports xterm's 256-color extension, but most programs will not
75 use this extension, unless the $TERM terminfo entry declares this
76 feature.  For this purpose, fbpad-256 terminfo file can be created to
77 contain (the two-space identation should be ignored):
79   fbpad-256,
80         use=linux, U8#0,
81         colors#256,
82         pairs#32767,
83         setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
84         setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
86 Which can be installed with tic command:
88   $ tic -x ./fbpad-256
90 The following line should be added to shell's startup script:
92   export TERM=fbpad-256
94 Note that in order to use this feature and italic fonts in Vim, adding
95 fbpad-256 terminfo is not necessary.  Including the following lines in
96 the vimrc file should enable them:
98   set t_ZH=\e[3m
99   set t_Co=256