code:
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
using Verse.AI.Group;

namespace RJW_Events
{

	public class JobGiver_FindOrgyPartner : ThinkNode_JobGiver
    {

		protected override Job TryGiveJob(Pawn pawn)
        {
			if (!RJWHookupSettings.HookupsEnabled)
			{
				return null;
			}
			if (pawn.Drafted)
			{
				return null;
			}

			Pawn_MindState mindState = pawn.mindState;
			DutyDef dutyDef;
			if (mindState == null)
			{
				dutyDef = null;
			}
			else
			{
				PawnDuty duty = mindState.duty;
				dutyDef = ((duty != null) ? duty.def : null);
			}
			if (dutyDef == DutyDefOf.TravelOrLeave)
			{
				if (RJWSettings.DebugLogJoinInBed)
				{
					ModLog.Message("JoinInBed.TryGiveJob:(" + xxx.get_pawnname(pawn) + "): has TravelOrLeave, no time for lovin!");
				}
				return null;
			}

			if (!CasualSex_Helper.CanHaveSex(pawn))
			{
				return null;
			}

			List<Pawn> targets = LordUtility.GetLord(pawn).ownedPawns.Where((Pawn p) => {

				if(p?.mindState?.duty == null && p.mindState.duty.def != OrgyDutyDefOf.Orgy)
                {
					return false;
                }

				IntVec3 cell = p.mindState.duty.focus.Cell;
				if (GatheringsUtility.InGatheringArea(p.Position, cell, p.Map)) {
					return true;
				}
				return false;
			}).ToList();

            if (!BestPawnForOrgyExists(pawn, targets, out Pawn pawn2))
            {
                return null;
            }
            if (pawn2 == null)
			{
				return null;
			}

			if (pawn2.jobs.curDriver is JobDriver_SexBaseInitiator)
			{
				pawn2 = (Pawn)pawn2.CurJob.targetA;
			}
			else if (pawn.CurJob != null && pawn.jobs.curDriver != null)
			{
				pawn.jobs.curDriver.EndJobWith(JobCondition.InterruptForced);
			}
			return JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("OrgySex", true), pawn2);
		}

		public bool BestPawnForOrgyExists(Pawn pawn1, List<Pawn> targets, out Pawn result)
        {
			if(targets.TryRandomElementByWeight((Pawn p) => {

				if (p == pawn1) return 0;
				float chance = pawn1.relations.SecondaryRomanceChanceFactor(p);
				if(!(p.jobs.curDriver is JobDriver_Sex))
                {
					//higher chance if person is doing nothing
					chance *= 7f;
                }
				return chance;

			}, out Pawn option)) {
				result = option;
				return true;
            }
			else
            {
				result = null;
				return false;
			}

        }
    }
}


code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;

namespace RJW_Events
{
    public class JobGiver_GetNaked : ThinkNode_JobGiver
    {
        protected override Job TryGiveJob(Pawn pawn)
        {
            return JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("GetNaked", true));
        }
    }
}

repo_name: a/flock

license: unknown


code:
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace RJW_Events
{
    class LordJob_Joinable_Orgy : LordJob_Joinable_Party
    {
        List<Pawn> participants;

        protected override ThoughtDef AttendeeThought
        {
            get
            {
                return ThoughtDefOf.AttendedOrgy;
            }
        }

        protected override TaleDef AttendeeTale
        {
            get
            {
                return TaleDefOf.AttendedOrgy;
            }
        }
        protected override ThoughtDef OrganizerThought
        {
            get
            {
                return ThoughtDefOf.AttendedOrgy;
            }
        }

        protected override TaleDef OrganizerTale
        {
            get
            {
                return TaleDefOf.AttendedOrgy;
            }
        }

        public LordJob_Joinable_Orgy(IntVec3 spot, Pawn organizer, GatheringDef gatheringDef) : base(spot, organizer, gatheringDef)
        {

        }
        public override void ExposeData()
        {
            Scribe_Collections.Look<Pawn>(ref this.participants, "orgyParticipants", LookMode.Reference, Array.Empty<object>());
        }

        public override float VoluntaryJoinPriorityFor(Pawn p)
        {
            if (!CasualSex_Helper.CanHaveSex(p)) return 0;

            if (ModLister.IdeologyInstalled)
            {
                var ideo = p.ideo.Ideo;

                if (!ideo.HasPrecept(DefDatabase<PreceptDef>.GetNamed("Lovin_FreeApproved", true)) &&
                    !ideo.HasPrecept(DefDatabase<PreceptDef>.GetNamed("Lovin_Free", true)))
                {
                    return 0;
                }

            }

            return base.VoluntaryJoinPriorityFor(p);
        }

        public override void Notify_PawnAdded(Pawn p)
        {
            if(participants == null)
            {
                participants = new List<Pawn>();
            }
            participants.Add(p);
            base.Notify_PawnAdded(p);
        }

        public override void Cleanup()
        {

            foreach(Pawn participant in participants)
            {
                participant.TryGetComp<CompRJW>().drawNude = false;
                participant.Drawer.renderer.SetAllGraphicsDirty();
            }

            participants = null;

            base.Cleanup();
        }

    }
}


code:
using HarmonyLib;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using RimWorld;

namespace RJW_Events
{

    [HarmonyPatch(typeof(Need_Sex), "fall_per_tick")]
    public static class HarmonyPatch_Need_Sex
    {

        public static void Postfix(Pawn pawn, ref float __result)
        {
			PsychicDroneLevel psychicDroneLevel = PsychicDroneLevel.None;
			Map mapHeld = pawn.MapHeld;
			if (mapHeld != null)
			{
				PsychicDroneLevel highestPsychicDroneLevelFor = mapHeld.gameConditionManager.GetHighestPsychicArouseLevelFor(pawn.gender);
				if (highestPsychicDroneLevelFor > psychicDroneLevel)
				{
					psychicDroneLevel = highestPsychicDroneLevelFor;
				}
			}

			switch (psychicDroneLevel)
			{
				case PsychicDroneLevel.None:
					break;
				case PsychicDroneLevel.GoodMedium:
					__result *= 1.5f;
					break;
				case PsychicDroneLevel.BadLow:
					__result *= 3;
					break;
				case PsychicDroneLevel.BadMedium:
					__result *= 6;
					break;
				case PsychicDroneLevel.BadHigh:
					__result *= 9;
					break;
				case PsychicDroneLevel.BadExtreme:
					__result *= 12;
					break;
				default:
					throw new NotImplementedException();
			}
		}

    }
}


code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HarmonyLib;
using RimWorld;
using Verse;

namespace RJW_Events
{
    [HarmonyPatch(typeof(LordJob_Joinable_Party), "ApplyOutcome")]
    public static class HarmonyPatch_ReclotheOnEnd
    {
        public static void Postfix(LordToil_Party toil)
        {
            List<Pawn> ownedPawns = toil.lord.ownedPawns;
            for (int i = 0; i < ownedPawns.Count; i++)
            {
                ownedPawns[i].Drawer.renderer.SetAllGraphicsDirty();
            }
        }
    }
}


code:
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI.Group;

namespace RJW_Events
{
    [HarmonyPatch(typeof(Lord), "RemovePawn")]
    public static class HarmonyPatch_ReclotheOnRemovePawn
    {
        public static void Postfix(Lord __instance, Pawn p)
        {
            if(__instance?.LordJob != null && __instance.LordJob is LordJob_Joinable_Orgy)
            {
                p.Drawer.renderer.SetAllGraphicsDirty();
            }
        }
    }
}


code:
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI.Group;

namespace RJW_Events
{
    /*
    [HarmonyPatch(typeof(PawnGraphicSet), "ResolveApparelGraphics")]
    public static class HarmonyPatch_StayNudeForOrgy
    {
        public static bool Prefix(PawnGraphicSet __instance)
        {
            if(LordUtility.GetLord(__instance.pawn)?.LordJob != null &&
                LordUtility.GetLord(__instance.pawn).LordJob is LordJob_Joinable_Orgy &&
                !(LordUtility.GetLord(__instance.pawn).LordJob as LordJob_Joinable_Orgy).IsGatheringAboutToEnd())
            {
                return false;
            }
            return true;
        }
    }

    */
}


code:
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace RJW_Events
{
    [StaticConstructorOnStartup]
    class Harmony_PatchAll
    {
        static Harmony_PatchAll()
        {
            Harmony harmony = new Harmony("rimworldevents");
            harmony.PatchAll(Assembly.GetExecutingAssembly());
        }
    }
}


code:
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;

namespace RJW_Events
{

    public class ThinkNode_ConditionalNude : ThinkNode_Conditional
    {
        protected override bool Satisfied(Pawn pawn)
        {

            if (!pawn.TryGetComp<CompRJW>().drawNude)
            {
                return false;
            }

            return true;
        }
    }
}


code:
using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace RJW_Events
{
    class ThoughtWorker_PsychicArouse : ThoughtWorker
    {

        protected override ThoughtState CurrentStateInternal(Pawn p)
        {
			PsychicDroneLevel psychicDroneLevel = PsychicDroneLevel.None;
			Map mapHeld = p.MapHeld;
			if (mapHeld != null)
			{
				PsychicDroneLevel highestPsychicDroneLevelFor = mapHeld.gameConditionManager.GetHighestPsychicArouseLevelFor(p.gender);
				if (highestPsychicDroneLevelFor > psychicDroneLevel)
				{
					psychicDroneLevel = highestPsychicDroneLevelFor;
				}
			}

			switch (psychicDroneLevel)
			{
				case PsychicDroneLevel.None:
					return false;
				case PsychicDroneLevel.GoodMedium:
					return ThoughtState.ActiveAtStage(0);
				case PsychicDroneLevel.BadLow:
					return ThoughtState.ActiveAtStage(0);
				case PsychicDroneLevel.BadMedium:
					return ThoughtState.ActiveAtStage(1);
				case PsychicDroneLevel.BadHigh:
					return ThoughtState.ActiveAtStage(2);
				case PsychicDroneLevel.BadExtreme:
					return ThoughtState.ActiveAtStage(2);
				default:
					throw new NotImplementedException();
			}
        }
    }
}


code:
name: Build package

on:
  push:
    tags:
      - '*'

  #push:
    #  branches: [ "master" ]
      #pull_request:
    #  branches: [ "master" ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: requisites
      run: sudo apt-get install libfreetype-dev x11proto-dev fontconfig libx11-dev libxft-dev python3-docutils
    - name: make
      run: make
    - name: make check
      run: make check
    - name: Install project
      run: sudo make install DESTDIR=$(pwd)/dist/debian
    - name: Get version from config.make
      id: get_version
      run: |
        VERSION=$(sed -ne 's/^VERSION := //p' config.make | tr -d '\n')
        echo "::set-output name=version::$VERSION"
    - name: build package
      run: |
        VERSION=${{ steps.get_version.outputs.version }}
        sed -i "s/VERSION/$VERSION/" dist/debian/DEBIAN/control
        cat dist/debian/DEBIAN/control
        dpkg-deb --build dist/debian slterm_${{ steps.get_version.outputs.version }}.deb
    - name: package check
      run: |
        sudo apt-get install libfreetype6 libxft2 libfontconfig1 fonts-liberation
        sudo dpkg -i slterm_${{ steps.get_version.outputs.version }}.deb
        slterm -V
    - name: Upload package
      uses: actions/upload-artifact@v4
      with:
        name: slterm_${{ steps.get_version.outputs.version }}.deb
        path: slterm_${{ steps.get_version.outputs.version }}.deb

repo_name: misc/slterm

license: mit


code:
name: C/C++ CI

