- Add support for DEC Private Mode reverse video DECSCNM.
The xterm termcap/terminfo database implement the visual bell
flash feature using this with NUL padding for delay.
- Explicitly ignore NUL padding for now. This is sometimes used
to implement delays.
- For the visual bell to work, implement a timer telling how long
the reversed video should be enabled when it is quickly toggled.
This allows the user to configure the length of the flash.
+- xterm and urxvt appear to set the tty(4) termios ospeed/ispeed so that
+ baudrate be displayed as 38400 by stty(1). Verify what they do, if it
+ serves a purpose and if they observe any delay for NUL character padding at
+ application input. stty's "speed" dispay seems to be ispeed not ospeed.
- Maybe support explicit or implicit login shell mode except for -e
- Now that glyphs can be modified it is obviously a suboptimal method.
General font loading could work, it may be worth checking older standard
https://en.wikipedia.org/wiki/Box-drawing_character
- Overwrite/clear selections before freeing them
- ≣ † ☆ ツ ⌘›🍺∴ ( ͡° ͜ʖ ͡°) ƒ ︵ ₂ 😈 θ ƒ › ʼ ƒ ∂ ʻ μ › ∫ ◇ ♪
- ► ə β ə ſ ρ ə ∴ ♪ 😱 † 😳 ›
+ ► ə β ə ſ ρ ə ∴ ♪ 😱 † 😳 › ▛
- Verify if dead key support is incomplete for ISO-8859-4 and ISO-8859-10.
There were special characters that were unicode since the start but also
could have punctuation. And others that used two at a time... It might
int cfg_color, cfg_monocolor;
bool cfg_mono;
-int cfg_refreshspeed, cfg_blinkspeed, cfg_cursormode;
+int cfg_refreshspeed, cfg_blinkspeed, cfg_cursormode, cfg_flashtime;
bool cfg_cursorblink, cfg_cursordisable, cfg_cursorbright,
cfg_cursorprintreset;
int cfg_intmin, cfg_intstep, cfg_intfg, cfg_intscan, cfg_intbg;
cfg_refreshspeed = REFRESH_SPEED;
cfg_blinkspeed = BLINK_SPEED;
cfg_cursormode = CURSOR_MODE;
+ cfg_flashtime = FLASH_TIME;
cfg_cursorblink = CURSOR_BLINK;
cfg_cursorbright = CURSOR_BRIGHT;
cfg_cursordisable = CURSOR_DISABLE;
/*
+ * Default minimum delay before DEC Private reverse video mode is disabled
+ * when enabled. This is used for the flash of the visual bell.
+ */
+
+#define FLASH_TIME 8
+
+extern int cfg_flashtime;
+
+
+/*
* The XShm extention allows to accelerate graphics when the client is running
* on the same system as the X11 server.
*/
p = (p == 0 ? INTENSITY_DIM : INTENSITY_DIM / 3);
}
+ if (st->reverse_video || st->reverse_video_timer > 0) {
+ if (p < INTENSITY_MIN)
+ p = INTENSITY_MIN;
+ else
+ p = 0;
+ }
+
/*
* Draw pixel or background.
* p serves as a boolean as well as an intensity level from 1
Time time = -1;
struct timeval tv;
+ if (state->reverse_video_timer > 0) {
+ if (--state->reverse_video_timer == 0)
+ state->text_updateall = true;
+ }
+
if (state->blink_update)
draw_blink_update();
if (!state->scroll_slow && refresh_expired)
"\nUsage: %s [-8|-u] [-w <cols>] [-h <rows>] [-E <n>] [-s]\n"
" [-C <color>] [-c] [-W] [-b] [-B <microseconds>] [-P]\n"
" [-m <mode>] [-M] [-d] [-D] [-S] [-p <parameters>]\n"
- " [-l <pixels>] [-e <command> [<arguments>]]\n\n"
+ " [-l <pixels>] [-f <delay>] [-e <command> [<arguments>]]\n\n"
"Where:\n"
" -8 / -u - 8-bit mode (Latin-1), unicode+UTF-8. 8-bit mode is\n"
" automatically enabled by default if the LANG\n"
" -p - Analog scanline parameters. These are described below.\n"
" -l - Add extra leading pixels between lines. This will also\n"
" affect the vertical connectivity of graphics characters.\n"
+ " -f - Number of frames to keep reverse video on for the flash\n"
+ " of the visual bell. May not be visible with 0.\n"
" -e - Execute command and its arguments instead of $SHELL.\n"
" Must be the last AnalogTerm2 argument if used, because\n"
" other arguments will be passed to the command.\n"
cfg_unicode = !locale_8bit();
progname = strdup(argv[0]);
- while ((ch = getopt(argc, argv, "?8uw:h:E:scC:Wr:bB:Pm:MdDSp:l:e:"))
+ while ((ch = getopt(argc, argv, "?8uw:h:E:scC:Wr:bB:Pm:MdDSp:l:f:e:"))
!= -1) {
switch (ch) {
case '8':
if ((i = atoi(optarg)) >= -1 && i <= FONT_HEIGHT)
cfg_leading = i;
break;
+ case 'f':
+ if ((i = atoi(optarg)) >= 0 && i <= 100)
+ cfg_flashtime = i;
+ break;
case 'e':
{
int l;
st->cursor_disabled = false;
st->cursor_bright = cfg_cursorbright;
st->quotedpaste = false;
+ st->reverse_video = false;
+ st->reverse_video_timer = 0;
st->monocolor = cfg_color;
st->mode = 0;
st->scroll_top = 0;
int start, end;
uint32_t uc = (uint32_t)-1;
+ /*
+ * Ignore any input padding.
+ * XXX We may want to delay. If so, verify if it should be
+ * user-defined or check tty(4) for ospeed/ispeed.
+ */
+ if (c == '\0')
+ return;
+
/* Load local shadow variables from master state */
state->mode = st->mode;
state->cursor_x = st->cursor_x;
case 4: /* Smooth (slow) scroll (DECSCLM) */
st->scroll_slow = true;
break;
+ case 5: /* Reverse video (DECSCNM) */
+ st->reverse_video = true;
+ st->reverse_video_timer =
+ cfg_flashtime;
+ st->text_updateall = true;
+ break;
case 12:
case 13: /* FALLTHROUGH
* Start blinking cursor
case 4: /* Fast/jump scroll (DECSCLM) */
st->scroll_slow = false;
break;
+ case 5: /* Normal (vs reverse) vid (DECSCNM) */
+ st->reverse_video = false;
+ st->text_updateall = true;
+ break;
case 6:
/* Normal cursor mode (DECOM cnorm) */
/* User-configured as default */
bool blink_update;
bool cursor_blink, cursor_disabled, cursor_bright;
bool quotedpaste;
+ bool reverse_video;
+ int reverse_video_timer;
int monocolor;
int cursor_mode, cursor_x, cursor_y;
int saved_cursor_x, saved_cursor_y;