fbpad.git
21 months agoterm: enable switching signals using the second argument of term_exec()master
Ali Gholami Rudi [Fri, 12 Aug 2022 08:04:55 +0000 (12 12:34 +0430)]
term: enable switching signals using the second argument of term_exec()

Before this change, term_signal() did that.  Also, now TERM_PGID is
defined only if switching signals are enabled.

21 months agoterm: define TERM_PGID environment variable
Ali Gholami Rudi [Fri, 12 Aug 2022 07:40:12 +0000 (12 12:10 +0430)]
term: define TERM_PGID environment variable

TERM_PGID indicates the process group of the main program run in a
terminal.  Fbpad sends terminal switching signals to this process
group.

21 months agoterm: send signals to terminal's process group
Ali Gholami Rudi [Thu, 11 Aug 2022 22:09:05 +0000 (12 02:39 +0430)]
term: send signals to terminal's process group

21 months agoREADME: briefly mention m-;
Ali Gholami Rudi [Thu, 11 Aug 2022 11:37:51 +0000 (11 16:07 +0430)]
README: briefly mention m-;

21 months agoterm: reset term->signal in term_zero()
Ali Gholami Rudi [Sat, 30 Jul 2022 09:38:26 +0000 (30 14:08 +0430)]
term: reset term->signal in term_zero()

21 months agofbpad: send signals when switching to m-; terminals
Ali Gholami Rudi [Wed, 27 Jul 2022 14:59:36 +0000 (27 19:29 +0430)]
fbpad: send signals when switching to m-; terminals

When a shell is executed with m-;, fbpad sends SIGUSR1 when switching
from that terminal, and SIGUSR2 when switching to it.  This is useful,
for instance, for fbvnc.

21 months agoterm: VT100 SU and SD escape sequences
Ali Gholami Rudi [Wed, 27 Jul 2022 13:48:13 +0000 (27 18:18 +0430)]
term: VT100 SU and SD escape sequences

2 years agofbpad.h: a comment for term.c functions
Ali Gholami Rudi [Sat, 15 Jan 2022 20:04:58 +0000 (15 23:34 +0330)]
fbpad.h: a comment for term.c functions

2 years agoterm: fix off-by-one term->dirty access in candraw()
Ali Gholami Rudi [Sat, 15 Jan 2022 20:03:21 +0000 (15 23:33 +0330)]
term: fix off-by-one term->dirty access in candraw()

Reported and tested by k.melekhin@gmail.com (Kyryl Melekhin).

2 years agoterm: do not call screen_move() in resizeupdate()
Ali Gholami Rudi [Fri, 14 Jan 2022 15:00:15 +0000 (14 18:30 +0330)]
term: do not call screen_move() in resizeupdate()

2 years agopad: allocate glyph cache dynamically in pad_init()
Ali Gholami Rudi [Thu, 13 Jan 2022 08:45:35 +0000 (13 12:15 +0330)]
pad: allocate glyph cache dynamically in pad_init()

2 years agoterm: move term struct to term.c
Ali Gholami Rudi [Thu, 13 Jan 2022 08:43:58 +0000 (13 12:13 +0330)]
term: move term struct to term.c

Suggested by k.melekhin@gmail.com (Kyryl Melekhin).

2 years agofbpad: pass FBDEV environment variable to fb_init()
Ali Gholami Rudi [Sat, 27 Nov 2021 20:01:33 +0000 (27 23:31 +0330)]
fbpad: pass FBDEV environment variable to fb_init()

2 years agoterm: clean up resizeupdate()
Ali Gholami Rudi [Fri, 29 Oct 2021 09:14:41 +0000 (29 12:44 +0330)]
term: clean up resizeupdate()

2 years agofbpad: extract t_hide() and t_show() from the old fterm_switch()
Ali Gholami Rudi [Fri, 29 Oct 2021 00:11:00 +0000 (29 03:41 +0330)]
fbpad: extract t_hide() and t_show() from the old fterm_switch()

2 years agoconf.h: use tabs in TERM macro definition
Ali Gholami Rudi [Fri, 29 Oct 2021 00:08:31 +0000 (29 03:38 +0330)]
conf.h: use tabs in TERM macro definition

