Compare commits
19 Commits
feat/boxdr
...
custom
Author | SHA1 | Date | |
---|---|---|---|
0fb63d30a3 | |||
b9f99cf7f1 | |||
e7ca32ef87 | |||
0770075e1a | |||
49dc8002cd | |||
cc2d3a597a | |||
0749fc4857 | |||
539dfd0bac | |||
af62c87aa8 | |||
aa9d16a41b | |||
71d1f725b3 | |||
fb7383d52f | |||
3a32e68b82 | |||
a8d62fe07b | |||
4bb9184a41 | |||
6e60af80d8 | |||
83fff50fa0 | |||
f2d4bbdbea | |||
9d89b6a5d0 |
132
config.def.h
132
config.def.h
@ -8,6 +8,20 @@
|
|||||||
static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
|
static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
|
||||||
static int borderpx = 2;
|
static int borderpx = 2;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Override/adjust fontsize of choosen monitors:
|
||||||
|
*/
|
||||||
|
MonitorConfig monitors_config[] = {
|
||||||
|
// skip = fixed relative points size (monitor dpi)
|
||||||
|
// =0 : fixed absolute pixel size (default screen dpi)
|
||||||
|
// >0 : auto absolute pixel size (monitor dpi)
|
||||||
|
// <0 : auto relative points size (monitor dpi)
|
||||||
|
// {"DP-1", 0}, // BUG:(size=0): not restored to default after back'n'forth
|
||||||
|
{"HDMI-0~1", -20}, // BUG:(ignored DPI=220): = 20 is eqv to 10pt (DPI=110)
|
||||||
|
{"HDMI-0~2", -14},
|
||||||
|
};
|
||||||
|
float winmovethreshold = 0.6;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* What program is execed by st depends of these precedence rules:
|
* What program is execed by st depends of these precedence rules:
|
||||||
* 1: program passed with -e
|
* 1: program passed with -e
|
||||||
@ -56,6 +70,12 @@ int allowwindowops = 0;
|
|||||||
static double minlatency = 8;
|
static double minlatency = 8;
|
||||||
static double maxlatency = 33;
|
static double maxlatency = 33;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Synchronized-Update timeout in ms
|
||||||
|
* https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec
|
||||||
|
*/
|
||||||
|
static uint su_timeout = 200;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
|
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
|
||||||
* attribute.
|
* attribute.
|
||||||
@ -105,35 +125,30 @@ char *termname = "st-256color";
|
|||||||
*/
|
*/
|
||||||
unsigned int tabspaces = 8;
|
unsigned int tabspaces = 8;
|
||||||
|
|
||||||
|
/* bg opacity */
|
||||||
|
float alpha = 0.8;
|
||||||
|
|
||||||
/* Terminal colors (16 first used in escape sequence) */
|
/* Terminal colors (16 first used in escape sequence) */
|
||||||
static const char *colorname[] = {
|
static const char *colorname[] = {
|
||||||
/* 8 normal colors */
|
/* 8 normal colors */
|
||||||
"black",
|
[0] = "#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */
|
||||||
"red3",
|
[1] = "#cc241d", /* red */
|
||||||
"green3",
|
[2] = "#98971a", /* green */
|
||||||
"yellow3",
|
[3] = "#d79921", /* yellow */
|
||||||
"blue2",
|
[4] = "#458588", /* blue */
|
||||||
"magenta3",
|
[5] = "#b16286", /* magenta */
|
||||||
"cyan3",
|
[6] = "#689d6a", /* cyan */
|
||||||
"gray90",
|
[7] = "#a89984", /* white */
|
||||||
|
|
||||||
/* 8 bright colors */
|
/* 8 bright colors */
|
||||||
"gray50",
|
[8] = "#928374", /* black */
|
||||||
"red",
|
[9] = "#fb4934", /* red */
|
||||||
"green",
|
[10] = "#b8bb26", /* green */
|
||||||
"yellow",
|
[11] = "#fabd2f", /* yellow */
|
||||||
"#5c5cff",
|
[12] = "#83a598", /* blue */
|
||||||
"magenta",
|
[13] = "#d3869b", /* magenta */
|
||||||
"cyan",
|
[14] = "#8ec07c", /* cyan */
|
||||||
"white",
|
[15] = "#ebdbb2", /* white */
|
||||||
|
|
||||||
[255] = 0,
|
|
||||||
|
|
||||||
/* more colors can be added after 255 to use with DefaultXX */
|
|
||||||
"#cccccc",
|
|
||||||
"#555555",
|
|
||||||
"gray90", /* default foreground colour */
|
|
||||||
"black", /* default background colour */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -141,9 +156,9 @@ static const char *colorname[] = {
|
|||||||
* Default colors (colorname index)
|
* Default colors (colorname index)
|
||||||
* foreground, background, cursor, reverse cursor
|
* foreground, background, cursor, reverse cursor
|
||||||
*/
|
*/
|
||||||
unsigned int defaultfg = 258;
|
unsigned int defaultfg = 15;
|
||||||
unsigned int defaultbg = 259;
|
unsigned int defaultbg = 0;
|
||||||
unsigned int defaultcs = 256;
|
unsigned int defaultcs = 15;
|
||||||
static unsigned int defaultrcs = 257;
|
static unsigned int defaultrcs = 257;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -182,6 +197,42 @@ static unsigned int defaultattr = 11;
|
|||||||
*/
|
*/
|
||||||
static uint forcemousemod = ShiftMask;
|
static uint forcemousemod = ShiftMask;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Xresources preferences to load at startup
|
||||||
|
*/
|
||||||
|
ResourcePref resources[] = {
|
||||||
|
{ "font", STRING, &font },
|
||||||
|
{ "color0", STRING, &colorname[0] },
|
||||||
|
{ "color1", STRING, &colorname[1] },
|
||||||
|
{ "color2", STRING, &colorname[2] },
|
||||||
|
{ "color3", STRING, &colorname[3] },
|
||||||
|
{ "color4", STRING, &colorname[4] },
|
||||||
|
{ "color5", STRING, &colorname[5] },
|
||||||
|
{ "color6", STRING, &colorname[6] },
|
||||||
|
{ "color7", STRING, &colorname[7] },
|
||||||
|
{ "color8", STRING, &colorname[8] },
|
||||||
|
{ "color9", STRING, &colorname[9] },
|
||||||
|
{ "color10", STRING, &colorname[10] },
|
||||||
|
{ "color11", STRING, &colorname[11] },
|
||||||
|
{ "color12", STRING, &colorname[12] },
|
||||||
|
{ "color13", STRING, &colorname[13] },
|
||||||
|
{ "color14", STRING, &colorname[14] },
|
||||||
|
{ "color15", STRING, &colorname[15] },
|
||||||
|
{ "background", STRING, &colorname[256] },
|
||||||
|
{ "foreground", STRING, &colorname[257] },
|
||||||
|
{ "cursorColor", STRING, &colorname[258] },
|
||||||
|
{ "termname", STRING, &termname },
|
||||||
|
{ "shell", STRING, &shell },
|
||||||
|
{ "minlatency", INTEGER, &minlatency },
|
||||||
|
{ "maxlatency", INTEGER, &maxlatency },
|
||||||
|
{ "blinktimeout", INTEGER, &blinktimeout },
|
||||||
|
{ "bellvolume", INTEGER, &bellvolume },
|
||||||
|
{ "tabspaces", INTEGER, &tabspaces },
|
||||||
|
{ "borderpx", INTEGER, &borderpx },
|
||||||
|
{ "cwscale", FLOAT, &cwscale },
|
||||||
|
{ "chscale", FLOAT, &chscale },
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Internal mouse shortcuts.
|
* Internal mouse shortcuts.
|
||||||
* Beware that overloading Button1 will disable the selection.
|
* Beware that overloading Button1 will disable the selection.
|
||||||
@ -208,11 +259,14 @@ static Shortcut shortcuts[] = {
|
|||||||
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
|
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
|
||||||
{ TERMMOD, XK_Next, zoom, {.f = -1} },
|
{ TERMMOD, XK_Next, zoom, {.f = -1} },
|
||||||
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
|
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
|
||||||
|
{ TERMMOD, XK_End, refreshxrandr, {.i = 0} },
|
||||||
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
|
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
|
||||||
{ TERMMOD, XK_V, clippaste, {.i = 0} },
|
{ TERMMOD, XK_V, clippaste, {.i = 0} },
|
||||||
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
|
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
|
||||||
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
||||||
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
|
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
|
||||||
|
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
|
||||||
|
{ ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -484,3 +538,27 @@ static char ascii_printable[] =
|
|||||||
" !\"#$%&'()*+,-./0123456789:;<=>?"
|
" !\"#$%&'()*+,-./0123456789:;<=>?"
|
||||||
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
|
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
|
||||||
"`abcdefghijklmnopqrstuvwxyz{|}~";
|
"`abcdefghijklmnopqrstuvwxyz{|}~";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Undercurl style. Set UNDERCURL_STYLE to one of the available styles.
|
||||||
|
*
|
||||||
|
* Curly: Dunno how to draw it *shrug*
|
||||||
|
* _ _ _ _
|
||||||
|
* ( ) ( ) ( ) ( )
|
||||||
|
* (_) (_) (_) (_)
|
||||||
|
*
|
||||||
|
* Spiky:
|
||||||
|
* /\ /\ /\ /\
|
||||||
|
* \/ \/ \/
|
||||||
|
*
|
||||||
|
* Capped:
|
||||||
|
* _ _ _
|
||||||
|
* / \ / \ / \
|
||||||
|
* \_/ \_/
|
||||||
|
*/
|
||||||
|
// Available styles
|
||||||
|
#define UNDERCURL_CURLY 0
|
||||||
|
#define UNDERCURL_SPIKY 1
|
||||||
|
#define UNDERCURL_CAPPED 2
|
||||||
|
// Active style
|
||||||
|
#define UNDERCURL_STYLE UNDERCURL_SPIKY
|
||||||
|
@ -17,10 +17,11 @@ INCS = -I$(X11INC) \
|
|||||||
`$(PKG_CONFIG) --cflags fontconfig` \
|
`$(PKG_CONFIG) --cflags fontconfig` \
|
||||||
`$(PKG_CONFIG) --cflags freetype2` \
|
`$(PKG_CONFIG) --cflags freetype2` \
|
||||||
`$(PKG_CONFIG) --cflags harfbuzz`
|
`$(PKG_CONFIG) --cflags harfbuzz`
|
||||||
LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
|
LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXrender\
|
||||||
`$(PKG_CONFIG) --libs fontconfig` \
|
`$(PKG_CONFIG) --libs fontconfig` \
|
||||||
`$(PKG_CONFIG) --libs freetype2` \
|
`$(PKG_CONFIG) --libs freetype2`
|
||||||
`$(PKG_CONFIG) --libs harfbuzz`
|
|
||||||
|
LIBS += -lXrandr
|
||||||
|
|
||||||
# flags
|
# flags
|
||||||
STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
|
STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
|
||||||
|
31
st.h
31
st.h
@ -23,19 +23,22 @@
|
|||||||
|
|
||||||
enum glyph_attribute {
|
enum glyph_attribute {
|
||||||
ATTR_NULL = 0,
|
ATTR_NULL = 0,
|
||||||
ATTR_BOLD = 1 << 0,
|
ATTR_SET = 1 << 0,
|
||||||
ATTR_FAINT = 1 << 1,
|
ATTR_BOLD = 1 << 1,
|
||||||
ATTR_ITALIC = 1 << 2,
|
ATTR_FAINT = 1 << 2,
|
||||||
ATTR_UNDERLINE = 1 << 3,
|
ATTR_ITALIC = 1 << 3,
|
||||||
ATTR_BLINK = 1 << 4,
|
ATTR_UNDERLINE = 1 << 4,
|
||||||
ATTR_REVERSE = 1 << 5,
|
ATTR_BLINK = 1 << 5,
|
||||||
ATTR_INVISIBLE = 1 << 6,
|
ATTR_REVERSE = 1 << 6,
|
||||||
ATTR_STRUCK = 1 << 7,
|
ATTR_INVISIBLE = 1 << 7,
|
||||||
ATTR_WRAP = 1 << 8,
|
ATTR_STRUCK = 1 << 8,
|
||||||
ATTR_WIDE = 1 << 9,
|
ATTR_WRAP = 1 << 9,
|
||||||
ATTR_WDUMMY = 1 << 10,
|
ATTR_WIDE = 1 << 10,
|
||||||
|
ATTR_WDUMMY = 1 << 11,
|
||||||
ATTR_BOXDRAW = 1 << 11,
|
ATTR_BOXDRAW = 1 << 11,
|
||||||
|
ATTR_SELECTED = 1 << 12,
|
||||||
ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT,
|
ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT,
|
||||||
|
ATTR_DIRTYUNDERLINE = 1 << 15,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum drawing_mode {
|
enum drawing_mode {
|
||||||
@ -73,6 +76,8 @@ typedef struct {
|
|||||||
ushort mode; /* attribute flags */
|
ushort mode; /* attribute flags */
|
||||||
uint32_t fg; /* foreground */
|
uint32_t fg; /* foreground */
|
||||||
uint32_t bg; /* background */
|
uint32_t bg; /* background */
|
||||||
|
int ustyle; /* underline style */
|
||||||
|
int ucolor[3]; /* underline color */
|
||||||
} Glyph;
|
} Glyph;
|
||||||
|
|
||||||
typedef Glyph *Line;
|
typedef Glyph *Line;
|
||||||
@ -89,6 +94,8 @@ void die(const char *, ...);
|
|||||||
void redraw(void);
|
void redraw(void);
|
||||||
void draw(void);
|
void draw(void);
|
||||||
|
|
||||||
|
void kscrolldown(const Arg *);
|
||||||
|
void kscrollup(const Arg *);
|
||||||
void printscreen(const Arg *);
|
void printscreen(const Arg *);
|
||||||
void printsel(const Arg *);
|
void printsel(const Arg *);
|
||||||
void sendbreak(const Arg *);
|
void sendbreak(const Arg *);
|
||||||
@ -96,6 +103,7 @@ void toggleprinter(const Arg *);
|
|||||||
|
|
||||||
int tattrset(int);
|
int tattrset(int);
|
||||||
void tnew(int, int);
|
void tnew(int, int);
|
||||||
|
int tisaltscreen(void);
|
||||||
void tresize(int, int);
|
void tresize(int, int);
|
||||||
void tsetdirtattr(int);
|
void tsetdirtattr(int);
|
||||||
void ttyhangup(void);
|
void ttyhangup(void);
|
||||||
@ -141,3 +149,4 @@ extern unsigned int defaultfg;
|
|||||||
extern unsigned int defaultbg;
|
extern unsigned int defaultbg;
|
||||||
extern unsigned int defaultcs;
|
extern unsigned int defaultcs;
|
||||||
extern const int boxdraw, boxdraw_bold, boxdraw_braille;
|
extern const int boxdraw, boxdraw_bold, boxdraw_braille;
|
||||||
|
extern float alpha;
|
||||||
|
2
st.info
2
st.info
@ -1,4 +1,5 @@
|
|||||||
st-mono| simpleterm monocolor,
|
st-mono| simpleterm monocolor,
|
||||||
|
Su,
|
||||||
acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
|
acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
|
||||||
am,
|
am,
|
||||||
bce,
|
bce,
|
||||||
@ -191,6 +192,7 @@ st-mono| simpleterm monocolor,
|
|||||||
Ms=\E]52;%p1%s;%p2%s\007,
|
Ms=\E]52;%p1%s;%p2%s\007,
|
||||||
Se=\E[2 q,
|
Se=\E[2 q,
|
||||||
Ss=\E[%p1%d q,
|
Ss=\E[%p1%d q,
|
||||||
|
Sync=\EP=%p1%ds\E\\,
|
||||||
|
|
||||||
st| simpleterm,
|
st| simpleterm,
|
||||||
use=st-mono,
|
use=st-mono,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user