Skip to content

Commit

Permalink
docu
Browse files Browse the repository at this point in the history
  • Loading branch information
michael105 committed Oct 17, 2024
1 parent e81d0ad commit c627dc8
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 12 deletions.
2 changes: 1 addition & 1 deletion config.make
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FULLDEBUG := 0


# version
VERSION := 0.99.2
VERSION := 0.99.3

# Set to 1 enable Xresource configuration
# (in addition, slterm has to be started with the option "-x on")
Expand Down
12 changes: 9 additions & 3 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ static unsigned int cursorthickness = 2;
static int bellvolume = 50;

/* default TERM value */
// used also for the identification of the capabilities to curses
// this can be overriden in the shell by exporting a known terminal name,
// e.g.: export TERM=xterm-256color
char *termname = "slterm-256color";

/*
Expand Down Expand Up @@ -218,6 +221,9 @@ static int ignoreselfg = 1;
* 7: Block, and (X)
* 8: double underline
* 9: empty block
* 10: underline with sides
* 11: under- and overline with sides
* 12: overline with sides
*/
unsigned int cursorshape = 4;

Expand Down Expand Up @@ -811,9 +817,9 @@ static uint selmasks[] = {
// There are Umlauts, sz, box drawing chars ( at the places of the cp437 / 850),
// the greek alphabet and several mathematical and logical chars.
// It's what I do need for writing.
// There's a filter for the conversion to and from utf8,
// within tools. (e4, and e42)
// Numbered the cp e4000, according to the rfc's exxx is reserved for private
// There's a filter for the conversion to and from utf8 and between codepages,
// within tools.
// Numbered the cp e4000, according to the rfc's 0xExxxx is reserved for private
// assignments.

// Finally, I created another codepage. Naming this cpe4002a,
Expand Down
2 changes: 1 addition & 1 deletion src/scroll.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void tscrolldown(int orig, int n, int copyhist) {
if ( term->histi == 0 && IS_SET(MODE_ALTSCREEN) ){ //xxx bug patch. alt screen
// else segfaults. reproduce: man man; and scroll with a (now, since this is patched rotfl) unknown combination of commands.
printf("RETURN\n"); // xxx
//return;
//return; // ? strange. no segfaults anymore.
}
//LIMIT(n, 0, term->bot - orig ); //xxx
LIMIT(n, 0, term->bot - orig + 1);
Expand Down
23 changes: 23 additions & 0 deletions src/slterm.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,29 @@ INSTALL
copy into the appropiate directory (/usr/local/share/man/man1)


CURSES
------

To be used with curses, the installation of the terminfo database file is needed.
slterm.terminfo is supplied in the sources, within the folder share.
It can be installed with `tic -sx slterm.terminfo`.
Alternatively, the termcap database "linux" seems to be mostly compatible.
Set with export TERM=linux

The terminfo database of slterm is also displayed, when slterm was compiled with
EMBEDRESOURCES. Type `slterm -I`, to install: `slterm -I | tic -sx -`.
The key combination `Ctrl+Shift+Win+ALT+I` will dump the terminal info to
the terminal as well, and can be used, to install the terminal info within
a remote shell. ( type `tic -sx -`, hit `Ctrl+Shift+Win+Alt+I`, and `Ctrl+D` )


Tic is the terminfo compiler, available from the curses distributions.
There is a statically linked binary for linux, 64bit of tic at
github.com/michael105/static-bin
(125kB, sha3sum: 510f25bdb35c437c0bc28690a6d292f128113144fee93cf37b01381c)
Sources of tic and netbsd curses: github.com/oasislinux/netbsd-curses/


OPTIONS
=======

Expand Down
8 changes: 4 additions & 4 deletions src/slterm.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
slterm| slimterm,
acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssltermtuuvvwwxxyyzz{{||}}~~,
am,
bce,
bel=^G,
Expand Down Expand Up @@ -195,7 +195,7 @@ slterm| slimterm,
Ss=\E[%p1%d q,

slterm-256color| slimterm with 256 colors,
use=st,
use=slterm,
ccc,
colors#256,
oc=\E]104\007,
Expand All @@ -206,15 +206,15 @@ slterm-256color| slimterm with 256 colors,
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,

slterm-meta| slimterm with meta key,
use=st,
use=slterm,
km,
rmm=\E[?1034l,
smm=\E[?1034h,
rs2=\E[4l\E>\E[?1034h,
is2=\E[4l\E>\E[?1034h,

slterm-meta-256color| slimterm with meta key and 256 colors,
use=st-256color,
use=slterm-256color,
km,
rmm=\E[?1034l,
smm=\E[?1034h,
Expand Down
1 change: 1 addition & 0 deletions src/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ size_t ttyread(void) {
return ret;
}

// writes to the terminal / shell
void ttywrite(const utfchar *s, size_t n, int may_echo) {
const utfchar *next;
Arg arg = (Arg){.i = term->scr};
Expand Down
7 changes: 4 additions & 3 deletions test/gray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ gray "Grayscale, #232-255 "
echo
echo

gray "1: "; col 1 0 {255..232}; echo
gray "0: "; col 0 0 {255..232}; echo
gray "2: "; col 2 0 {255..232}; echo
gray "1: "; col 1 0 {255..232}; echo
gray "0: "; col 0 0 {255..232}; echo
gray "1;2: "; col "1;2" 0 {255..232}; echo
gray "2: "; col 2 0 {255..232}; echo

echo

Expand Down

0 comments on commit c627dc8

Please sign in to comment.