2 years agofbpad: split the screen at row and column boundaries
Ali Gholami Rudi [Thu, 28 Oct 2021 13:18:20 +0000 (28 16:48 +0330)]
fbpad: split the screen at row and column boundaries

2 years agopad: call fb_val() for border color in pad_border()
Ali Gholami Rudi [Mon, 25 Oct 2021 17:55:12 +0000 (25 21:25 +0330)]
pad: call fb_val() for border color in pad_border()

2 years agofbpad: define macros for terminal border width and color
Ali Gholami Rudi [Mon, 25 Oct 2021 14:58:45 +0000 (25 18:28 +0330)]
fbpad: define macros for terminal border width and color

2 years agofbpad: update tag summary colors
Ali Gholami Rudi [Fri, 22 Oct 2021 09:57:43 +0000 (22 13:27 +0330)]
fbpad: update tag summary colors

2 years agopad: call fb_val() for border color in pad_border()
Ali Gholami Rudi [Thu, 21 Oct 2021 20:41:36 +0000 (22 00:11 +0330)]
pad: call fb_val() for border color in pad_border()

2 years agofbpad: limit tag summary output length
Ali Gholami Rudi [Thu, 21 Oct 2021 12:08:24 +0000 (21 15:38 +0330)]
fbpad: limit tag summary output length

2 years agoREADME: improve the explanation of executing a single program
Ali Gholami Rudi [Thu, 21 Oct 2021 11:24:52 +0000 (21 14:54 +0330)]
README: improve the explanation of executing a single program

2 years agoterm: remove the MAXENV macro
Ali Gholami Rudi [Thu, 21 Oct 2021 03:44:22 +0000 (21 07:14 +0330)]
term: remove the MAXENV macro

2 years agoterm: update the screen when resized
Ali Gholami Rudi [Wed, 20 Oct 2021 22:24:35 +0000 (21 01:54 +0330)]
term: update the screen when resized

2 years agopad: increase border buffer length by two pixels
Ali Gholami Rudi [Wed, 20 Oct 2021 09:48:23 +0000 (20 13:18 +0330)]
pad: increase border buffer length by two pixels

2 years agofbpad: always switch to aterm() before split commands
Ali Gholami Rudi [Wed, 20 Oct 2021 07:23:40 +0000 (20 10:53 +0330)]
fbpad: always switch to aterm() before split commands

2 years agofbpad: redraw both terminals in split command
Ali Gholami Rudi [Wed, 20 Oct 2021 06:49:16 +0000 (20 10:19 +0330)]
fbpad: redraw both terminals in split command

2 years agoREADME: mention the FBDEV environment variable
Ali Gholami Rudi [Wed, 20 Oct 2021 06:11:18 +0000 (20 09:41 +0330)]
README: mention the FBDEV environment variable

2 years agofbpad: save and load only when not both terminals are visible
Ali Gholami Rudi [Wed, 20 Oct 2021 06:09:09 +0000 (20 09:39 +0330)]
fbpad: save and load only when not both terminals are visible

2 years agoconf.h: FBDEV macro is no longer necessary
Ali Gholami Rudi [Wed, 20 Oct 2021 06:07:57 +0000 (20 09:37 +0330)]
conf.h: FBDEV macro is no longer necessary

2 years agopad: optimize initializing FB buffers
Ali Gholami Rudi [Tue, 19 Oct 2021 19:33:44 +0000 (19 23:03 +0330)]
pad: optimize initializing FB buffers

2 years agofbpad: rename fterm_next to nterm
Ali Gholami Rudi [Tue, 19 Oct 2021 19:31:58 +0000 (19 23:01 +0330)]
fbpad: rename fterm_next to nterm

2 years agoREADME: mention keys for splitting the screen
Ali Gholami Rudi [Tue, 19 Oct 2021 17:07:56 +0000 (19 20:37 +0330)]
README: mention keys for splitting the screen

2 years agoterm: define FBDEV environment variable for each terminal
Ali Gholami Rudi [Tue, 19 Oct 2021 17:07:23 +0000 (19 20:37 +0330)]
term: define FBDEV environment variable for each terminal

