Step 1 - Clone st repository

$ git clone https://git.suckless.org/st

Step 2 - Download Xlib files

You need the Xlib header files to run make clean build for st compiling

$ sudo apt-get install libx11-dev libxft-dev libxext-dev

Step 3 - Compile

cd into extracted folder from Step 1 and run:

$ sudo make clean install

### Step 4 - Apply scrollback patch

  • Download diff file
    $ curl -o scrollback.patch https://st.suckless.org/patches/scrollback/st-scrollback-20190331-21367a0.diff
    
  • apply diff file
    $ git apply scrollback.patch
    
  • Edit file config.h for new keybinding
    {ShiftMask,  XK_K,  kscrollup,  {.i = -1} },
    {ShiftMask,  XK_J,  kscrolldown,  {.i = -1} },
    
  • re-compile
    $ sudo make clean install
    

    and now you can scroll up or srolldown by Shift + K or Shift + J