Yet another Suckless Simple Terminal fork. Pre-patched and ready to use.
Fork of the suckless terminal (st) with additional patches.
In order to build st you need the Xlib
header files.
git clone https://gitlab.com/feloniousbonk/st-bonk.git
Clone this repository into desired directory e.g. ~/.local/share/
or ~/.config/
Enter the following command to build and install st:
sudo make clean install
After installation, the file config.h
will be created, you can use this file for any further configuration and simply run the command:
sudo make install
and this will recompile st with your updated changes. You can keep config.def.h
as is, so you always have the inital configuration file on hand if needed.
NOTE: There are several different ways to manage config files; some people use config.def.h
for making changes and create a new config.h
file each time; If you choose this way make sure to remove config.h
and then create the new one before recompiling like so:
rm config.h
sudo make config.h
sudo make install
do whatever works best for you!
Take config.h
/config.def.h
out of the equation!
Various options can be configured from ~/.Xresources
using the syntax st.option: value
:
font
color0
to color15
foreground
background
cursor
- cursor colorreverseCursor
- reverse cursor colortermname
shell
xfps
- frames per second st should at maximum draw to the screenactionfps
blinktimeout
- terminal blinking attribute (set to 0 to disable blinking)bellvolume
tabspaces
borderpx
cwscale
- Kerning / character bounding-box multiplierschscale
disablebold
disableitalic
disableroman
After updating ~/.Xresources
, remember to execute the command:
xrdb ~/.Xresources
or else your changes will not show up.
NOTE: If you already have a ~/.Xresources
file, any universal variables you have may affect st upon installation.
For example: *.foreground: #FFFFFF
will make your foreground color white even though it does not have the prefix st, such as: st.foreground: #FFFFFF
.
* I have supplied a pre-configured .Xresources
file with this fork. Move the file to your $HOME
directory if you wish to use it.
Inspired by plan9’s acme and plumber: right-click some selected text to send it to the plumbing program of your choosing:
You can set the config.h
variable (static char *plumber_cmd = " "
) to execute your custom command, The default is "xdg-open %s"
, which opens a file or URL in the user’s preferred application.
This patch allows you to configure a secondary font. This can be used to display glyphs that may not be present in your primary font. In this fork your primary font is set as Liberation Mono
. And Font2
is set as mono
so it will match your system font. Change the variable static char *font2
in config.h
to whatever glyph supporting font you want.
To search what fonts you have enter the following command:
fc-list :fontformat=TrueType -f "%{family}\n" | sort -u | less
NOTE: Fira Code
fonts work well for Font2
in my experience. | Package: ttf-fira-code
on Arch-based systems.
Get rid of bold, italic, and roman fonts for a cleaner looking prompt by setting the following config.h
variables to (1):
int disablebold = 1;
int disableitalic = 1;
int disableroman = 1;
* set to (0) to enable each if desired.
Edit: (static unsigned int cursorshape = [1-6]
) in your config.h
file to set any of the following cursors:
set st’s width and height as pixels instead of cells, both from the command line:
st -G [width]x[height]
or the config.h
file variables:
static Geometry geometry = PixelGeometry;
static unsigned int width = x;
static unsigned int height = x;
* set (static Geometry geometry = CellGeometry;
) to set size by cell instead of pixels.
Scrollback is still in an experimental state in st. You may experience some buggy behavior, but it is still nice to have and works well 99% of the time, so I included it.
NOTE: If you are experiencing weird scrolling issues while in insert mode in vim/nvim. copy and paste this into your vimrc
file:
if $TERM ==# 'st-256color'
set mouse=a
map <ScrollWheelUp> <C-Y>
map <ScrollWheelDown> <C-E>
endif
The shell script desktopentry.sh
is a quick and dirty shell script that creates a st.desktop
file @ ~/.local/share/applications
and installs it to your system, without having to patch st itself. This allows st to be accessible from your desktop/application launcher
Requirements:
desktop-file-utils
run by entering:
bash ./desktopentry.sh
NOTE: There is a patch for this already, If you’d rather use that you can patch it to st by saving the .diff
file into your st directory and entering the command:
patch -p1 < 'patch-file-name.diff'
* ALWAYS back up your build before attempting a patch.
Thanks to Suckless.org for creating Simple terminal
Thanks to AUR for Blinking cursor patch