on:
  push:
    branches: [ "devel" ]
  pull_request:
    branches: [ "master" ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: requisites
      run: sudo apt-get install libfreetype-dev x11proto-dev fontconfig libx11-dev libxft-dev python3-docutils
    - name: make
      run: make
    - name: make check
      run: make check


code:
name: Create Release with Binary

on:
  push:
    tags:
      - '*'

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Download Binary using wget
        run: |
          wget https://github.com/michael105/static-bin/raw/refs/heads/main/xorg/slterm
          chmod a+x slterm
          mv slterm slterm_linux_amd64
      - name: Create GitHub Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          body: |
            statically linked binary for linux/64bit attached
          draft: false
          prerelease: false

      - name: Upload Release Asset
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: ./slterm_linux_amd64
          asset_name: slterm_linux_amd64
          asset_content_type: application/octet-stream

      - name: Get version from config.make
        id: get_version
        run: |
          VERSION=$(sed -ne 's/^VERSION := //p' config.make | tr -d '\n')
          echo "::set-output name=version::$VERSION"

      - name: build package
        run: |
          VERSION=${{ steps.get_version.outputs.version }}
          echo Version - $VERSION
          sed -i "s/VERSION/$VERSION/" dist/debian/DEBIAN/control
          sed -i "/^Depends:/d" dist/debian/DEBIAN/control
          cat dist/debian/DEBIAN/control
          mkdir -p dist/debian/usr/local/bin
          cp slterm_linux_amd64 dist/debian/usr/local/bin/slterm
          mkdir -p dist/debian/usr/local/share/man/man1
          cp src/slterm.1 dist/debian/usr/local/share/man/man1/
          mkdir -p dist/debian/usr/local/share/doc/slterm
          cp -R README.md LICENSE PATCHES.md doc test dist/debian/usr/local/share/doc/slterm/
          dpkg-deb --build dist/debian slterm_$VERSION.deb

      - name: upload package
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: slterm_${{ steps.get_version.outputs.version }}.deb
          asset_name: slterm_${{ steps.get_version.outputs.version }}.deb
          asset_content_type: application/vnd.debian.binary-package


code:
0.99.5.7 (2025/02/01)

Fixed segfault with alt screen
Documentation
Add .deb package build workflow

path: CHANGELOG


code:
# slterm - simple terminal
# See LICENSE file for copyright and license details.
.POSIX:

define HELP
Makefile help

for the build configuration, edit config.make
further configuration and preferences can be set in src/config.h

make targets
------------
slterm: (default) build slterm
static: build slterm as static binary
static_embedfont: static build, embed fonts into the binary

install: install slterm

endef

all: man tools
	cd src && $(MAKE)

help:
	$(info $(HELP))

slterm: man tools
	cd src && $(MAKE)

static: man tools
	cd src && $(MAKE) static

static_embedfont: man tools
	cd src && $(MAKE) static EMBEDFONT=1

tools:
	cd tools && $(MAKE)

check:
	cd src && $(MAKE) check

#local (use config.in.loc)
l: cd src && $(MAKE)

man: slterm.1

slterm.1: slterm.1.rst
	rst2man slterm.1.rst > slterm.1 || rst2man.py slterm.1.rst > slterm.1

install:
	cd src && make install

loc-install: src/slterm slterm.1
	su -c 'sh -c "mv /usr/local/bin/st /usr/local/bin/st.bak; cp src/slterm /usr/local/bin/st; chmod a+rx /usr/local/bin/st" '

.PHONY: all install

path: Makefile


code:
## applied Patches

<div id="TOC">

  - [keyboard\_select](#keyboard_select)
  - [scrollback](#scrollback)
  - [anysize](#anysize)
  - [one clipboard](#one-clipboard)
  - [relativeborder](#relativeborder)
  - [selectioncolors](#selectioncolors)
  - [xresources](#xresources)

</div>

omitted:

newterm ( doesn't detach->parent killed->child too )

vertcenter ( somehow doesn't look right to me)

---
### keyboard\_select

#### Description

This patch allows you to select and copy text to primary buffer with
keyboard shortcuts like the perl extension keyboard-select for urxvt.

#### Instructions

The patch changes the config.def.h. Delete your config.h or add the
shortcut below if you use a custom one.

    Shortcut shortcuts[] = {
        ...
        { TERMMOD, XK_s, keyboard_select, { 0 } },
    };

#### Notes

When you run "keyboard\_select", you have 3 modes available :

  - move mode : to set the start of the selection;
  - select mode : to activate and set the end of the selection;
  - input mode : to enter the search criteria.

Shortcuts for move and select modes :

```
 h, j, k, l:    move cursor left/down/up/right (also with arrow keys)
 !, _, *:       move cursor to the middle of the line/column/screen
 Backspace, $:  move cursor to the beginning/end of the line
 PgUp, PgDown : move cursor to the beginning/end of the column
 Home, End:     move cursor to the top/bottom left corner of the screen
 /, ?:          activate input mode and search up/down
 n, N:          repeat last search, up/down
 s:             toggle move/selection mode
 t:             toggle regular/rectangular selection type
 Return:        quit keyboard_select, keeping the highlight of the selection
 Escape:        quit keyboard_select
```

With h,j,k,l (also with arrow keys), you can use a quantifier. Enter a
number before hitting the appropriate key.

Shortcuts for input mode :

```
 Return:       Return to the previous mode
```

#### Authors

  - Tonton Couillon - \<la dot luge at free dot fr\>

---
### scrollback

#### Description

Scroll back through terminal output using Shift+{PageUp, PageDown}.

patch on top of the previous to allow scrolling using
`Shift+MouseWheel`.

patch on top of the previous two to allow scrollback using mouse wheel
only when not in `MODE_ALTSCREEN`. For example the content is being
scrolled instead of the scrollback buffer in `less`. Consequently the
Shift modifier for scrolling is not needed anymore. **Note: patches
before `20191024-a2c479c` might break mkeys other than scrolling
functions.**

patch on top of the first two to allow changing how fast the mouse
scrolls.

#### Notes

  - Patches modify config.def.h, you need to add mkeys to your own
    config.h
  - With patches before `20191024-a2c479c`: you can not have a mshortcut
    for the same mkey so remove Button4 and Button5 from mshortcuts in
    config.h
  - The mouse and altscreen patches `20191024-a2c479c` (and later) are
    simpler and more robust because st gained better support for
    customized mouse shortcuts. As a result, the altscreen patch doesn't
    really need the mouse patch. However to keep it simple the
    instructions stay the same: the alrscreen patch still applies on top
    of the (now very minimal) mouse patch.

#### Authors

  - Jochen Sprickerhof - <st@jochen.sprickerhof.de>
  - M Farkas-Dyck - <strake888@gmail.com>
  - Ivan Tham - <pickfire@riseup.net> (mouse scrolling)
  - Ori Bernstein - <ori@eigenstate.org> (fix memory bug)
  - Matthias Schoth - <mschoth@gmail.com> (auto altscreen scrolling)
  - Laslo Hunhold - <dev@frign.de> (unscrambling, git port)
  - Paride Legovini - <pl@ninthfloor.org> (don't require the Shift
    modifier when using the auto altscreen scrolling)
  - Lorenzo Bracco - <devtry@riseup.net> (update base patch, use static
    variable for config)
  - Kamil Kleban - <funmaker95@gmail.com> (fix altscreen detection)
  - Avi Halachmi - <avihpit@yahoo.com> (mouse + altscreen rewrite after
    `a2c479c`)
  - Jacob Prosser - <geriatricjacob@cumallover.me>

---
### anysize

#### Description

By default, st's window size always snaps to the nearest multiple of the
character size plus a fixed inner border (set with borderpx in
config.h). When the size of st does not perfectly match the space
allocated to it (when using a tiling WM, for example), unsightly gaps
will appear between st and other apps, or between instances of st.

This patch allows st to resize to any pixel size, makes the inner border
size dynamic, and centers the content of the terminal so that the
left/right and top/bottom borders are balanced. With this patch, st on a
tiling WM will always fill the entire space allocated to it.

#### Authors

  - Augusto Born de Oliveira - <augustoborn@gmail.com>

---
### one clipboard

Free Desktop mandates the user to remember which of two clipboards you
are keeping selections in. If you switch between a terminal and browser,
you might this UX jarring. This patch modifies st to work from one
CLIPBOARD, the same as your browser.

#### Description

st by default only sets PRIMARY on selection since
[March 2015](http://git.suckless.org/st/commit/?id=28259f5750f0dc7f52bbaf8b746ec3dc576a58ee)
according to the [Freedesktop
standard](http://standards.freedesktop.org/clipboards-spec/clipboards-latest.txt).

This patch makes st set CLIPBOARD on selection. Furthermore from
`st-clipboard-0.8.2.diff` middle click pastes from CLIPBOARD.

You may want to replace selpaste with clippaste in your config.h to
complete the affect.

#### Authors

  - Kai Hendry - <hendry@iki.fi>
  - Laslo Hunhold - <dev@frign.de> (git port)
  - Matthew Parnell - <matt@parnmatt.co.uk> (0.7, git ports)

---
### relativeborder

#### Description

When working with a mixture of different DPI scales on different
monitors, you need to use a flexible font that will size correctly no
matter the DPI - for example, `DejaVu Sans Mono-10`. If you have a
border set in pixels, this border will look vastly different in size
depending on the DPI of your display.

This patch allows you to specify a border that is relative in size to
the width of a cell in the terminal.

#### Authors

  - Doug Whiteley - <dougwhiteley@gmail.com>

---
### selectioncolors

#### Description

This patch adds the two color-settings *selectionfg* and *selectionbg*
to config.def.h. Those define the fore- and background colors which are
used when text on the screen is selected with the mouse. This removes
the default behaviour which would simply reverse the colors.

Additionally, a third setting *ingnoreselfg* exists. If true then the
setting *selectionfg* is ignored and the original foreground-colors of
each cell are not changed during selection. Basically only the
background-color would change. This might be more visually appealing to
some folks.

#### Authors

  - Aleksandrs Stier

---
### xresources

#### Description

This patch adds the ability to configure st via Xresources. At startup,
st will read and apply the resources named in the `resources[]` array in
config.h.

#### Authors

  - @dcat on [Github](https://github.com/dcat/st-xresources)
  - Devin J. Pohly - <djpohly@gmail.com> (git port)
  - Sai Praneeth Reddy - <spr.mora04@gmail.com> (read borderpx from
    xresources)


code:
## slterm - slim terminal

	Slim (124kB linked shared) and fast terminal emulator for X11,
	with minimal external dependencies (Xlib, fontconfig and freetype).
   Descendant of st (suckless terminal), modified extensively.

	VTxxx compatible.

	Finally getting close to a first "stable" release.
	Only things missing (imho) are history search and storing.
	Should run stable, please open issues for any crashes.

	The statically linked binary (slterm_linux_amd64) in "releases" should work for every
	64bit linux with a running xorg xserver, and (surprisingly) doesn't need more
	memory than the shared executable.

	Ram usage with an empty history buffer is about (virtual) 6MB + (resident) 4MB.

##### Features

   * Lessmode: scroll around with less like keybindings
   * Shift+Backspace: enter 'lessmode', and scroll
      back to the line the last command has been entered in the shell
	* Retmarks: Tab/Backspace to jump in lessmode to the locations of entered commands
   * Scrollmarks: Set bookmarks to scroll back and forward
   * Hotkeys for changing font size, -spacing and inverting colors
   * Inline help (reference of the bound keys)
   * Switching codepages with hotkeys (cp437,cp850,cp1252,..)
   * Input translation of unicode / X Keysyms to the current codepage
   * Several performance and memory related modifications;
     slterm should be the fastest available terminal emulator for X,
     which does real scrolling
   * secure mode, option -X: lock all pages into memory, prevent swapping
   * Gradient custom 32 color palette for colors 0..7
     (0..7 with attributes normal, bold, faint, bold_faint)
     and the first 16 background colors
   * Copy whole lines in the history with 'yy' in selection mode
   * Additional cursor shapes
   * utf8 clipboard conversion

Statically linked binaries with all dependencies are under "releases",
or at
[https://github.com/michael105/static-bin/](https://github.com/michael105/static-bin)

The latest development statically linked binary is named slterm_version.devel

An ubuntu (debian) package is online at [github/actions/build_package](https://github.com/michael105/slterm/actions/workflows/build_package.yml)
(last workflow run -> Artifacts)

---

#### Additions

##### Lessmode

  * `Alt+Shift+l/Up/Down/PageUp/PageDown` to enter "lessmode".

	Afterwards in "lessmode" Cursor keys and PageUp/Down scroll around.

  * `q` or `Escape` leave lessmode.

  * `Shift+Return` to execute a command in the shell and automatically enter lessmode,
       	if more than one screen is written by the command.

  * `Shift+Backspace`: Enable lessmode and scroll back to the location,
		   the last command was entered.

  * `Tab`, `Tab left`: Jump back and forth to the locations, commands had been entered.

##### Scrollmarks: Bookmarks within the history.

	set mark:   Ctrl+Alt+n (n=0..9)
	goto mark:  Ctrl+n
	(lessmode): 'n' (number without modifier)

	retmarks:  the positions within the terminal history is saved for
              every line, entered with return.
				  Go back: Shift+Backspace
				  cycle (in lessmode): tab left/right, backspace

##### Hotkeys for font sizes and colors:

 - `Ctrl+Shift+Insert/Delete`   Enlarge/Shrink font width
 - `Ctrl+Shift+Home/End`        Enlarge/Shrink font height
 - `Ctrl+Shift+PageUp/PageDown` Zoom font in / out
 - `Ctrl+Shift+Backspace`       Reset to default font size.
 - `Ctrl+Shift+I`               Inverse colors

##### Different charmaps, assigned to hotkeys

 per default CP1252 ( ANSI, ISO 8859-1, DEC-MCS(nearly) ) is used,
 and only the first page. (0x20-0xff), "extended ascii", ansi.

 CP437 (IBM-PC1, et al., with those signs to draw borders and boxes),
 cp850, cp1250, cp1251, cp1253 are compiled in,
 and can be selected by Ctrl+Win+[0..5]
 Other codepages would be possible, by adding them to charmap.h,
 and edit config.h

 All tables are used with 8bit ascii, for performance reasons.

 Keyboard input is translated to the current charmap.

 UTF8 is abandoned for now, but the code for utf8 is left in the sources.

##### Colors

  The default 7 colors, with additional 3 attributes bold, faint and bold_faint
  ( so there are 32 colors ) are configured as color gradients,
  configurable in config.h

  The 256 colors map follows the xterm standard, with the difference
  of more contrast with faint and bold_faint attributes.

  Combining blink and inverse attributes does blinking by reversing. (wonderful)
  > echo -e '\e[48;5;9;32;1;6;7m\n\n BLINK \n'

![indexed_colors](images/indexed_fgcolors.jpg)

##### Inline help

`Ctrl+F1`

    Show inline help, and the reference of keybindings

	Cursor and configurable cursorcolor for unfocused windows,
	cursor gets highlighted on focus in

___

The sourcecode is heavily modified, partly rewritten, and split into
smaller sections. (Originally it had been one single file with several thousand lines).

___

Applied 'official' patches:

- anysize
- clipboard
- keyboard_select
- relative_border
- scrollback
- scrollback-mouse
- scrollback-mouse-increment
- selectioncolors
- xresources

		added commandline switch -x to enable reading the xresources,

		compile time switch "XRESOURCES"

Further info is in [slterm.1](src/slterm.1.rst), [Patches](PATCHES.md) and [LOG.md](LOG.md)

### About

(A screenshot of i3 and 3 instances of slterm)

![screenshot](images/st-asc_with_i3.png)

    Stripped unicode support in favour of the 256 chars (extended) ASCII table
        utf8 is an optional compiletime switch now.(was).
        (Most programs suddenly handle German Umlauts, etc.pp out of the box, using the ASCII table / CP1250 only.
        E.g. bash, vi, .. What is an interesting result. st has a quite good unicode handling,
        but until yet I always needed to dive into the configurations for
        entering chars like �,�,� in unicode mode)

        Besides, instead of having a history buffer, which needs 15 Bytes per Glyph
        (a Glyph is a char on the screen with text attributes and colors)
         - now each Glyph is 4 Bytes. What can be nicely optimized.
![](images/colors.png?raw=true)

"256" colors (with attributes faint, normal, bold) and the ascii table without control characters as displayed by slterm.

The scripts for creating the output are within ./test

![](images/ascii.png)

.. Did split the sourcefile (one big file with several thousand lines)
into smaller pieces. Hopefully hacking st is in the future a little bit more conveniant.

---

### Requirements for compiling

- make
- gcc
- Xlib
- Xft
- freetype2
- pkgconf (pkgconfig)
- optional, to embed resources: rst2man, xdd (comes with vim)

For ubuntu : 'sudo apt-get install libfreetype-dev x11proto-dev fontconfig libx11-dev libxft-dev python3-docutils vim'

### Install

For Ubuntu/Debian:

download the latest release package from
(https://github.com/michael105/slterm/actions/workflows/build_package.yml)

(Select the topmost workflow run, at the bottom is a link under 'Artifacts' to the .deb package)

	install dependencies: ' sudo apt-get install libfreetype6 libxft2 libfontconfig1 fonts-liberation '
	install the package: ' sudo dpki -i slterm_xxx.deb '

from source:

edit [config.make](config.make) (optionally)
edit [src/config.h](src/config.h) (optionally)

    make
    make install

The default configuration might be save.

(no utf8, scrollback history 65536 lines, no XResources, installs into /usr/local/bin)

If you'd like to change anything, please edit config.h and config.make

### Links

* About utf8

 	<http://doc.cat-v.org/bell_labs/utf-8_history>

* A comparison on latency, speed and memory consumption of
	different terminal emulators. st and urxvt standing out.

  <https://anarc.at/blog/2018-05-04-terminal-emulators-2/>

* Latency.

	<https://danluu.com/term-latency/>

* Latency, comparing old (1980) and nowadays systems.

	<https://danluu.com/input-lag/>

### Bugs

Switching back and forth from alt screen does reset the cursor position,
but doesn't clear the screen for remote ssh sessions.

Retmarks aren't accurate for every 65536 lines.

No UTF8
UTF-8 currently would need some work,
stripped for performance reasons.

Xresources, untested for a while. Currently colors are not used.

#### fixed:

crashes with the alt screen
corrected ret marks and scrollmarks

====================

(misc147 2020-2025 - github.com/michael105)

Credits
-------

Based on Aurelien APTEL <aurelien dot aptel at gmail dot com> bt source code.

Fetched from the suckless git repo (suckless.org) on 2020/01/01.

Please see for more information on the authors of the patches [PATCHES](PATCHES.md)
(Tonton Couillon, dcat,  Jochen Sprickerhof, M Farkas-Dyck, Ivan Tham,
 Ori Bernstein, Matthias Schoth, Laslo Hunhold, Paride Legovini, Lorenzo Bracco,
 Kamil Kleban, Avi Halachmi, Jacob Prosser, Augusto Born de Oliveira,
 Kai Hendry, Laslo Hunhold, Matthew Parnell, Doug Whiteley, Aleksandrs Stier,
 Devin J. Pohly, Sai Praneeth Reddy)

My apologies for not pushing the work back to suckless,
but the heavy changes and the not so simple additions
let me seem this neither easy nor following the suckless philosophy;
and it wouldn't be possible to submit "patches" anymore.


code:
# build configuration
# More options to configure are in src/config.h
# This is a makefile, included by src/Makefile

# Set to 0
SHOWCONFIGINFO := 1

# Dump debugging info
# Values: 0 (off), 1 (on)
ENABLEDEBUG := 0

# Dump all available debug
FULLDEBUG := 0

# version
VERSION := 0.99.5.7

# Set to 1 enable Xresource configuration
# (in addition, slterm has to be started with the option "-x on")
XRESOURCES := 0

# embed terminfo and manual page (+12k)
EMBEDRESOURCES := 1

# Embed fonts into the binary
EMBEDFONT := 0

# utf8-support (currently abandoned. Will not work )
#UTF8 := 0

# Length of history, in bits, -> log(size in lines) ~ bits */
# 8 equals 1<<8 = 256 lines, 9 = 512, 10 = 1024, ..
HISTSIZEBITS := 16
#HISTSIZEBITS = 7

# opt Flag. -O2 might be save, -O3 sometimes gives troubles
OPT_FLAG := -Os
#OPT_FLAG = -g

# Linker Flags
#LINKER_FLAG = -g
LINKER_FLAG := -Os -s

# paths
PREFIX := /usr/local
MANPREFIX := $(PREFIX)/share/man

X11INC := /usr/X11R6/include
X11LIB := /usr/X11R6/lib

# Executables

# pkg-config
PKG_CONFIG := pkg-config

# compiler and linker
CC := gcc

# gcc options
OPTIONS := -Wall

# enable bzip2 fonts
#OPTIONS += -DWITHBZIP2 -lbz2


code:
Package: slterm
Version: VERSION
Section: base
Priority: optional
Architecture: all
Maintainer: misc147 <misc147@disroot.org>
Depends: libfreetype6, libxft2, libfontconfig1, fonts-liberation
Description: slterm - slim terminal for X

path: dist/debian/DEBIAN/control


path: dist/debian/DEBIAN/postinst


code:
Unicode encoding needs 4 Bytes per char within st,
and I nearly never need unicode chars in the terminal.

Same for rgb colors. Stripping them of st spares 6 Bytes per Glyph.

Before the changes every Glyph needed 15 Bytes,
now it's 4 Bytes. I personally prefer having a quite big (10.000 lines or more)
scrollback buffer, so this is a factor.
Resulting in a faster and more responsive terminal emulation.

![](images/vt-102-1984.jpg)

<small>
>(..I'd propose, unicode isn't needed for system administration/
development at all. You are going to get into all sort of troubles,
when, e.g., you'd be naming files and directories in the root fs
using unicode characters. Furthermore, let's assume, there are, say,
100.000 instances of st running. Now, on the world. Multiply this
with, umm, 10 MB, multiply with cpu cycles of 100.000 (swapping, and so on),
and . It's not theoretical anymore. Ok. The calculation might be a little bit too easy.
Admittedly, you shouldn't multiply memory and cpu cycles.
Anyways, my point is valid. And there is the computing time to add,
generated by typos. Adding a unicode character in the wrong script could create.. uuh
never mind. But it's a good reason to stick to KISS (keep it simple, stupid..) principles.
Murphy's law will strike, anyways. That's the law..)
</small>

So, in my quest to slim down all programs I'm using,
I'm about to strip unicode and utf8 support.

Yet I managed to get a virtual memory footprint of around 8MB.
Ok. Added all patches, and with the current history of 10k lines,
it's at 12MB.
(>20MB before)
I'm always keeping more than 10 terminals open,
so that sums up.
Every Glyph (char at the screen, with attributes and colors) now
needs 4 Bytes. ( 15 Bytes before stripping unicode and rgb)

The smaller memory footprint also pays out in a more responsive
system overall, improving st's speed as well. (3x here) Ok.
I tried hard, to get "benchmarks", the removed unicode support
doesn't profit of. Still, this shows up with a gain of 2x.

I checked several emulators, closest in terms of performance would be
urxvt. However, testing and comparing more, the speed of urxvt is given
by a (neat) trick. When dumping many chars into the terminal, eg. with cat,
the screen doesn't show every single character. It's more sort of an animation,
showing only enough chars to give the perception of a continous scrolling
terminal. When confronted with, e.g., a `dd if=data bs=1000`;
this cheat doesn't work anymore, dumping the data takes (depending on the size, etc)
up to 20times longer.
st seems to be the fastest terminal emulator available.

The (pseudo) rgb color support is stripped.
Saving 6 Bytes per glyph.
There still is the option to
have "rgb" colors via modifying the indexed 256 color palette,
the default is the ("standardized") xterm 256 color palette.
This slims down the memory usage of the colors from 8 Bytes to 2 Bytes per glyph.

;) To quote Bill, 256 colors ought be enough for everyone.
(Am I confusing something..?..)

![](images/noticket.jpg)


code:
Some of the ansi escape sequences,
also documented in ./doc/..

Available colors can be displayed with the script ansicolors.sh in ./test

COLORS
------

'\e[X1m'
'\e[X1;X2m'
'\e[X1;X2;X3m'
...

X1..X defines color and attributes.

30..37: foreground color
40..47: background color

colors, in order:

black
red
green
yellow(brown)
blue
magenta
cyan
white(gray)

90..97: bold fg color
100..107: bold  bg color

ATTRIBUTES
----------

0 	clear all attributes
1	bold
2	faint
3	cursive
4	underline
5	blink
6	blink
7	reverse
9	strikethrough
21	double underline

attributes can be combined, also 1 and 2 (=bold_faint)
combining blink and reverse blinks by reversing
foreground and background colors.
strikethrough and underline gets double underline

255 COLORS
----------

foreground: '\e[38;5;XXm'

xx one of 16-255

background: '\e[48;5;XXm'

CURSOR
------

'\e[X q'

standard (no blinking):
1,2: block cursor
3,4: underline
5,6: vertical bar

slterm:
  7: 'X'
7;Y: Y is the ascii code of the char, used as cursor
  8: double underline
  9: empty block
 10: underline, two lines at the sides
 11: underline and overline, lines right and left
 12: overline, lines right and left


code:
VT100.net VT102 User Guide

   --------------------------------------------------------------------------

                Table 5-2 Control Characters Recognized by VT102
         Character       Mnemonic  Octal Code            Function
   --------------------------------------------------------------------------
    Null                 NUL       000         Ignored when received (not
                                               stored in input buffer) and
                                               used as a fill character.
    End of text          ETX       003         Can be selected as a
                                               half-duplex turnaround
                                               character.
    End of transmission  EOT       004         Can be selected as a
                                               disconnect character or
                                               half-duplex turnaround
                                               character. When used as a
                                               turnaround character, the
                                               disconnect character is
                                               DLE-EOT.
    Enquire              ENQ       005         Transmits answerback message.
    Bell                 BEL       007         Generates bell tone.
    Backspace            BS        010         Moves cursor to the left one
                                               character position; if cursor
                                               is at left margin, no action
                                               occurs.
    Horizontal tab       HT        011         Moves cursor to next tab
                                               stop, or to right margin if
                                               there are no more tab stops.
    Linefeed             LF        012         Causes a linefeed or a new
                                               line operation. (See
                                               Linefeed/New Line). Also
                                               causes printing if auto print
                                               operation is selected.
    Vertical tab         VT        013         Processed as LF.
    Form feed            FF        014         Processed as LF. FF can also
                                               be selected as a half-duplex
                                               turnaround character.
    Carriage return      CR        015         Moves cursor to left margin
                                               on current line. CR can also
                                               be selected as a half-duplex
                                               turnaround character.
    Shift out            SO        016         Selects G1 character set
                                               designated by a select
                                               character set sequence.
    Shift in             SI        017         Selects G0 character set
                                               designated by a select
                                               character set sequence.
    Device control 1     DC1       021         Processed as XON. DC1 causes
                                               terminal to continue
                                               transmitting characters.
    Device control 3     DC3       023         Processed as XOFF. DC3 causes
                                               terminal to stop transmitting
                                               all characters except XOFF
                                               and XON. DC3 can also be
                                               selected as a half-duplex
                                               turnaround character.
    Cancel               CAN       030         If received during an escape
                                               or control sequence, cancels
                                               the sequence and displays
                                               substitution character
                                               ([4][]).
    Substitute           SUB       032         Processed as CAN.
    Escape               ESC       033         Processed as a sequence
                                               introducer.

   --------------------------------------------------------------------------

source:
   VT100.net VT102 User Guide
   http://vt100.net/docs/vt102-ug/table5-2.html


code:
<colgroup><col width="150"/><col width="220"/><col width="100"/></colgroup>

                 	AliceBlue	#F0F8FF

 	BlueViolet	#8A2BE2

 	CadetBlue	#5F9EA0

 	CadetBlue1	#98F5FF

 	CadetBlue2	#8EE5EE

 	CadetBlue3	#7AC5CD

 	CadetBlue4	#53868B

 	CornflowerBlue	#6495ED

 	DarkBlue	#00008B

 	DarkCyan	#008B8B

 	DarkSlateBlue	#483D8B

 	DarkTurquoise	#00CED1

 	DeepSkyBlue	#00BFFF

 	DeepSkyBlue1	#00BFFF

 	DeepSkyBlue2	#00B2EE

 	DeepSkyBlue3	#009ACD

 	DeepSkyBlue4	#00688B

 	DodgerBlue	#1E90FF

 	DodgerBlue1	#1E90FF

 	DodgerBlue2	#1C86EE

 	DodgerBlue3	#1874CD

 	DodgerBlue4	#104E8B

 	LightBlue	#ADD8E6

 	LightBlue1	#BFEFFF

 	LightBlue2	#B2DFEE

 	LightBlue3	#9AC0CD

 	LightBlue4	#68838B

 	LightCyan	#E0FFFF

 	LightCyan1	#E0FFFF

 	LightCyan2	#D1EEEE

 	LightCyan3	#B4CDCD

 	LightCyan4	#7A8B8B

 	LightSkyBlue	#87CEFA

 	LightSkyBlue1	#B0E2FF

 	LightSkyBlue2	#A4D3EE

 	LightSkyBlue3	#8DB6CD

 	LightSkyBlue4	#607B8B

 	LightSlateBlue	#8470FF

 	LightSteelBlue	#B0C4DE

 	LightSteelBlue1	#CAE1FF

 	LightSteelBlue2	#BCD2EE

 	LightSteelBlue3	#A2B5CD

 	LightSteelBlue4	#6E7B8B

 	MediumAquamarine	#66CDAA

 	MediumBlue	#0000CD

 	MediumSlateBlue	#7B68EE

 	MediumTurquoise	#48D1CC

 	MidnightBlue	#191970

 	NavyBlue	#000080

 	PaleTurquoise	#AFEEEE

 	PaleTurquoise1	#BBFFFF

 	PaleTurquoise2	#AEEEEE

 	PaleTurquoise3	#96CDCD

 	PaleTurquoise4	#668B8B

 	PowderBlue	#B0E0E6

 	RoyalBlue	#4169E1

 	RoyalBlue1	#4876FF

 	RoyalBlue2	#436EEE

 	RoyalBlue3	#3A5FCD

 	RoyalBlue4	#27408B

 	SkyBlue	#87CEEB

 	SkyBlue1	#87CEFF

 	SkyBlue2	#7EC0EE

 	SkyBlue3	#6CA6CD

 	SkyBlue4	#4A708B

 	SlateBlue	#6A5ACD

 	SlateBlue1	#836FFF

 	SlateBlue2	#7A67EE

 	SlateBlue3	#6959CD

 	SlateBlue4	#473C8B

 	SteelBlue	#4682B4

 	SteelBlue1	#63B8FF

 	SteelBlue2	#5CACEE

 	SteelBlue3	#4F94CD

 	SteelBlue4	#36648B

 	aquamarine	#7FFFD4

 	aquamarine1	#7FFFD4

 	aquamarine2	#76EEC6

 	aquamarine3	#66CDAA

 	aquamarine4	#458B74

 	azure	#F0FFFF

 	azure1	#F0FFFF

 	azure2	#E0EEEE

 	azure3	#C1CDCD

 	azure4	#838B8B

 	blue	#0000FF

 	blue1	#0000FF

 	blue2	#0000EE

 	blue3	#0000CD

 	blue4	#00008B

 	cyan	#00FFFF

 	cyan1	#00FFFF

 	cyan2	#00EEEE

 	cyan3	#00CDCD

 	cyan4	#008B8B

 	navy	#000080

 	turquoise	#40E0D0

 	turquoise1	#00F5FF

 	turquoise2	#00E5EE

 	turquoise3	#00C5CD

 	turquoise4	#00868B

<colgroup><col width="150"/><col width="220"/><col width="100"/><col width="120" class="rgb_column"/></colgroup>

 	RosyBrown	#BC8F8F

 	RosyBrown1	#FFC1C1

 	RosyBrown2	#EEB4B4

 	RosyBrown3	#CD9B9B

 	RosyBrown4	#8B6969

 	SaddleBrown	#8B4513

 	SandyBrown	#F4A460

 	beige	#F5F5DC

 	brown	#A52A2A

 	brown1	#FF4040

 	brown2	#EE3B3B

 	brown3	#CD3333

 	brown4	#8B2323

 	burlywood	#DEB887

 	burlywood1	#FFD39B

 	burlywood2	#EEC591

 	burlywood3	#CDAA7D

 	burlywood4	#8B7355

 	chocolate	#D2691E

 	chocolate1	#FF7F24

 	chocolate2	#EE7621

 	chocolate3	#CD661D

 	chocolate4	#8B4513

 	peru	#CD853F

 	tan	#D2B48C

 	tan1	#FFA54F

 	tan2	#EE9A49

 	tan3	#CD853F

 	tan4	#8B5A2B

<colgroup><col width="150"/><col width="220"/><col width="100"/><col width="120" class="rgb_column"/></colgroup>

 	DarkGreen	#006400

 	DarkKhaki	#BDB76B

 	DarkOliveGreen	#556B2F

 	DarkOliveGreen1	#CAFF70

 	DarkOliveGreen2	#BCEE68

 	DarkOliveGreen3	#A2CD5A

 	DarkOliveGreen4	#6E8B3D

 	DarkSeaGreen	#8FBC8F

 	DarkSeaGreen1	#C1FFC1

 	DarkSeaGreen2	#B4EEB4

 	DarkSeaGreen3	#9BCD9B

 	DarkSeaGreen4	#698B69

 	ForestGreen	#228B22

 	GreenYellow	#ADFF2F

 	LawnGreen	#7CFC00

 	LightGreen	#90EE90

 	LightSeaGreen	#20B2AA

 	LimeGreen	#32CD32

 	MediumSeaGreen	#3CB371

 	MediumSpringGreen	#00FA9A

 	MintCream	#F5FFFA

 	OliveDrab	#6B8E23

 	OliveDrab1	#C0FF3E

 	OliveDrab2	#B3EE3A

 	OliveDrab3	#9ACD32

 	OliveDrab4	#698B22

 	PaleGreen	#98FB98

 	PaleGreen1	#9AFF9A

 	PaleGreen2	#90EE90

 	PaleGreen3	#7CCD7C

 	PaleGreen4	#548B54

 	SeaGreen	#2E8B57

 	SeaGreen1	#54FF9F

 	SeaGreen2	#4EEE94

 	SeaGreen3	#43CD80

 	SeaGreen4	#2E8B57

 	SpringGreen	#00FF7F

 	SpringGreen1	#00FF7F

 	SpringGreen2	#00EE76

 	SpringGreen3	#00CD66

 	SpringGreen4	#008B45

 	YellowGreen	#9ACD32

 	chartreuse	#7FFF00

 	chartreuse1	#7FFF00

 	chartreuse2	#76EE00

 	chartreuse3	#66CD00

 	chartreuse4	#458B00

 	green	#00FF00

 	green1	#00FF00

 	green2	#00EE00

 	green3	#00CD00

 	green4	#008B00

 	khaki	#F0E68C

 	khaki1	#FFF68F

 	khaki2	#EEE685

 	khaki3	#CDC673

 	khaki4	#8B864E

<colgroup><col width="150"/><col width="220"/><col width="100"/><col width="120" class="rgb_column"/></colgroup>

 	DarkOrange	#FF8C00

 	DarkOrange1	#FF7F00

 	DarkOrange2	#EE7600

 	DarkOrange3	#CD6600

 	DarkOrange4	#8B4500

 	DarkSalmon	#E9967A

 	LightCoral	#F08080

 	LightSalmon	#FFA07A

 	LightSalmon1	#FFA07A

 	LightSalmon2	#EE9572

 	LightSalmon3	#CD8162

 	LightSalmon4	#8B5742

 	PeachPuff	#FFDAB9

 	PeachPuff1	#FFDAB9

 	PeachPuff2	#EECBAD

 	PeachPuff3	#CDAF95

 	PeachPuff4	#8B7765

 	bisque	#FFE4C4

 	bisque1	#FFE4C4

 	bisque2	#EED5B7

 	bisque3	#CDB79E

 	bisque4	#8B7D6B

 	coral	#FF7F50

 	coral1	#FF7256

 	coral2	#EE6A50

 	coral3	#CD5B45

 	coral4	#8B3E2F

 	honeydew	#F0FFF0

 	honeydew1	#F0FFF0

 	honeydew2	#E0EEE0

 	honeydew3	#C1CDC1

 	honeydew4	#838B83

 	orange	#FFA500

 	orange1	#FFA500

 	orange2	#EE9A00

 	orange3	#CD8500

 	orange4	#8B5A00

 	salmon	#FA8072

 	salmon1	#FF8C69

 	salmon2	#EE8262

 	salmon3	#CD7054

 	salmon4	#8B4C39

 	sienna	#A0522D

 	sienna1	#FF8247

 	sienna2	#EE7942

 	sienna3	#CD6839

 	sienna4	#8B4726

<colgroup><col width="150"/><col width="220"/><col width="100"/><col width="120" class="rgb_column"/></colgroup>

 	DarkRed	#8B0000

 	DeepPink	#FF1493

 	DeepPink1	#FF1493

 	DeepPink2	#EE1289

 	DeepPink3	#CD1076

 	DeepPink4	#8B0A50

 	HotPink	#FF69B4

 	HotPink1	#FF6EB4

 	HotPink2	#EE6AA7

 	HotPink3	#CD6090

 	HotPink4	#8B3A62

 	IndianRed	#CD5C5C

 	IndianRed1	#FF6A6A

 	IndianRed2	#EE6363

 	IndianRed3	#CD5555

 	IndianRed4	#8B3A3A

 	LightPink	#FFB6C1

 	LightPink1	#FFAEB9

 	LightPink2	#EEA2AD

 	LightPink3	#CD8C95

 	LightPink4	#8B5F65

 	MediumVioletRed	#C71585

 	MistyRose	#FFE4E1

 	MistyRose1	#FFE4E1

 	MistyRose2	#EED5D2

 	MistyRose3	#CDB7B5

 	MistyRose4	#8B7D7B

 	OrangeRed	#FF4500

 	OrangeRed1	#FF4500

 	OrangeRed2	#EE4000

 	OrangeRed3	#CD3700

 	OrangeRed4	#8B2500

 	PaleVioletRed	#DB7093

 	PaleVioletRed1	#FF82AB

 	PaleVioletRed2	#EE799F

 	PaleVioletRed3	#CD6889

 	PaleVioletRed4	#8B475D

 	VioletRed	#D02090

 	VioletRed1	#FF3E96

 	VioletRed2	#EE3A8C

 	VioletRed3	#CD3278

 	VioletRed4	#8B2252

 	firebrick	#B22222

 	firebrick1	#FF3030

 	firebrick2	#EE2C2C

 	firebrick3	#CD2626

 	firebrick4	#8B1A1A

 	pink	#FFC0CB

 	pink1	#FFB5C5

 	pink2	#EEA9B8

 	pink3	#CD919E

 	pink4	#8B636C

 	red	#FF0000

 	red1	#FF0000

 	red2	#EE0000

 	red3	#CD0000

 	red4	#8B0000

 	tomato	#FF6347

 	tomato1	#FF6347

 	tomato2	#EE5C42

 	tomato3	#CD4F39

 	tomato4	#8B3626

<colgroup><col width="150"/><col width="220"/><col width="100"/><col width="120" class="rgb_column"/></colgroup>

 	DarkMagenta	#8B008B

 	DarkOrchid	#9932CC

 	DarkOrchid1	#BF3EFF

 	DarkOrchid2	#B23AEE

 	DarkOrchid3	#9A32CD

 	DarkOrchid4	#68228B

 	DarkViolet	#9400D3

 	LavenderBlush	#FFF0F5

 	LavenderBlush1	#FFF0F5

 	LavenderBlush2	#EEE0E5

 	LavenderBlush3	#CDC1C5

 	LavenderBlush4	#8B8386

 	MediumOrchid	#BA55D3

 	MediumOrchid1	#E066FF

 	MediumOrchid2	#D15FEE

 	MediumOrchid3	#B452CD

 	MediumOrchid4	#7A378B

 	MediumPurple	#9370DB

 	MediumPurple1	#AB82FF

 	MediumPurple2	#9F79EE

 	MediumPurple3	#8968CD

 	MediumPurple4	#5D478B

 	lavender	#E6E6FA

 	magenta	#FF00FF

 	magenta1	#FF00FF

 	magenta2	#EE00EE

 	magenta3	#CD00CD

 	magenta4	#8B008B

 	maroon	#B03060

 	maroon1	#FF34B3

 	maroon2	#EE30A7

 	maroon3	#CD2990

 	maroon4	#8B1C62

 	orchid	#DA70D6

 	orchid1	#FF83FA

 	orchid2	#EE7AE9

 	orchid3	#CD69C9

 	orchid4	#8B4789

 	plum	#DDA0DD

 	plum1	#FFBBFF

 	plum2	#EEAEEE

 	plum3	#CD96CD

 	plum4	#8B668B

 	purple	#A020F0

 	purple1	#9B30FF

 	purple2	#912CEE

 	purple3	#7D26CD

 	purple4	#551A8B

 	thistle	#D8BFD8

 	thistle1	#FFE1FF

 	thistle2	#EED2EE

 	thistle3	#CDB5CD

 	thistle4	#8B7B8B

 	violet	#EE82EE

<colgroup><col width="150"/><col width="220"/><col width="100"/><col width="120" class="rgb_column"/></colgroup>

 	AntiqueWhite	#FAEBD7

 	AntiqueWhite1	#FFEFDB

 	AntiqueWhite2	#EEDFCC

 	AntiqueWhite3	#CDC0B0

 	AntiqueWhite4	#8B8378

 	FloralWhite	#FFFAF0

 	GhostWhite	#F8F8FF

 	NavajoWhite	#FFDEAD

 	NavajoWhite1	#FFDEAD

 	NavajoWhite2	#EECFA1

 	NavajoWhite3	#CDB38B

 	NavajoWhite4	#8B795E

 	OldLace	#FDF5E6

 	WhiteSmoke	#F5F5F5

 	gainsboro	#DCDCDC

 	ivory	#FFFFF0

 	ivory1	#FFFFF0

 	ivory2	#EEEEE0

 	ivory3	#CDCDC1

 	ivory4	#8B8B83

 	linen	#FAF0E6

 	seashell	#FFF5EE

 	seashell1	#FFF5EE

 	seashell2	#EEE5DE

 	seashell3	#CDC5BF

 	seashell4	#8B8682

 	snow	#FFFAFA

 	snow1	#FFFAFA

 	snow2	#EEE9E9

 	snow3	#CDC9C9

 	snow4	#8B8989

 	wheat	#F5DEB3

 	wheat1	#FFE7BA

 	wheat2	#EED8AE

 	wheat3	#CDBA96

 	wheat4	#8B7E66

 	white	#FFFFFF

<colgroup><col width="150"/><col width="220"/><col width="100"/><col width="120" class="rgb_column"/></colgroup>

 	BlanchedAlmond	#FFEBCD

 	DarkGoldenrod	#B8860B

 	DarkGoldenrod1	#FFB90F

 	DarkGoldenrod2	#EEAD0E

 	DarkGoldenrod3	#CD950C

 	DarkGoldenrod4	#8B6508

 	LemonChiffon	#FFFACD

 	LemonChiffon1	#FFFACD

 	LemonChiffon2	#EEE9BF

 	LemonChiffon3	#CDC9A5

 	LemonChiffon4	#8B8970

 	LightGoldenrod	#EEDD82

 	LightGoldenrod1	#FFEC8B

 	LightGoldenrod2	#EEDC82

 	LightGoldenrod3	#CDBE70

 	LightGoldenrod4	#8B814C

 	LightGoldenrodYellow	#FAFAD2

 	LightYellow	#FFFFE0

 	LightYellow1	#FFFFE0

 	LightYellow2	#EEEED1

 	LightYellow3	#CDCDB4

 	LightYellow4	#8B8B7A

 	PaleGoldenrod	#EEE8AA

 	PapayaWhip	#FFEFD5

 	cornsilk	#FFF8DC

 	cornsilk1	#FFF8DC

 	cornsilk2	#EEE8CD

 	cornsilk3	#CDC8B1

 	cornsilk4	#8B8878

 	gold	#FFD700

 	gold1	#FFD700

 	gold2	#EEC900

 	gold3	#CDAD00

 	gold4	#8B7500

 	goldenrod	#DAA520

 	goldenrod1	#FFC125

 	goldenrod2	#EEB422

 	goldenrod3	#CD9B1D

 	goldenrod4	#8B6914

 	moccasin	#FFE4B5

 	yellow	#FFFF00

 	yellow1	#FFFF00

 	yellow2	#EEEE00

 	yellow3	#CDCD00

 	yellow4	#8B8B00


code:
<colgroup><col width="150"/><col width="220"/><col width="100"/></colgroup>

 	DarkSlateGray	#2F4F4F

 	DarkSlateGray1	#97FFFF

 	DarkSlateGray2	#8DEEEE

 	DarkSlateGray3	#79CDCD

 	DarkSlateGray4	#528B8B

 	DimGray	#696969

 	LightGray	#D3D3D3

 	LightSlateGray	#778899

 	SlateGray	#708090

 	SlateGray1	#C6E2FF

 	SlateGray2	#B9D3EE

 	SlateGray3	#9FB6CD

 	SlateGray4	#6C7B8B

 	gray	#BEBEBE

 	gray0	#000000

 	gray1	#030303

 	gray2	#050505

 	gray3	#080808

 	gray4	#0A0A0A

 	gray5	#0D0D0D

 	gray6	#0F0F0F

 	gray7	#121212

 	gray8	#141414

 	gray9	#171717

 	gray10	#1A1A1A

 	gray11	#1C1C1C

 	gray12	#1F1F1F

 	gray13	#212121

 	gray14	#242424

 	gray15	#262626

 	gray16	#292929

 	gray17	#2B2B2B

 	gray18	#2E2E2E

 	gray19	#303030

 	gray20	#333333

 	gray21	#363636

 	gray22	#383838

 	gray23	#3B3B3B

 	gray24	#3D3D3D

 	gray25	#404040

 	gray26	#424242

 	gray27	#454545

 	gray28	#474747

 	gray29	#4A4A4A

 	gray30	#4D4D4D

 	gray31	#4F4F4F

 	gray32	#525252

 	gray33	#545454

 	gray34	#575757

 	gray35	#595959

 	gray36	#5C5C5C

 	gray37	#5E5E5E

 	gray38	#616161

 	gray39	#636363

 	gray40	#666666

 	gray41	#696969

 	gray42	#6B6B6B

 	gray43	#6E6E6E

 	gray44	#707070

 	gray45	#737373

 	gray46	#757575

 	gray47	#787878

 	gray48	#7A7A7A

 	gray49	#7D7D7D

 	gray50	#7F7F7F

 	gray51	#828282

 	gray52	#858585

 	gray53	#878787

 	gray54	#8A8A8A

 	gray55	#8C8C8C

 	gray56	#8F8F8F

 	gray57	#919191

 	gray58	#949494

 	gray59	#969696

 	gray60	#999999

 	gray61	#9C9C9C

 	gray62	#9E9E9E

 	gray63	#A1A1A1

 	gray64	#A3A3A3

 	gray65	#A6A6A6

 	gray66	#A8A8A8

 	gray67	#ABABAB

 	gray68	#ADADAD

 	gray69	#B0B0B0

 	gray70	#B3B3B3

 	gray71	#B5B5B5

 	gray72	#B8B8B8

 	gray73	#BABABA

 	gray74	#BDBDBD

 	gray75	#BFBFBF

 	gray76	#C2C2C2

 	gray77	#C4C4C4

 	gray78	#C7C7C7

 	gray79	#C9C9C9

 	gray80	#CCCCCC

 	gray81	#CFCFCF

 	gray82	#D1D1D1

 	gray83	#D4D4D4

 	gray84	#D6D6D6

 	gray85	#D9D9D9

 	gray86	#DBDBDB

 	gray87	#DEDEDE

 	gray88	#E0E0E0

 	gray89	#E3E3E3

 	gray90	#E5E5E5

 	gray91	#E8E8E8

 	gray92	#EBEBEB

 	gray93	#EDEDED

 	gray94	#F0F0F0

 	gray95	#F2F2F2

 	gray96	#F5F5F5

 	gray97	#F7F7F7

 	gray98	#FAFAFA

 	gray99	#FCFCFC

 	gray100	#FFFFFF


code:
Copied from the documentation of fontconfig

Font Pattern, possible settings

  --------------------------------------------------------------

  antialias       Bool    Whether glyphs can be antialiased
  aspect          Double  Stretches glyphs horizontally before hinting
  autohint        Bool    Use autohinter instead of normal hinter
  capability      String  List of layout capabilities in the font
  charset         CharSet Unicode chars encoded by the font
  color           Bool    Whether any glyphs have color
  decorative      Bool    Whether the style is a decorative variant
  dpi             Double  Target dots per inch
  embeddedbitmap  Bool    Use the embedded bitmap instead of the outline
  embolden        Bool    Rasterizer should synthetically embolden the font
  family          String  Font family names
  familylang      String  Languages corresponding to each family
  file            String  The filename holding the font
  fontfeatures    String  List of the feature tags in OpenType to be enabled
  fontformat      String  String name of the font format
  fontversion     Int     Version number of the font
  foundry         String  Font foundry name
  ftface          FT_Face Use the specified FreeType face object
  fullname        String  Font full names (often includes style)
  fullnamelang    String  Languages corresponding to each fullname
  globaladvance   Bool    Use font global advance data (deprecated)
  hinting         Bool    Whether the rasterizer should use hinting
  hintstyle       Int     Automatic hinting style
  index           Int     The index of the font within the file
  lang            String  List of RFC-3066-style languages this font supports
  lcdfilter       Int     Type of LCD filter
  minspace        Bool    Eliminate leading from line spacing
  namelang        String  Language name, default value of familylang, stylelang, fullnamelang
  outline         Bool    Whether the glyphs are outlines
  pixelsize       Double  Pixel size
  postscriptname  String  Font family name in PostScript
  prgname         String  String  Name of the running program
  rasterizer      String  Which rasterizer is in use (deprecated)
  rgba            Int     unknown, rgb, bgr, vrgb, vbgr, none - subpixel geometry
  scalable        Bool    Whether glyphs can be scaled
  scale           Double  Scale factor for point->pixel conversions (deprecated)
  size            Double  Point size
  slant           Int     Italic, oblique or roman
  spacing         Int     Proportional, dual-width, monospace or charcell
  style           String  Font style. Overrides weight and slant
  stylelang       String  Languages corresponding to each style
  verticallayout  Bool    Use vertical layout
  weight          Int     Light, medium, demibold, bold or black
  width           Int     Condensed, normal or expanded


code:
####   Wed May 6 03:51:53 2020 +0200

    Added keybindings to change the spacing of fonts.

####   Wed May 6 01:03:51 2020 +0200

(Michael Myer)

    Changed the config "system"

    Split config.h.in into config.make and config.h by make.
    (Changed several times accidentally config.h.in within
    the src directory..)
    This might be more clear now.

####   Tue May 5 23:34:29 2020 +0200

(Michael Myer)

    Added "mode-less": Scrolling without Shift

    Enter with Ctrl+Shift+l "modeless".
    Scroll around, without holding Shift.
    <Esc> or <q> quit this mode.
    Added Home/End: Scroll to top/bottom.

####   Tue May 5 22:50:39 2020 +0200

(Michael Myer)

    Tue May  5 22:50:39 CEST 2020

####   Tue May 5 18:59:30 2020 +0200

(Michael Myer)

    fixed ascii (cp1250) input

    minor bugfix.
    Beeing honest, some black magic seems to work.

####   Tue May 5 17:35:35 2020 +0200

(Michael Myer)

    Tue May  5 17:35:35 CEST 2020

####   Tue May 5 17:06:02 2020 +0200

(Michael Myer)

    Tue May  5 17:06:02 CEST 2020
Notes:

    Tagging this 1.0.rc1

    Yet finally st runs solid stable,
    also on frequent size resize events.
    I have worked with st in this version for several months now,
    at least at the systems I worked, I didn't experience severe bugs.
    The most annoying has been st crashing on frequent resizes. (Using i3)
    This I fixed finally by keeping the terminal`s and history`s width,
    so they do not need to be reallocated on every resize event.

    I guess, this has nothing to do with st,
    instead with the implementation of xmalloc
    within the xserver.

    Anyways. I will test this for a while,
    but I'm overall satisfied with my modifications.

    The only thing I'm still thinking about is a performance
    related modification of the history's buffer.
    Atm, the terminal and the history buffer are separated.
    This is somehow not nice. Would be nice to blend the terminal buffer
    directly into the history.
    However, this is - more likely just a matter of programming art and style.

    I believe, I'm already able to claim the fastest terminal emulator for X.
    Sparing the copies, and also avoiding some memory fragmentation,
    might give some further performance gain.
    But other things would be more interesting to me. e.g.,
    having a graphical menu bar.
    Or, a "scrollback" mode, where the cursor keys are
    mapped to a less style scrolling mode.
    The biggest problem I still do have is the untydiness of the code base.
    I'm sorry to say that, but stuffing all the code into one single file - well.
    Makes it hard to get into.
    I separated the single source file into several source and header files.
    But still some global vars and so on do make modifications hard.

    For now, I tag this 1.0.rc1.
    Since it seems finally stable with my modicifactions.

####   Tue May 5 16:43:14 2020 +0200

(Michael Myer)

    Added devlog. Extract log from git

####   Mon May 4 20:19:14 2020 +0200

(Michael Myer)

    history doesn't shrink on resize

    The history doesn't shrink on resize anymore.
    The content of a larger screen keeps saved.
Notes:

    Not resizing the history to a lower width
    seems to be far more stable.
    Although I guess, the crashes on frequent size changes before
    have to do with internals of the xserver,
    I got quite bored by this.
    I'm using i3, and therefore resize events are happening quite often here.
    Seems stable now.
    I'm still testing. But might be the time for a release now.

####   Mon May 4 19:17:50 2020 +0200

(Michael Myer)

    Mon May  4 19:17:49 CEST 2020

####   Wed Apr 22 09:55:26 2020 +0200

(Michael Myer)

    Scrolling with Shift+Up/Down

    Enabled Shift+Up/Down. Scroll Up, down 3 lines.
    (Set in config.h.in)
#### (minor)

(Michael Myer)

     (Mon Feb 10 07:50:35 2020 +0100)
     (Mon Feb 10 07:45:10 2020 +0100)

#### (Tue Jan 21 12:43:01 2020 +0100)

(Michael Myer)

    Tue Jan 21 12:43:01 CET 2020
#### (minor)

(Michael Myer)

     (Thu Jan 16 22:57:32 2020 +0100)

#### (Thu Jan 16 16:21:04 2020 +0100)

(Michael Myer)

    minor

####   Thu Jan 16 16:19:54 2020 +0100

(Michael Myer)

    Cleanup

####   Thu Jan 16 15:23:59 2020 +0100

(Michael Myer)

    splitting sources
Notes:

    Oh man. Tydied the whole day.
    Now the sun sets down.
    I should take a picture of my workrooms view here.
    I like it. And it's nicely quit. Just the birds.
    Possibly I should think about getting more flexible again.
    Being always in the city is not that good.
    On the other hand, I obviously need the city's life.
    It really is closely related with my life itself.
    IF there's something left. What is not really certain.

####   Thu Jan 16 15:15:44 2020 +0100

(Michael Myer)

    Splitting sources

####   Thu Jan 16 10:03:20 2020 +0100

(Michael Myer)

    remove compile time header

####   Thu Jan 16 10:02:25 2020 +0100

(Michael Myer)

    Cleanup. Split sources
Notes:

    Still cleaning up.
    The former main file, st.c, gets more easy to look through.
    But still is close to 2000 loc's.
    I'm going to remove the usage of globals as far as possible.

    I'd like to merge two buf's, the history buf, and the current screen buf.
    Atm, the screen is copied to the history, when scrolling,
    and vice versa.
    That's unneccessary. Would be much nicer to have a "virtual" screen buf just pointing to
    a line in the history buf.

    As soon, I have managed to split the according source files further,
    this might be quite more easy to change to.
    The rule, try to keep all your source files below 1000 loc's -
    Albeit I include the source files itself into the main source file,
    splitting the files also into different "namespaces" (virtually)
    is really helpful.

    Maybe it's my experience (and love) with perl - there you don't have any rules at all obliged.
    But very soon you'll see, you should give yourself the rules. Of, e.g., "virtual"
    namespaces. It's like working with goto's. Goto's are there, behind
    every language. And in most languages you are able use them.
    And, when optimizing close to hardware level, you should use them.
    The compiler is not always as good as it's being told.
    However, use gotos wisely .. ;) The spaggeti monster isn't only a fairy tale,
    it snoozed you out, and when not being careful, will crunch you again.

####   Thu Jan 16 09:37:09 2020 +0100

(Michael Myer)

    cleanup. utf8 macros.

####   Thu Jan 16 09:26:09 2020 +0100

(Michael Myer)

    cleanup. dir src created

####   Thu Jan 16 09:07:48 2020 +0100

(Michael Myer)

    Cleanup. Indentation

####   Thu Jan 16 09:06:45 2020 +0100

(Michael Myer)

    Splitting sources

####   Thu Jan 16 08:58:07 2020 +0100

(Michael Myer)

    cleanup. splitting sources
#### (minor)

(Michael Myer)

     (Wed Jan 15 20:43:17 2020 +0100)

#### (Sun Jan 12 22:45:39 2020 +0100)

(Michael Myer)

    sources separated. working on resize()

####   Sun Jan 12 18:48:24 2020 +0100

(Michael Myer)

    Splitted the source files. Optimizing flag

    This is interesting.
    By including all source files into one file,
    and adding the option -fwhole-program to the gcc options,
    the whole thing is quite more responsive.
    So, somehow it seems to me,
    the traditional approach of splitting all sources
    into source (.c) and header file (.h) is a relict
    of times, when every single object file took
    at least several seconds to compile.
    Nowadays, and my development system is quite old -
    this splitting is not needed anymore.
    So it seems to me now.
    At least for "smaller" projects.

####   Sun Jan 12 17:41:17 2020 +0100

(Michael Myer)

    debugging header

####   Sun Jan 12 17:40:39 2020 +0100

(Michael Myer)

    splitting sourcefiles

####   Sun Jan 12 09:01:25 2020 +0100

(Michael Myer)

    tagging 0.9.rc4

    Everything seems to work.
    I'm still about to add changes for rebuilding the history
    on resize events, so linewraps and so on will show up correctly.
    Somehow, it's a bit tricky. So I'm going to clean the sources now, also
    separating into more different files.
    Before I tag this 0.9.rc4.
    Somehow I'm fixed on having the linewrap actualization work.
    Yet, all these mallocs and free's give segfaults. :/
    As usual. I personally would have written some things in another way,
    from the beginning. Maybe I should do some further changes.
    Now some inconsistencies show up.
    Having the history and the current screen's line buf separated is one of
    the annoyances to me. It's simply unneccessary.
    But deeply in the sources.
    Anyways - I'm going to do some tidying work now.

####   Sun Jan 12 01:23:09 2020 +0100

(Michael Myer)

    documentation

####   Sun Jan 12 01:23:05 2020 +0100

(Michael Myer)

    documentation
#### (minor)

(Michael Myer)

     (Sun Jan 12 01:20:19 2020 +0100)
     (Sun Jan 12 01:16:31 2020 +0100)

#### (Sun Jan 12 01:07:41 2020 +0100)

(Michael Myer)

    docu, manpage
#### (minor)

(Michael Myer)

     (Sun Jan 12 00:02:52 2020 +0100)
     (Sat Jan 11 23:48:05 2020 +0100)
     (Sat Jan 11 23:45:07 2020 +0100)
     (Sat Jan 11 23:23:44 2020 +0100)
     (Sat Jan 11 23:23:02 2020 +0100)

#### (Sat Jan 11 23:18:35 2020 +0100)

(Michael Myer)

    gcc flags

####   Sat Jan 11 23:17:38 2020 +0100

(Michael Myer)

    Cleanup
#### (minor)

(Michael Myer)

     (Sat Jan 11 23:16:31 2020 +0100)
     (Sat Jan 11 23:16:06 2020 +0100)

#### (Sat Jan 11 23:12:07 2020 +0100)

(Michael (misc) Myer)

    Update README.md
#### (minor)

(Michael (misc) Myer)

     (Sat Jan 11 23:09:20 2020 +0100)
     (Sat Jan 11 23:07:42 2020 +0100)
     (Sat Jan 11 23:03:58 2020 +0100)

#### (Sat Jan 11 23:02:28 2020 +0100)

(Michael Myer)

    logging

####   Sat Jan 11 22:31:05 2020 +0100

(Michael Myer)

    Tagging 0.9.rc3 (b)

####   Sat Jan 11 22:11:36 2020 +0100

(Michael Myer)

    needed for shared library

####   Sat Jan 11 22:09:09 2020 +0100

(Michael Myer)

    tag this 0.9rc3. Seems to be stable.

####   Sat Jan 11 21:34:28 2020 +0100

(Michael Myer)

    backup

####   Sat Jan 11 14:11:23 2020 +0100

(Michael Myer)

    Dump more verbose info on version and compile spec

####   Sat Jan 11 12:50:29 2020 +0100

(Michael Myer)

    Debugging switch in config.h.in.

    Enable (global) debugging now with the debug flag in config.h.in
    Might be useful for reporting bugs.
    (when encountering a bug, please compile with debugging
    set to level 1, and save the output.
    st-asc > log.txt

####   Sat Jan 11 11:06:36 2020 +0100

(Michael Myer)

    docu

####   Sat Jan 11 11:02:34 2020 +0100

(Michael Myer)

    Optimization for non Utf8.

    Copy int32 at once, instead of byte for byte.
    Could be further optimized; but I don't
    want it too machine dependent.
    (Now this depends on unsigned int being 32bit long.
    And could be adapted easily.)
    Byte for Byte, eye for eye. :) I guess,
    this doesn]t work in English.

####   Fri Jan 10 22:55:36 2020 +0100

(Michael Myer)

    save compiler info in the binary

####   Fri Jan 10 22:54:25 2020 +0100

(Michael Myer)

    README

####   Fri Jan 10 19:41:41 2020 +0100

(Michael Myer)

    x.h added, needed for the creation of st-asc as shared library

####   Fri Jan 10 19:39:56 2020 +0100

(Michael Myer)

    Edited the config "system".

    Now only one file, config.h.in, needs to be edited.

####   Fri Jan 10 19:36:52 2020 +0100

(Michael Myer)

    Dynamic allocation of the history buffer

    Made the allocation of the memory for the hist buf dynamic.
    for, e.g., 16k lines of history, this results in around 6MB Memory
    (depending on the terminal's width);
    which are now allocated dynamically.
Notes:

    if utf8 is enabled, the saving is more than 30/40MB,
    depending on the terminal's width and the history len.

####   Fri Jan 10 17:18:18 2020 +0100

(Michael Myer)

    configuration via one file only

####   Fri Jan 10 16:46:29 2020 +0100

(Michael Myer)

    v0.9rc2

####   Fri Jan 10 16:44:38 2020 +0100

(Michael Myer)

    cleanup

####   Fri Jan 10 16:24:25 2020 +0100

(Michael Myer)

    utf8 compileswitch seems to work

####   Fri Jan 10 02:35:46 2020 +0100

(Michael Myer)

    Optimizations. Option to build a shared version

    The optimizations finally start to give better results.
    To name them: No temporary vars for swapping of values,
    instead xor exchange
    No division/modulo, replaced by bit operations

####   Thu Jan 9 21:42:10 2020 +0100

(Michael Myer)

    SWAP via xor

####   Thu Jan 9 19:14:16 2020 +0100

(Michael Myer)

    before changes to history

####   Thu Jan 9 14:13:24 2020 +0100

(Michael Myer)

    scrollback

####   Thu Jan 9 13:47:26 2020 +0100

(Michael Myer)

    History scrollback limited to the history (Not the buf)
#### (minor)

(Michael Myer)

     (Thu Jan 9 12:56:47 2020 +0100)

#### (Thu Jan 9 12:43:45 2020 +0100)

(Michael Myer)

    UTF8 Switch

####   Thu Jan 9 10:44:57 2020 +0100

(Michael Myer)

    Compileswitch UTF8.

    After thinking about it, it's not so much code for utf8.
    A cleaner codebase would be nicer.
    But on the other hand, having the option to switch to utf8
    might also be nice.
    Has to be implemented as compile time switch.

####   Thu Jan 9 01:05:14 2020 +0100

(Michael Myer)

    Color option for the cursor in unfocused windows added

####   Thu Jan 9 00:12:05 2020 +0100

(Michael Myer)

    Added a nicer cursor for unfocused windows

    The default empty rect has been an annoyance to me,
    since I met Linux the first time.

####   Wed Jan 8 22:00:56 2020 +0100

(Michael Myer)

    Replaced division by bitshift

    division is the most expensive operation.
    Anyways. doesn't seem to be a big difference.
    1E9 equals 1.000.000.000
    2^30 might be close enough

####   Wed Jan 8 17:34:14 2020 +0100

(Michael Myer)

    update

####   Wed Jan 8 17:34:10 2020 +0100

(Michael Myer)

    update

####   Wed Jan 8 12:25:19 2020 +0100

(Michael Myer)

    documented applied patches

####   Wed Jan 8 10:24:54 2020 +0100

(Michael Myer)

    renamed
#### (minor)

(Michael Myer)

     (Wed Jan 8 00:29:01 2020 +0100)
     (Tue Jan 7 23:57:27 2020 +0100)
     (Tue Jan 7 23:56:16 2020 +0100)

#### (Tue Jan 7 22:44:14 2020 +0100)

(Michael Myer)

    moved pictures to ./images

####   Tue Jan 7 22:43:40 2020 +0100

(Michael Myer)

    moved pictures to ./images

####   Tue Jan 7 22:43:22 2020 +0100

(Michael Myer)

    moved pictures to ./images
#### (minor)

(Michael Myer)

     (Tue Jan 7 22:41:37 2020 +0100)

#### (Tue Jan 7 22:28:19 2020 +0100)

(Michael Myer)

    vogons
#### (minor)

(Michael Myer)

     (Tue Jan 7 21:56:20 2020 +0100)
     (Tue Jan 7 21:55:47 2020 +0100)
     (Tue Jan 7 21:55:16 2020 +0100)
     (Tue Jan 7 21:54:13 2020 +0100)
     (Tue Jan 7 21:53:41 2020 +0100)
     (Tue Jan 7 21:53:06 2020 +0100)
     (Tue Jan 7 21:52:48 2020 +0100)
     (Tue Jan 7 21:51:42 2020 +0100)
     (Tue Jan 7 21:49:28 2020 +0100)
     (Tue Jan 7 21:48:06 2020 +0100)

#### (Tue Jan 7 21:42:40 2020 +0100)

(Michael Myer)

    screenshot of i3 and st-asc
#### (minor)

(Michael Myer)

     (Tue Jan 7 21:27:13 2020 +0100)
     (Tue Jan 7 20:56:26 2020 +0100)
     (Tue Jan 7 20:55:44 2020 +0100)

#### (Tue Jan 7 20:52:11 2020 +0100)

(Michael Myer)

    resize

####   Tue Jan 7 20:48:16 2020 +0100

(Michael Myer)

    vt102 picture added

####   Tue Jan 7 20:26:22 2020 +0100

(Michael Myer)

    replaced config.h with symbolic link
#### (minor)

(Michael Myer)

     (Tue Jan 7 20:05:58 2020 +0100)
     (Tue Jan 7 20:01:46 2020 +0100)
     (Tue Jan 7 19:58:14 2020 +0100)
     (Tue Jan 7 19:45:43 2020 +0100)
     (Tue Jan 7 19:43:48 2020 +0100)
     (Tue Jan 7 19:43:16 2020 +0100)

#### (Tue Jan 7 19:42:30 2020 +0100)

(Michael Myer)

    ascii table
#### (minor)

(Michael Myer)

     (Tue Jan 7 19:33:25 2020 +0100)
     (Tue Jan 7 19:32:09 2020 +0100)
     (Tue Jan 7 19:30:27 2020 +0100)
     (Tue Jan 7 19:29:21 2020 +0100)
     (Tue Jan 7 19:28:33 2020 +0100)

#### (Tue Jan 7 19:26:16 2020 +0100)

(Michael Myer)

    ansicolor test added

####   Tue Jan 7 18:35:19 2020 +0100

(Michael Myer)

    Code reformatted

####   Tue Jan 7 17:58:20 2020 +0100

(Michael Myer)

    readme

####   Tue Jan 7 17:57:47 2020 +0100

(Michael Myer)

    readme

####   Tue Jan 7 17:56:51 2020 +0100

(Michael Myer)

    readme

####   Tue Jan 7 17:55:14 2020 +0100

(Michael Myer)

    readme

####   Tue Jan 7 17:54:33 2020 +0100

(Michael Myer)

    readme

####   Tue Jan 7 17:54:02 2020 +0100

(Michael Myer)

    readme (not)

####   Tue Jan 7 17:37:10 2020 +0100

(Michael Myer)

    minor. documentation.

####   Tue Jan 7 17:06:56 2020 +0100

(Michael Myer)

    moved to ./test/

####   Tue Jan 7 17:03:38 2020 +0100

(Michael Myer)

    simple tests added

####   Tue Jan 7 17:03:11 2020 +0100

(Michael Myer)

    simple tests added

####   Tue Jan 7 16:43:11 2020 +0100

(Michael Myer)

    minor

####   Tue Jan 7 16:43:04 2020 +0100

(Michael Myer)

    log

####   Tue Jan 7 14:41:54 2020 +0100

(Michael Myer)

    ISCONTROL simplified

####   Tue Jan 7 14:26:01 2020 +0100

(Michael Myer)

    utf8 file added for tests

####   Tue Jan 7 14:22:13 2020 +0100

(Michael Myer)

    vt102 ascii control char table

####   Tue Jan 7 14:17:10 2020 +0100

(Michael Myer)

    Ascii code tables added for reference

####   Tue Jan 7 13:48:20 2020 +0100

(Michael Myer)

    Makefile simplification

####   Tue Jan 7 13:47:44 2020 +0100

(Michael Myer)

    Makefile simplification

####   Tue Jan 7 13:40:17 2020 +0100

(Michael Myer)

    Makefile cleanup

####   Tue Jan 7 13:40:01 2020 +0100

(Michael Myer)

    man page

####   Tue Jan 7 13:36:02 2020 +0100

(Michael Myer)

    Makefile fix

####   Tue Jan 7 13:23:13 2020 +0100

(Michael Myer)

    Added debug macros.

    "Debugged" the handling of German Umlauts.
    Recognized, the problem has been with the shell (zsh)..
    I'll keep the dbg macros. Might need them later again.

####   Tue Jan 7 11:40:34 2020 +0100

(Michael Myer)

    minor

####   Tue Jan 7 11:40:19 2020 +0100

(Michael Myer)

    log

####   Tue Jan 7 05:13:35 2020 +0100

(Michael Myer)

    utf8. Compiler warnings silenced

####   Tue Jan 7 04:47:25 2020 +0100

(Michael Myer)

    regression bug fixed

####   Tue Jan 7 04:06:21 2020 +0100

(Michael Myer)

    minor

####   Tue Jan 7 02:42:21 2020 +0100

(Michael Myer)

    Makefile switch XRESOURCES

####   Tue Jan 7 02:36:14 2020 +0100

(Michael Myer)

    documentation

####   Tue Jan 7 02:30:53 2020 +0100

(Michael Myer)

    Added compile time switch XRESOURCES

    needs to have the switch XRESOURCES defined at compile time
    (somehow I don't have a good feeling with this patch

####   Tue Jan 7 02:00:43 2020 +0100

(Michael Myer)

    docu

####   Tue Jan 7 02:00:24 2020 +0100

(Michael Myer)

    Patches applied. Set "Unicode" chars to 1 Byte. rgb stripped

####   Tue Jan 7 01:59:58 2020 +0100

(Michael Myer)

    Applied patches

####   Tue Jan 7 01:59:18 2020 +0100

(Michael Myer)

    update

####   Tue Jan 7 01:59:10 2020 +0100

(Michael Myer)

    docu

####   Tue Jan 7 01:58:54 2020 +0100

(Michael Myer)

    Patches applied. Set "Unicode" chars to 1 Byte. rgb stripped

####   Tue Jan 7 01:57:51 2020 +0100

(Michael Myer)

    Makefile - config.h replaced by link

####   Tue Jan 7 01:45:01 2020 +0100

(Michael Myer)

    Last commit before codebase change

####   Sun Jan 5 20:58:46 2020 +0100

(Michael Myer)

    docu

####   Sun Jan 5 20:34:26 2020 +0100

(Michael Myer)

    removing useless config file

####   Sun Jan 5 20:33:53 2020 +0100

(Michael Myer)

    removing useless config file

####   Sun Jan 5 20:33:31 2020 +0100

(Michael Myer)

    docu
#### (minor)

(Michael Myer)

     (Sun Jan 5 14:07:58 2020 +0100)

#### (Sun Jan 5 12:24:35 2020 +0100)

(Michael Myer)

    terminfo file
#### (minor)

(Michael Myer)

     (Sun Jan 5 12:03:32 2020 +0100)
     (Sun Jan 5 11:56:56 2020 +0100)
     (Sun Jan 5 11:56:13 2020 +0100)
     (Sun Jan 5 11:54:57 2020 +0100)
     (Sun Jan 5 11:48:25 2020 +0100)
     (Sun Jan 5 11:46:42 2020 +0100)
     (Sun Jan 5 11:43:04 2020 +0100)
     (Sun Jan 5 11:32:49 2020 +0100)
     (Sun Jan 5 11:31:51 2020 +0100)
     (Sun Jan 5 11:27:09 2020 +0100)
     (Sun Jan 5 11:24:29 2020 +0100)
     (Sat Jan 4 23:50:13 2020 +0100)
     (Sat Jan 4 23:47:51 2020 +0100)

#### (Sat Jan 4 23:42:47 2020 +0100)

(Michael Myer)

    Initial and crude commit
#### (minor)

(Michael Myer)

     (Sat Jan 4 23:25:20 2020 +0100)

#### (Sat Jan 4 23:13:36 2020 +0100)

(Michael Myer)

    documenting

####   Sat Jan 4 23:01:40 2020 +0100

(Michael Myer)

    Readme added

####   Sat Jan 4 22:27:01 2020 +0100

(Michael (misc) Myer)

    Initial commit


code:
(git version 2020/01 suckless.org)

#### Why does st not handle utmp entries?

Use the excellent tool of [utmp](https://git.suckless.org/utmp/) for this task.

#### Some _random program_ complains that st is unknown/not recognised/unsupported/whatever!

It means that st does not have any terminfo entry on your system. Chances are
you did not `make install`. If you just want to test it without installing it,
you can manually run `tic -sx st.info`. (misc24: the file is named slterm.info)

#### Nothing works, and nothing is said about an unknown terminal!

* Some programs just assume they’re running in xterm i.e. they don’t rely on
  terminfo. What you see is the current state of the “xterm compliance”.
* Some programs don’t complain about the lacking st description and default to
  another terminal. In that case see the question about terminfo.

#### How do I scroll back up?

Using a terminal multiplexer.

* `st -e tmux` using C-b [
* `st -e screen` using C-a ESC

#### Why doesn't the Del key work in some programs?

Taken from the terminfo manpage:

	If the terminal has a keypad that transmits codes when the keys
	are pressed, this information can be given. Note that it is not
	possible to handle terminals where the keypad only works in
	local (this applies, for example, to the unshifted HP 2621 keys).
	If the keypad can be set to transmit or not transmit, give these
	codes as smkx and rmkx. Otherwise the keypad is assumed to
	always transmit.

In the st case smkx=E[?1hE= and rmkx=E[?1lE>, so it is mandatory that
applications which want to test against keypad keys send these
sequences.

But buggy applications (like bash and irssi, for example) don't do this. A fast
solution for them is to use the following command:

	$ printf '\033[?1h\033=' >/dev/tty

or
	$ tput smkx

In the case of bash, readline is used. Readline has a different note in its
manpage about this issue:

	enable-keypad (Off)
		When set to On, readline will try to enable the
		application keypad when it is called. Some systems
		need this to enable arrow keys.

Adding this option to your .inputrc will fix the keypad problem for all
applications using readline.

If you are using zsh, then read the zsh FAQ
<http://zsh.sourceforge.net/FAQ/zshfaq03.html#l25>:

	It should be noted that the O / [ confusion can occur with other keys
	such as Home and End. Some systems let you query the key sequences
	sent by these keys from the system's terminal database, terminfo.
	Unfortunately, the key sequences given there typically apply to the
	mode that is not the one zsh uses by default (it's the "application"
	mode rather than the "raw" mode). Explaining the use of terminfo is
	outside of the scope of this FAQ, but if you wish to use the key
	sequences given there you can tell the line editor to turn on
	"application" mode when it starts and turn it off when it stops:

		function zle-line-init () { echoti smkx }
		function zle-line-finish () { echoti rmkx }
		zle -N zle-line-init
		zle -N zle-line-finish

Putting these lines into your .zshrc will fix the problems.

#### How can I use meta in 8bit mode?

St supports meta in 8bit mode, but the default terminfo entry doesn't
use this capability. If you want it, you have to use the 'st-meta' value
in TERM.

#### I cannot compile st in OpenBSD

OpenBSD lacks librt, despite it being mandatory in POSIX
<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html#tag_20_11_13>.
If you want to compile st for OpenBSD you have to remove -lrt from config.mk, and
st will compile without any loss of functionality, because all the functions are
included in libc on this platform.

#### The Backspace Case

St is emulating the Linux way of handling backspace being delete and delete being
backspace.

This is an issue that was discussed in suckless mailing list
<https://lists.suckless.org/dev/1404/20697.html>. Here is why some old grumpy
terminal users wants its backspace to be how he feels it:

	Well, I am going to comment why I want to change the behaviour
	of this key. When ASCII was defined in 1968, communication
	with computers was done using punched cards, or hardcopy
	terminals (basically a typewriter machine connected with the
	computer using a serial port).  ASCII defines DELETE as 7F,
	because, in punched-card terms, it means all the holes of the
	card punched; it is thus a kind of 'physical delete'. In the
	same way, the BACKSPACE key was a non-destructive backspace,
	as on a typewriter.  So, if you wanted to delete a character,
	you had to BACKSPACE and then DELETE.  Another use of BACKSPACE
	was to type accented characters, for example 'a BACKSPACE `'.
	The VT100 had no BACKSPACE key; it was generated using the
	CONTROL key as another control character (CONTROL key sets to
	0 b7 b6 b5, so it converts H (code 0x48) into BACKSPACE (code
	0x08)), but it had a DELETE key in a similar position where
	the BACKSPACE key is located today on common PC keyboards.
	All the terminal emulators emulated the difference between
	these keys correctly: the backspace key generated a BACKSPACE
	(^H) and delete key generated a DELETE (^?).

	But a problem arose when Linus Torvalds wrote Linux. Unlike
	earlier terminals, the Linux virtual terminal (the terminal
	emulator integrated in the kernel) returned a DELETE when
	backspace was pressed, due to the VT100 having a DELETE key in
	the same position.  This created a lot of problems (see [1]
	and [2]). Since Linux has become the king, a lot of terminal
	emulators today generate a DELETE when the backspace key is
	pressed in order to avoid problems with Linux. The result is
	that the only way of generating a BACKSPACE on these systems
	is by using CONTROL + H. (I also think that emacs had an
	important point here because the CONTROL + H prefix is used
	in emacs in some commands (help commands).)

	From point of view of the kernel, you can change the key
	for deleting a previous character with stty erase. When you
	connect a real terminal into a machine you describe the type
	of terminal, so getty configures the correct value of stty
	erase for this terminal. In the case of terminal emulators,
	however, you don't have any getty that can set the correct
	value of stty erase, so you always get the default value.
	For this reason, it is necessary to add 'stty erase ^H' to your
	profile if you have changed the value of the backspace key.
	Of course, another solution is for st itself to modify the
	value of stty erase.  I usually have the inverse problem:
	when I connect to non-Unix machines, I have to press CONTROL +
	h to get a BACKSPACE. The inverse problem occurs when a user
	connects to my Unix machines from a different system with a
	correct backspace key.

	[1] http://www.ibb.net/~anne/keyboard.html
	[2] http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html

#### But I really want the old grumpy behaviour of my terminal

Apply [1].

[1] https://st.suckless.org/patches/delkey

#### Why do images not work in st (in programs such as w3m)?

This is a terrible hack that overdraws an image on top of the terminal emulator
window. It also relies on a very specific way the terminal draws it's contents.

A more proper (but limited way) would be using sixels. Which st doesn't
support.

#### BadLength X error in Xft when trying to render emoji

Xft makes st crash when rendering color emojis with the following error:

"X Error of failed request:  BadLength (poly request too large or internal Xlib length error)"
  Major opcode of failed request:  139 (RENDER)
  Minor opcode of failed request:  20 (RenderAddGlyphs)
  Serial number of failed request: 1595
  Current serial number in output stream:  1818"

This is a known bug in Xft (not st) which happens on some platforms and
combination of particular fonts and fontconfig settings.

See also:
https://gitlab.freedesktop.org/xorg/lib/libxft/issues/6
https://bugs.freedesktop.org/show_bug.cgi?id=107534
https://bugzilla.redhat.com/show_bug.cgi?id=1498269

The solution is to remove color emoji fonts or disable this in the fontconfig
XML configuration.  As an ugly workaround (which may work only on newer
fontconfig versions (FC_COLOR)), the following code can be used to mask color
fonts:

	FcPatternAddBool(fcpattern, FC_COLOR, FcFalse);

Please don't bother reporting this bug to st, but notify the upstream Xft
developers about fixing this bug.


code:
Date: 2024/10/12

Did some rework.
The whole scrollback buffer would need a rewrite.
I'm unhappy with the copying between a "screen" buffer,
and the scrollback buffer.
Furthermore I'd like to compress the scrollback buffer.
What is currently not doable, the scrollback buffer code
makes me dizzy, so I'm unable to modify it (again).
There are several variables, which point to the current location
in the history of line. (term->scr, histi, cthist )
They are however all calculated relatively
to each other of them, and the index is somehow reversed, sort of.

Looking at this, I think, it might be possible.

Date: 2024/10/08

Well. better keeping my notes here.

Funnny with those colors.
I'm unhappy with the xterm palette.

The first 8 colors I've been able to change to a xterm compatible palette.
So, there are already 32 hand selected colors, since all colors
come in normal, faint, bold and bold_faint.

However, the 6x6x6 color cube of the colors 16-232 isn't that bright.

Looking around, there is this site.

https://lospec.com/palette-list

and, for 256 colors.

https://lospec.com/palette-list/srb2 - 256 colors

Now, well, eventually I'll stick to a 64 color palette.
First 16 colors, with attributes.

I would need to know, how many apps actually use those extended indexed colorset.

64 colors ought to be enough for everyone!

-- 2020/01/11

Copying the git log.
To be exact, copying all log messages,
having a informative message.
Going to need something doing this automatic.

Date:   Sat Jan 11 2020

    tag this 0.9rc3. Seems to be stable.

    Debugging switch in config.h.in.

    Enable (global) debugging now with the debug flag in config.h.in
    Might be useful for reporting bugs.
    (when encountering a bug, please compile with debugging
    set to level 1, and save the output.
    st-asc > log.txt

    Optimization for non Utf8.

    Copy int32 at once, instead of byte for byte.
    Could be further optimized; but I don't
    want it too machine dependent.
    (Now this depends on unsigned int being 32bit long.
    And could be adapted easily.)
    Byte for Byte, eye for eye. :) I guess,
    this doesn]t work in English.

Date:   Fri Jan 10 2020

    save compiler info in the binary

    Edited the config "system".

    Now only one file, config.h.in, needs to be edited.

    Dynamic allocation of the history buffer

    Made the allocation of the memory for the hist buf dynamic.
    for, e.g., 16k lines of history, this results in around 6MB Memory
    (depending on the terminal's width);
    which are now allocated dynamically.

Notes:
    if utf8 is enabled, the saving is more than 30/40MB,
    depending on the terminal's width and the history len.

    configuration via one file only

    v0.9rc2

    cleanup

Date:   Fri Jan 10 2020

    utf8 compileswitch seems to work

    Optimizations. Option to build a shared version

    The optimizations finally start to give better results.
    To name them: No temporary vars for swapping of values,
    instead xor exchange
    No division/modulo, replaced by bit operations

Date:   Thu Jan 9 2020

    History scrollback limited to the history (Not the buf)

    Compileswitch UTF8.

    After thinking about it, it's not so much code for utf8.
    A cleaner codebase would be nicer.
    But on the other hand, having the option to switch to utf8
    might also be nice.
    Has to be implemented as compile time switch.

    Color option for the cursor in unfocused windows added

    Added a nicer cursor for unfocused windows

    The default empty rect has been an annoyance to me,
    since I met Linux the first time.

Date:   Wed Jan 8 2020

    Replaced division by bitshift

    division is the most expensive operation.
    Anyways. doesn't seem to be a big difference.
    1E9 equals 1.000.000.000
    2^30 might be close enough

Date:   Tue Jan 7 2020

    ansicolor test added

    utf8 file added for tests

    vt102 ascii control char table

    Ascii code tables added for reference

    Added debug macros.

    "Debugged" the handling of German Umlauts.
    Recognized, the problem has been with the shell (zsh)..
    I'll keep the dbg macros. Might need them later again.

    utf8. Compiler warnings silenced

    Added compile time switch XRESOURCES

    needs to have the switch XRESOURCES defined at compile time
    (somehow I don't have a good feeling with this patch

    Patches applied. Set "Unicode" chars to 1 Byte. rgb stripped

Date:   Sat Jan 4 2020

    Initial commit

.. 2020/01/06

Patched the existing scrollback patch in.
I did find a terminal scroller, and somehow this would be nicer.
This would be more consistent, despite what terminal or -emulation
is used. But this thing slowed down st quite a bit.

Ok. At the moment, the ripped unicode and rgb support
really show some effect.
But the scrollback patch somehow is quite memory consuming.

Possibly I should either come back to the terminal scroller,
and see, whether this thing could be optimized for better speed.
Or, the scrollback buffer within st is, well, not exactly
well dessigned. It's a static buffer,
even the variable is made globally static.
so. For me, always keeping at least 10 terminals open,
that's not so good.
Have to look at it.

For now I'll upload my changes, again.
And it seems, like I should do a real fork of st.

I already changed quite a bit, and merging all my changes
might be too much work.
We'll see.

..

Thinking about it - it might be better keeping the scrollback
buffer within st. The problems arising by separating the scrollback
would be, especially:
- Ansi control characters either being resent when scrolling back,
	or they would have to be parsed
- Color codes and textattributes, same problem;
	worse, when scrolling back they would have to be parsed again.
- this also prevents the scrollback from being accordingly seekable

However, something is bloating st, when setting the scrollback buffer
to larger values (>10k lines)

Ok. So. Found it. It's obvious.
The history within st needs to keep track of every glyph,
meaning not only the displayed chars, with it's attributes,
but also the "empty" Glyphs. (Which also do have attributes,
e.g. the backgroundcolor.

So. What to do.
An external scrollback buffer has the advantage,
of holding only chars, which are displayed, and control sequences.
But - e.g., when scrolling backwards, there might be colors
and text attributes displayed wrong.
Copying also could give problems.
Either the control sequences are parsed within st AND the external scrollback.
or. :/ dunno. I like a colored scrollback buffer.

Seems I should see, whether I'm able to optimize the scrollback buffer
of st.
The current implementation:
  - allocates a complete line of glyphs
  - for every single line. Does this even for completely empty,
    or yet unusedlines.
  - reallocates every single line of the "history" on win resize
	- The "history" is more like a preallocated buffer,
	  where scrolled lines are copied into.

So. Instead of doing this, I'm now going to prepare 0.9rc1.
There still is some utf8 stuff left to clean.
And further testing would be useful.

About adding patches, and so on: When you guard your changes
with an #ifdef YOURPATCHNAME / #endif,
I'll add patches in each case.
Just do a fork, and consequently file a pull request.

You can grep for the switch "XRESOURCES",
where I did exactly this, guard a patch
to be optional.

;) It's also your showcase, bookmarks, about what you added.

---

copied this from README. Its irrelevant.

A rant against some sort of scientists, btw.
So, someone is sure, and "prooves" this
by a study, humans cannot perceipt a latency &lower 200ms,
since that's our reaction time.

That's. Bullshit.
One can think, what this scientist did believe.
But - just ask an musician. A system, used for plaing live e.g. synthesizer,
is really hard to play with a latency of 200ms.

I'd say, it's going to be hard to get a medium timing with anything bigger than 40ms.

The latency is feelable at, say, 5ms. at least. I did never really check,
since even 20ms are hard to get with nowadays systems.
But you can tell, in each case, the difference to a "real" instrument.
Which also doe's have some latency. But, amongst others, this latency is steady.

Oh. There's another example, showing this scientist being wrong.
It's our capability to perceive the location of an audible source.
What needs a perception and combination of both ears in the scale of microseconds.
Maybe even nanoseconds. But 200ms is. Painful slow.

.. 2020/01

scrolling - is this the job of the terminal emulator,
or for a separate tool?

not sure.
Ok. I try to break this down -
it's also the question, whether one likes to have (graphical) scrollbars.


code:
old docs,
more or less irrelevant

path: doc/old/README


code:
## Short ref

#### Keys:

Shift+Insert: Insert from Clipboard

Ctrl+Shift+S: Enter Selectmode - goto a place on screen, start selecting with 's',
 end selection with enter and copy contents to clipboard

Ctrl+Alt+[0-9]: set bookmark in history
Ctrl+[0-9]: goto bookmark

Shift+Return: Set mark, when the output of the current command
 exceeds one page, go into lessmode

Shift+Backspace: Go back in history to the location of the last command

Ctrl+Shift+[ l / Up / PageUp ]: Enter lessmode (Cursorkeys scroll up/down)

Alt+Shift+[ PageUp / PageDown ]: Enlarge/Shrink fontsize
Alt+Shift+[ Insert / Delete ]: Enlarge/Shrink font width


code:
anysize
clipboard
relativeborder
scrollback
scrollback-mouse
scrollback-mouse-increment
selectioncolors
vim_browse
xresources (only optional, via switch -x on)

//st-keyboard-select in suckless dir

omitted:
	newterm ( doesn't detach->parent killed->child too )
	vertcenter ( somehow doesn't look right)

path: doc/patches-applied