Skip to content

Commit

Permalink
dump terminfo shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
michael105 committed Oct 17, 2024
1 parent 873b11e commit 3cf8df7
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ BIND( ShiftMask, XK_Print, printscreen, {.i = 0},ALLMODES ),
BIND( XK_ANY_MOD, XK_Print, printsel, {.i = 0},ALLMODES ),
BIND( TERMMOD, XK_I, inverse_screen, {},ALLMODES ),

BIND(ControlMask|ShiftMask|Mod1Mask|Mod4Mask, XK_I, dump_terminfo, {}, MODE_DEFAULT ),
// Change font size/width
BIND( SETFONTMASK, XK_Page_Up, zoom, {.f = -1},ALLMODES ),
//{ SETFONTMASK, XK_Prior, zoom, {.f = +1},ALLMODES ),
Expand Down
1 change: 1 addition & 0 deletions src/help.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ Less All Up kscrollup \n\r\
Less All q lessmode_toggle \n\r\
Less All space kscrolldown \n\r\
Less Shift Return lessmode_toggle \n\r\
MODE_DEFAULT Control+Shift|Alt|Win I dump_terminfo \n\r\
\n\r\
\n\r\
\n\r\
Expand Down
6 changes: 6 additions & 0 deletions src/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ void temp(const Arg *dummy){
void dummy( const Arg *a){
}

void dump_terminfo( const Arg *a){
#ifdef INCLUDETERMINFO
ttywrite(slterm_terminfo, strlen(slterm_terminfo),1 );
#endif
}




1 change: 1 addition & 0 deletions src/keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ int match(unsigned int mask, unsigned int state);
void ttysend(const Arg *);

void dummy( const Arg *a);
void dump_terminfo( const Arg *a);
1 change: 1 addition & 0 deletions src/keyref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ Less All Up kscrollup
Less All q lessmode_toggle
Less All space kscrolldown
Less Shift Return lessmode_toggle
MODE_DEFAULT Control+Shift|Alt|Win I dump_terminfo
22 changes: 22 additions & 0 deletions src/slterm.1
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,28 @@ copy into the appropiate directory (/usr/local/share/man/man1)
.UNINDENT
.UNINDENT
.UNINDENT
.SS CURSES
.INDENT 0.0
.INDENT 3.5
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 \fItic \-sx slterm.terminfo\fP\&.
Alternatively, the termcap database "linux" seems to be mostly compatible.
Set with export TERM=linux
.sp
The terminfo database of slterm is also displayed, when slterm was compiled with
EMBEDRESOURCES. Type \fIslterm \-I\fP, to install: \fIslterm \-I | tic \-sx \-\fP\&.
The key combination \fICtrl+Shift+Win+ALT+I\fP will dump the terminal info to
the terminal as well, and can be used, to install the terminal info within
a remote shell. ( type \fItic \-sx \-\fP, hit \fICtrl+Shift+Win+Alt+I\fP, and \fICtrl+D\fP )
.sp
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/
.UNINDENT
.UNINDENT
.SH OPTIONS
.INDENT 0.0
.TP
Expand Down

0 comments on commit 3cf8df7

Please sign in to comment.