No description
Find a file
NRK d643a6261a base64_digits: reduce scope, implicit zero, +1 size
the array is not accessed outside of base64dec() so it makes sense to
limit it's scope to the related function. the static-storage duration of
the array is kept intact.

this also removes unnecessary explicit zeroing from the start and end of
the array. anything that wasn't explicitly zero-ed will now be
implicitly zero-ed instead.

the validity of the new array can be easily confirmed via running this
trivial loop:

	for (int i = 0; i < 255; ++i)
		assert(base64_digits[i] == base64_digits_old[i]);

lastly, as pointed out by Roberto, the array needs to have 256 elements
in order to able access it as any unsigned char as an index; the
previous array had 255.

however, this array will only be accessed at indexes which are
isprint() || '=' (see `base64dec_getc()`), so reducing the size of the
array to the highest printable ascii char (127 AFAIK) + 1 might also be
a valid strategy.
2022-04-30 13:41:18 +04:00
.gitignore Apply xresources, font2 (adds the ability to configure st via Xresources), solarized-both patches 2020-12-20 15:18:22 +03:00
arg.h Initial (st-0.8.2 with solarized and scrollback diff's) 2019-12-02 14:38:37 +03:00
config.h Add gruvbox colors 2022-04-05 10:45:23 +04:00
config.mk bump version to 0.8.5 2022-04-30 13:36:29 +04:00
FAQ FAQ: fix a typo, patch -> path 2022-04-30 13:36:21 +04:00
LEGACY Merge 0.8.4 2020-12-19 03:27:43 +03:00
LICENSE Merge 0.8.4 2020-12-19 03:27:43 +03:00
Makefile Initial (st-0.8.2 with solarized and scrollback diff's) 2019-12-02 14:38:37 +03:00
README Merge 0.8.4 2020-12-19 03:27:43 +03:00
README.md Change color scheme to Apprentice, update README.md 2021-11-30 20:23:29 +03:00
st.1 Merge 0.8.4 2020-12-19 03:27:43 +03:00
st.c base64_digits: reduce scope, implicit zero, +1 size 2022-04-30 13:41:18 +04:00
st.h Apply xresources, font2 (adds the ability to configure st via Xresources), solarized-both patches 2020-12-20 15:18:22 +03:00
st.info Merge 0.8.4 2020-12-19 03:27:43 +03:00
TODO Merge 0.8.4 2020-12-19 03:27:43 +03:00
win.h ST: Add WM_ICON_NAME property support 2022-04-30 13:10:15 +04:00
x.c fix possible rare crash when Xutf8TextPropertyToTextList fails 2022-04-30 13:31:36 +04:00

st - simple terminal emulator for X

This is my terminal that I use every day, and maybe it will work for you too.

Bindings

  • Scrollback: with shift-↑/↓
  • Scrollback mouse: shift while scrolling the mouse
  • Change font size:ctrl+shift-↑/↓
  • Reset font size: ctrl+shift-home returns to default
  • Copy/Paste text: with ctrl+shift-c, ctrl+shift+v and ctrl+shift-insert or right mouse click
  • Extract all visible URLs and present rofi/dmenu to select and open one: ctrl+shift+U

Requirements

  • make tool for building
  • libXft library for fonts drawing
  • Xlib header files for interacting with an X server
  • xurls tool for extract urls from plain text
  • Fantasque default font which you can change in config.h

Patches

  • st-scrollback
  • st-scrollback-mouse
  • alpha
  • externalpipe
  • rightclickpaste
  • font2

Simple installation

git clone https://github.com/ssilaev/st
cd st
sudo make install