Suckless-st: Difference between revisions
From wikinotes
No edit summary |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
st is a | st is a fast, minimalist terminal emulator. | ||
= Documentation = | = Documentation = | ||
Line 31: | Line 31: | ||
= Configuration = | = Configuration = | ||
<blockquote> | <blockquote> | ||
Suckless st does not have any dynamic configuration. To make changes, you change the source-code and then recompile it. | Suckless st does not have any dynamic configuration. To make changes, you change the source-code and then recompile it. | ||
Most options you'll be interested in (keybindings, colours, fonts) can be found in <code>config.h</code>. | Most options you'll be interested in (keybindings, colours, fonts) can be found in <code>config.h</code>. | ||
Line 41: | Line 40: | ||
</source> | </source> | ||
If UTF-8 characters are not being rendered, check that your <code>/etc/locale.conf</code> is set properly. | If UTF-8 characters are not being rendered, check that your <code>/etc/locale.conf</code> is set properly.<br> | ||
See Also: [[Linux Fonts]]. | See Also: [[Linux Fonts]]. | ||
Line 48: | Line 47: | ||
/* 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 */ | |||
"#000000", //"black", | |||
"#A93025", // "red3", | |||
"#93d44f", // "green3", | |||
"#eab93d", // "yellow3", | |||
"#306a87", // "blue2", | |||
"#ce5c00", // "magenta3", | |||
"#89b6e2", // "cyan3", | |||
"#cccccc", // "gray90", | |||
/* 8 bright colors */ | |||
"#555753", // "gray50", | |||
"#ff8d8d", // "red", | |||
"#40a030", // "green", | |||
"#ffc123", // "yellow", | |||
"#3465a9", // "#5c5cff", | |||
"#f57900", // "magenta", | |||
"#46a4ff", // "cyan", | |||
"#ffffff", // "white", | |||
[255] = 0, | |||
/* more colors can be added after 255 to use with DefaultXX */ | |||
"#cccccc", | |||
}; | }; | ||
Line 90: | Line 89: | ||
<source lang="c"> | <source lang="c"> | ||
static Shortcut shortcuts[] = { | static Shortcut shortcuts[] = { | ||
/* mask keysym function argument */ | |||
/* resize fonts */ | /* resize fonts */ | ||
{ ControlMask, XK_equal, zoom, {.f = +1} }, | { ControlMask, XK_equal, zoom, {.f = +1} }, | ||
Line 96: | Line 95: | ||
/* paste */ | /* paste */ | ||
{ ShiftMask, XK_Insert, selpaste, {.i = 0} }, /* shift-ins pastes selection buffer */ | |||
{ MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} }, /* alt-shift-ins pastes clipboard */ | |||
{ MODKEY|ControlMask, XK_v, clippaste, {.i = 0} }, /* ctrl-alt-v pastes clipboard */ | |||
}; | }; | ||
</source> | </source> | ||
</blockquote><!-- Configuration --> |
Latest revision as of 02:02, 26 November 2022
st is a fast, minimalist terminal emulator.
Documentation
homepage https://st.suckless.org/
Install
# download/extract curl -O# https://dl.suckless.org/st/st-0.8.2.tar.gz tar -xvf st-0.8.2.tar.gz # patch, if desired curl -#O 'https://st.suckless.org/patches/alpha/st-alpha-0.8.2.diff' patch -ruN -d st-0.8.2 < st-alpha-0.8.2.diff # compile/install cd st ./configure make sudo make install
Configuration
Suckless st does not have any dynamic configuration. To make changes, you change the source-code and then recompile it. Most options you'll be interested in (keybindings, colours, fonts) can be found in
config.h
.Font/shell
static char font[] = "Droid Sans Mono:size=14:antialias=true"; static char shell[] = "/bin/zsh";If UTF-8 characters are not being rendered, check that your
/etc/locale.conf
is set properly.
See Also: Linux Fonts.Colours
/* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { /* 8 normal colors */ "#000000", //"black", "#A93025", // "red3", "#93d44f", // "green3", "#eab93d", // "yellow3", "#306a87", // "blue2", "#ce5c00", // "magenta3", "#89b6e2", // "cyan3", "#cccccc", // "gray90", /* 8 bright colors */ "#555753", // "gray50", "#ff8d8d", // "red", "#40a030", // "green", "#ffc123", // "yellow", "#3465a9", // "#5c5cff", "#f57900", // "magenta", "#46a4ff", // "cyan", "#ffffff", // "white", [255] = 0, /* more colors can be added after 255 to use with DefaultXX */ "#cccccc", }; /* * Default colors (colorname index) * foreground, background, cursor */ unsigned int defaultfg = 243; unsigned int defaultbg = 236; static unsigned int defaultcs = 245; static unsigned int defaultrcs = 257;Hotkeys
Use xev to retrieve keysym
static Shortcut shortcuts[] = { /* mask keysym function argument */ /* resize fonts */ { ControlMask, XK_equal, zoom, {.f = +1} }, { ControlMask, XK_minus, zoom, {.f = -1} }, /* paste */ { ShiftMask, XK_Insert, selpaste, {.i = 0} }, /* shift-ins pastes selection buffer */ { MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} }, /* alt-shift-ins pastes clipboard */ { MODKEY|ControlMask, XK_v, clippaste, {.i = 0} }, /* ctrl-alt-v pastes clipboard */ };