2 years agodraw: support drawing region
Ali Gholami Rudi [Tue, 19 Oct 2021 16:17:21 +0000 (19 19:47 +0330)]
draw: support drawing region

2 years agofbpad: support splitting the screen
Ali Gholami Rudi [Tue, 19 Oct 2021 10:40:04 +0000 (19 14:10 +0330)]
fbpad: support splitting the screen

2 years agopad: fbval_t is no longer necessary
Ali Gholami Rudi [Tue, 19 Oct 2021 11:04:44 +0000 (19 14:34 +0330)]
pad: fbval_t is no longer necessary

2 years agoMakefile: make it more portable
Ali Gholami Rudi [Tue, 19 Oct 2021 10:40:52 +0000 (19 14:10 +0330)]
Makefile: make it more portable

3 years agoterm: fix copying environment in envcpy
aronpaulson [Sun, 18 Oct 2020 17:48:44 +0000 (18 17:48 +0000)]
term: fix copying environment in envcpy

envcpy(...) does not copy environ since memcmp() signals success by
returning 0 which means 'false' in C (and incrementing a local
variable at the end of a block has probably no effect).

3 years agoterm: copy environ in envcpy()
Ali Gholami Rudi [Wed, 19 Aug 2020 21:51:38 +0000 (20 02:21 +0430)]
term: copy environ in envcpy()

3 years agoterm: do not add a duplicate entry to environ for TERM
Ali Gholami Rudi [Wed, 19 Aug 2020 21:40:30 +0000 (20 02:10 +0430)]
term: do not add a duplicate entry to environ for TERM

Reported by Kjell Hoffhenke <kjell@hoffhenke.de>.

5 years agoterm: make TERM environment variable configurable
Richard Mörbitz [Fri, 20 Oct 2017 22:16:25 +0000 (21 00:16 +0200)]
term: make TERM environment variable configurable

The TERM environment variable can be set in the config now (default
remains `linux`). Thus, it is no longer necessary to add export
statements to your shell rc files.

6 years agoterm: ignore movements beyond the scrolling region
Ali Gholami Rudi [Wed, 7 Mar 2018 13:27:30 +0000 (7 16:57 +0330)]
term: ignore movements beyond the scrolling region

6 years agofbpad: switch to ISC
Ali Gholami Rudi [Tue, 20 Feb 2018 20:23:08 +0000 (20 23:53 +0330)]
fbpad: switch to ISC

6 years agofbpad: do not re-register signal handlers
Ali Gholami Rudi [Sun, 13 Aug 2017 14:55:43 +0000 (13 19:25 +0430)]
fbpad: do not re-register signal handlers

The problem was that sometimes the signals were missed and this
patch fixes that.

Reported and tested by linus krom <linusk86@gmail.com>.

8 years agoterm: brighten bold text based on the value of BRIGHTEN
Ali Gholami Rudi [Sun, 8 May 2016 20:12:26 +0000 (9 00:42 +0430)]
term: brighten bold text based on the value of BRIGHTEN

Tested by ShadowKyogre <shadowkyogre.public@gmail.com>.

8 years agoterm: brighten bold text when bold font is missing
Ali Gholami Rudi [Sat, 7 May 2016 16:07:23 +0000 (7 20:37 +0430)]
term: brighten bold text when bold font is missing

