martanne / dvtm

dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.
MIT License
854 stars 106 forks source link

Strikethrough #54

Open ghost opened 7 years ago

ghost commented 7 years ago

printf "\e[9mstrikethrough\e[0m\n" works in st doesn't in dvtm

shua commented 6 years ago

Strikethrough text is not currently supported by ncurses attributes

/* attributes */

#define NCURSES_ATTR_SHIFT       8
#define NCURSES_BITS(mask,shift) (NCURSES_CAST(chtype,(mask)) << ((shift) + NCURSES_ATTR_SHIFT))

#define A_NORMAL    (1U - 1U)
#define A_ATTRIBUTES    NCURSES_BITS(~(1U - 1U),0)
#define A_CHARTEXT  (NCURSES_BITS(1U,0) - 1U)
#define A_COLOR     NCURSES_BITS(((1U) << 8) - 1U,0)
#define A_STANDOUT  NCURSES_BITS(1U,8)
#define A_UNDERLINE NCURSES_BITS(1U,9)
#define A_REVERSE   NCURSES_BITS(1U,10)
#define A_BLINK     NCURSES_BITS(1U,11)
#define A_DIM       NCURSES_BITS(1U,12)
#define A_BOLD      NCURSES_BITS(1U,13)
#define A_ALTCHARSET    NCURSES_BITS(1U,14)
#define A_INVIS     NCURSES_BITS(1U,15)
#define A_PROTECT   NCURSES_BITS(1U,16)
#define A_HORIZONTAL    NCURSES_BITS(1U,17)
#define A_LEFT      NCURSES_BITS(1U,18)
#define A_LOW       NCURSES_BITS(1U,19)
#define A_RIGHT     NCURSES_BITS(1U,20)
#define A_TOP       NCURSES_BITS(1U,21)
#define A_VERTICAL  NCURSES_BITS(1U,22)

#if 1
#define A_ITALIC    NCURSES_BITS(1U,23) /* ncurses extension */
#endif

available attributes as per /usr/include/curses.h:1094 (ncurses 6.1)

Thus this is an upstream issue.

ghost commented 6 years ago

Just wondering how st/xterm achieve strike-through... FWIW rxvt-unicode doesn't seem to support this feature either.