- Notifications
You must be signed in to change notification settings - Fork0
My build of the simple terminal
License
cjpbirkbeck/st
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Here is a patched version of thesimple terminal bysuckless, "a simple terminal emulator for X which sucks less". Generally, I mostly use it withtmux, but it works perfectly fine without it.
- libX11: Basic Xorg headers
- libXft: font rendering libraries
- libXcursor: for a themed cursor
Edit config.mk to match your local setup (st is installed into the /usr/local namespace by default).
Afterwards enter the following command to build and install st (if necessary as root):
make clean install
For users of eitherthe nix package manager or NixOS can use the following default.nix to compile st into the nix store withnix-build
. Based of an old version ofthe default in nixpkgs, so probably not the best version of this code but it works.
rec{pkgs=import<nixpkgs>{};patches=[];conf=null;extraLibs=[];libX11=pkgs.xorg.libX11;libXft=pkgs.xorg.libXft;libXcursor=pkgs.xorg.libXcursor;cjpb-st=withpkgs;stdenv.mkDerivationrec{name="st-0.8.3";src=./.;inheritpatches;nativeBuildInputs=[pkgconfigncurses];buildInputs=[libX11libXftlibXcursor]++extraLibs;preBuild='' sed -i -e '/share\/applications/d' Makefile '';installPhase='' TERMINFO=$out/share/terminfo make install PREFIX=$out '';};}
To install st in the nix store in NixOS, you can add the following override:
{pkgs,config, ...}:{nixpkgs.config.packageOverrides=pkgs:withpkgs;rec{st_patched=st.overrideAttrs(oldAttr:rec{src=fetchFromGitHub{owner="cjpbirkbeck";repo="st";# Replace this with the current revision!rev="0000000000000000000000000000000000000000";# Likewise, replace this with current sha256!sha256="0000000000000000000000000000000000000000000000000000";};buildInputs=withpkgs.xorg;[libX11libXftlibXcursor];preBuild='' sed -i -e '/share\/applications/d' Makefile '';installPhase='' TERMINFO=$out/share/terminfo make install PREFIX=$out mkdir -p $out/share/applications/ install -D st.desktop $out/share/applications/ '';});};}
The following patches have been applied to vanilla st 0.8.3:
- Alpha Focus Highlight: If a compositor likepicom is enabled, a terminal with focus will have a set opacity, while all others will have another opacity.
- Anygeomtry: Set st window sizes by pixel size, with the argument
-G [width[xheight]]
. - Anysize: Dynamically set the inner border size and centers the terminal if the windows is not a multiple of the character size and inner border size. Useful for users of tiling window managers likedwm,awesomewm,i3wm, etc.
- Blinking cursor: Makes the cursor blink, like the terminals of yore.
- Boxdraw: Allows for the drawing of Unicode line characters, allowing programs like tmux to draw lines without gaps.
- Clipboard: Use Xorg's clipboard, not primary.
- Font2: Allows for different fonts to be used as "backup". Currently, I have not enabled any so far.
- Netwmicon: Hardcodes a default icon.
- Newterm: Using the keybinding of
C-S-Return
to open a new terminal with the present working directory as the current instance. - OSC-10-11-12: Enables those escape codes for modifying the background colours.
- Scrollback: Enable a scrollback buffer by default …
- Scrollback mouse: … and allow it to scroll that buffer with the scrollwheel (or buttons in the case of trackpoint). Note that I have disable the middle click and made scrolling with the scrollwheel default, without needing to press shift.
- Themed cursor: Uses the cursor from the cursor theme. Requires
libXcursor
. - Undercurl: This patch adds support for curly underlining, such as vim's spelling correction.
- Vertcenter: Center oversized lines horizontally.
- Workingdir: Specify a working directory with
-d [path]
. Path can be absolute or relative.
Colours are based off of theOceanic Material theme fromiTerm2 Color Schemes. Specifically, it comes from a conversion the termite theme withterminal.sexy.
Not that I have changed some of the colours to be easier to read. Specifically, color5 (normal Magenta) was originally#8800a0
and color7 (normal White) was#a4a4a4
and color13 (bright Magenta) was originally#aa4abc
.
Colours | Normal | Bright |
---|---|---|
Black | #000000 | #777777 |
Red | #ee2b2a | #dc5c60 |
Green | #40a33f | #70be71 |
Yellow | #ffea2e | #fff163 |
Blue | #1e80f0 | #54a4f3 |
Magenta | #c900ed | #C585d1 |
Cyan | #16afca | #42c7da |
White | #e3e3e3 | #ffffff |
Background =#1c262b
Foreground =#c2c8d7
If you did not install st with make clean install, you must compile the st terminfo entry with the following command:
tic -sx st.info
Seethe man page for additional details.
- Better integration with tmux, maybe using externalpipe?
SeeLICENSE for details.
Based on Aurélien APTEL bt source code.
- Alpha Focus Highlight: Julius Hülsmann
- Anygeomtry: José Miguel Sánchez García
- Anysize: Augusto Born de Oliveira
- Blinking cursor: Genki Sky, Steve Ward, jvden
- Boxdraw:Avi Halachmi
- Clipboard: Kai Hendry, Laslo Hunhold, Matthew Parnell
- Font2: Kirill Bugaev
- Netwmicon: Aleksandrs Stier
- Newterm: Matías Long, Stein Bakkeby (orphan version)
- OSC-10-11-12: Christian Tenllado
- Scrollback: Jochen Sprickerhof, M Farkas-Dyck, Ivan Tham, Ori Bernstein, Matthias Schoth, Paride Legovini, Lorenzo Bracoo, Kamil Kleban, Avi Halachmi, Jacob Prosser
- Themed cursor: Jim Fowler
- Undercurl:HexOctal
- Vertcenter: Doug Whiteley
- Workingdir: David Gričar