Suggested and tested by ShadowKyogre <shadowkyogre.public@gmail.com>.
He also provided a preliminary patch and the present patch is the
result of our discussions.  It brightens bold text in colours
0 through 7, only when the bold font is missing, and only for \e[3Xm
escape sequences.

8 years agoMakefile: update object files when conf.h changes
Ali Gholami Rudi [Sat, 30 Apr 2016 20:02:09 +0000 (1 00:32 +0430)]
Makefile: update object files when conf.h changes

8 years agoterm: allow specifying truecolors with escape codes
ShadowKyogre [Fri, 29 Apr 2016 20:32:48 +0000 (29 13:32 -0700)]
term: allow specifying truecolors with escape codes

8 years agofbpad: rename config.h to conf.h
Ali Gholami Rudi [Fri, 29 Apr 2016 19:54:13 +0000 (30 00:24 +0430)]
fbpad: rename config.h to conf.h

8 years agopad: allow specifying colours in RGB
Ali Gholami Rudi [Fri, 29 Apr 2016 19:36:52 +0000 (30 00:06 +0430)]
pad: allow specifying colours in RGB

Suggested by ShadowKyogre <shadowkyogre.public@gmail.com>.

8 years agoterm: "\x9b" is an alias for "\x1b["
Ali Gholami Rudi [Wed, 27 Apr 2016 20:34:58 +0000 (28 01:04 +0430)]
term: "\x9b" is an alias for "\x1b["

8 years agopad: colors with a zero component in 256 color palette
ShadowKyogre [Mon, 25 Apr 2016 15:38:13 +0000 (25 20:08 +0430)]
pad: colors with a zero component in 256 color palette

8 years agoREADME: replace ft2tf with fbpad_mkfn
Ali Gholami Rudi [Sun, 7 Feb 2016 12:27:51 +0000 (7 15:57 +0330)]
README: replace ft2tf with fbpad_mkfn

9 years agopad: make pad_font() more compact
Ali Gholami Rudi [Thu, 19 Feb 2015 19:46:48 +0000 (19 23:16 +0330)]
pad: make pad_font() more compact

9 years agofbpad: call fb_init() in fbpad.c
Ali Gholami Rudi [Fri, 13 Feb 2015 09:50:37 +0000 (13 13:20 +0330)]
fbpad: call fb_init() in fbpad.c

9 years agodraw: clean up draw.h interface
Ali Gholami Rudi [Mon, 22 Dec 2014 12:01:12 +0000 (22 15:31 +0330)]
draw: clean up draw.h interface

The changes are as follows: fb_init() takes the framebuffer device
as an argument, fb_set() is no longer defined in draw.c, and the order
of framebuffer colors are included in fb_mode().

9 years agoscrsnap: clean up scr_snap() and scr_load()
Ali Gholami Rudi [Sun, 21 Dec 2014 13:46:20 +0000 (21 17:16 +0330)]
scrsnap: clean up scr_snap() and scr_load()

9 years agoscrsnap: allocate memory for snapshots only when needed
Ali Gholami Rudi [Sun, 21 Dec 2014 13:10:06 +0000 (21 16:40 +0330)]
scrsnap: allocate memory for snapshots only when needed

9 years agofont: more comments
Ali Gholami Rudi [Mon, 3 Nov 2014 10:19:46 +0000 (3 13:49 +0330)]
font: more comments

9 years agoterm: inline MODE_DEFAULT
Ali Gholami Rudi [Mon, 3 Nov 2014 09:53:34 +0000 (3 13:23 +0330)]
term: inline MODE_DEFAULT

9 years agopad: GCPOS() no longer used
Ali Gholami Rudi [Sun, 2 Nov 2014 20:12:37 +0000 (2 23:42 +0330)]
pad: GCPOS() no longer used

9 years agopad: improve glyph bitmap caching
Ali Gholami Rudi [Sun, 2 Nov 2014 17:49:24 +0000 (2 21:19 +0330)]
pad: improve glyph bitmap caching

9 years agofbpad: prevent tag switching with c-m-o
Ali Gholami Rudi [Sun, 2 Nov 2014 17:43:46 +0000 (2 21:13 +0330)]
fbpad: prevent tag switching with c-m-o

9 years agoisdw: Supplementary Ideographic Plane is double-width
Felix Janda [Sun, 31 Aug 2014 08:50:07 +0000 (31 10:50 +0200)]
isdw: Supplementary Ideographic Plane is double-width

10 years agoREADME: mention courr.tf on litcave for testing
Ali Gholami Rudi [Fri, 6 Dec 2013 15:43:42 +0000 (6 19:13 +0330)]
README: mention courr.tf on litcave for testing

10 years agoterm: redraw the curser after set/reset mode (SM/RM)
Ali Gholami Rudi [Sun, 3 Nov 2013 13:48:13 +0000 (3 17:18 +0330)]
term: redraw the curser after set/reset mode (SM/RM)

10 years agofbpad: cast the return value to unsigned char in readchar()
Ali Gholami Rudi [Sat, 28 Sep 2013 15:21:53 +0000 (28 18:51 +0330)]
fbpad: cast the return value to unsigned char in readchar()

10 years agopad: replace pad_blank() and pad_blankrow() with pad_fill()
Ali Gholami Rudi [Mon, 23 Sep 2013 15:28:39 +0000 (23 18:58 +0330)]
pad: replace pad_blank() and pad_blankrow() with pad_fill()

This also changes _draw_row(): instead of filling each row with the
background color and skipping blank columns, _draw_row() now merges
following blank columns and calls pad_fill() once for each
set of these columns.

10 years agoterm: replace term_hist() with term_scrl()
Ali Gholami Rudi [Thu, 19 Sep 2013 09:48:05 +0000 (19 14:18 +0430)]
term: replace term_hist() with term_scrl()

10 years agofbpad: do not redraw the whole screen if it was already visible
Ali Gholami Rudi [Thu, 19 Sep 2013 05:33:01 +0000 (19 10:03 +0430)]
fbpad: do not redraw the whole screen if it was already visible

10 years agofbpad: use FGCOLOR in tag summary
Ali Gholami Rudi [Wed, 18 Sep 2013 15:38:03 +0000 (18 20:08 +0430)]
fbpad: use FGCOLOR in tag summary

10 years agoterm: stay in lazy mode for hidden terms
Ali Gholami Rudi [Wed, 18 Sep 2013 14:50:51 +0000 (18 19:20 +0430)]
term: stay in lazy mode for hidden terms

10 years agopad: replace FN_C() with FN_C mask
Ali Gholami Rudi [Wed, 18 Sep 2013 14:44:42 +0000 (18 19:14 +0430)]
pad: replace FN_C() with FN_C mask

10 years agoterm: without FB, emboldening colors 0-7 should increase their intensities
Ali Gholami Rudi [Mon, 16 Sep 2013 15:08:01 +0000 (16 19:38 +0430)]
term: without FB, emboldening colors 0-7 should increase their intensities

10 years agoconfig.h: fix COLOR6 for cyan
Ali Gholami Rudi [Mon, 16 Sep 2013 15:07:36 +0000 (16 19:37 +0430)]
config.h: fix COLOR6 for cyan

10 years agoterm: 256-color support
Ali Gholami Rudi [Sat, 12 Nov 2011 17:43:33 +0000 (12 21:13 +0330)]
term: 256-color support

Most of the credit goes to Sara Fauzia <sfauzia@fas.harvard.edu>.

10 years agoterm: continue reading from pty if more data is available
Ali Gholami Rudi [Thu, 29 Aug 2013 14:08:13 +0000 (29 18:38 +0430)]
term: continue reading from pty if more data is available

10 years agoterm: replace TERM_REDRAW with term_redraw()
Ali Gholami Rudi [Sun, 25 Aug 2013 16:59:06 +0000 (25 21:29 +0430)]
term: replace TERM_REDRAW with term_redraw()

10 years agofbpad: more consistent naming
Ali Gholami Rudi [Sat, 24 Aug 2013 20:41:15 +0000 (25 01:11 +0430)]
fbpad: more consistent naming

10 years agoterm: stop showing the history after term_hist(0)
Ali Gholami Rudi [Sat, 24 Aug 2013 20:37:37 +0000 (25 01:07 +0430)]
term: stop showing the history after term_hist(0)

10 years agofbpad: never draw on the framebuffer when another VT is active
Ali Gholami Rudi [Thu, 15 Aug 2013 11:33:33 +0000 (15 16:03 +0430)]
fbpad: never draw on the framebuffer when another VT is active

10 years agoterm: more efficient management of scrolling history
Ali Gholami Rudi [Wed, 14 Aug 2013 17:03:19 +0000 (14 21:33 +0430)]
term: more efficient management of scrolling history

10 years agoterm: support scrolling history
Ali Gholami Rudi [Fri, 18 May 2012 09:47:48 +0000 (18 14:17 +0430)]
term: support scrolling history

This is based on an older patch on the bold branch which was
suggested and tested by: Sara Fauzia <sfauzia@fas.harvard.edu>.

10 years agofbpad: with an argument, execute a command in a terminal and exit
Ali Gholami Rudi [Tue, 6 Aug 2013 08:13:54 +0000 (6 12:43 +0430)]
fbpad: with an argument, execute a command in a terminal and exit

10 years agoterm: allow specifying command arguments
Ali Gholami Rudi [Tue, 13 Aug 2013 16:52:01 +0000 (13 21:22 +0430)]
term: allow specifying command arguments

11 years agoisdw: add {0x200b, 0x200f} to zwchars
Ali Gholami Rudi [Sun, 28 Apr 2013 11:57:15 +0000 (28 16:27 +0430)]
isdw: add {0x200b, 0x200f} to zwchars

Reported by Felix Janda <felix.janda@posteo.de>.

11 years agofbpad: do not use STD*_FILENO macros for standard unix fds
Ali Gholami Rudi [Thu, 4 Apr 2013 16:00:18 +0000 (4 20:30 +0430)]
fbpad: do not use STD*_FILENO macros for standard unix fds

11 years agoterm: handle fullwidth chars in the last column
Ali Gholami Rudi [Sun, 10 Feb 2013 10:43:36 +0000 (10 14:13 +0330)]
term: handle fullwidth chars in the last column

This handles wrapping double-width characters when inserted in the
last column of the screen.  Felix Janda <felix.janda@posteo.de>
reported this case and prepared a preliminary patch.

Handling fullwidth characters was originally suggested by Sara Fauzia
<sfauzia@fas.harvard.edu> which resulted in a simple patch to simply
ignore these characters in the bold branch.  A recent request and
patch from Felix Janda <felix.janda@posteo.de> motivated me to apply a
modified version to the master branch.

11 years agoterm: fullwidth and zerowidth characters
Ali Gholami Rudi [Fri, 8 Feb 2013 08:36:16 +0000 (8 12:06 +0330)]
term: fullwidth and zerowidth characters

11 years agofbpad.h: merge the headers
Ali Gholami Rudi [Sat, 5 Jan 2013 17:08:49 +0000 (5 20:38 +0330)]
fbpad.h: merge the headers

11 years agoterm: cast characters read from the pty to unsigned char
Ali Gholami Rudi [Sat, 5 Jan 2013 16:46:02 +0000 (5 20:16 +0330)]
term: cast characters read from the pty to unsigned char

11 years agofbpad: call scr_free() for the correct terminal
Ali Gholami Rudi [Wed, 5 Dec 2012 14:42:26 +0000 (5 18:12 +0330)]
fbpad: call scr_free() for the correct terminal

11 years agofbpad: c-m-l locks the screen
Ali Gholami Rudi [Sun, 4 Nov 2012 15:44:16 +0000 (4 19:14 +0330)]
fbpad: c-m-l locks the screen

After this command, fbpad freezes until PASS (specified in config.h)
followed by return is entered.  A NULL PASS disables locking.

11 years agofbpad: remove changing fontsets support
Ali Gholami Rudi [Fri, 27 Jul 2012 07:29:08 +0000 (27 11:59 +0430)]
fbpad: remove changing fontsets support

Judging by the feedback I receive, it seems very few use this
feature.  So I'm removing it to simplify config.h and fbpad.c
and pad.c interactions.

11 years agofbpad: switch to the first font for tag summary
Ali Gholami Rudi [Fri, 29 Jun 2012 03:21:45 +0000 (29 07:51 +0430)]
fbpad: switch to the first font for tag summary

11 years agofbpad: switch to the modified bsd license
Ali Gholami Rudi [Thu, 7 Jun 2012 19:55:22 +0000 (8 00:25 +0430)]
fbpad: switch to the modified bsd license

11 years agopad: call isprint() only for ascii characters
Ali Gholami Rudi [Wed, 30 May 2012 14:56:55 +0000 (30 19:26 +0430)]
pad: call isprint() only for ascii characters

Reported and tested by Sara Fauzia <sfauzia@fas.harvard.edu>.

12 years agoterm: support \33[23m to disable italics
Ali Gholami Rudi [Mon, 7 May 2012 13:35:38 +0000 (7 18:05 +0430)]
term: support \33[23m to disable italics

Reported and tested by Sara Fauzia <sfauzia@fas.harvard.edu>.