1
0
mirror of https://github.com/tiyn/st synced 2025-10-18 13:51:23 +02:00

7 Commits

Author SHA1 Message Date
3ec0bd40b0 updated repository title in readme 2023-10-24 06:09:48 +02:00
c89bbcf33d updated readme and gitignore 2023-10-22 05:42:34 +02:00
2ede01a088 pulled changed config.def.h to config branch 2023-08-24 06:08:09 +02:00
5491457642 readme: updated 2023-08-24 06:05:41 +02:00
bf7eebfb7d readme updated 2023-08-22 15:03:50 +02:00
bb3d4dba10 adding new readme 2023-08-22 14:04:21 +02:00
7c08bf621b config: added config branch and added config.def.h 2023-08-22 13:51:30 +02:00
4 changed files with 87 additions and 81 deletions

2
.gitignore vendored
View File

@@ -50,3 +50,5 @@ modules.order
Module.symvers Module.symvers
Mkfile.old Mkfile.old
dkms.conf dkms.conf
st

34
README
View File

@@ -1,34 +0,0 @@
st - simple terminal
--------------------
st is a simple terminal emulator for X which sucks less.
Requirements
------------
In order to build st you need the Xlib header files.
Installation
------------
Edit config.mk to match your local setup (st is installed into
the /usr/local namespace by default).
Afterwards enter the following command to build and install st (if
necessary as root):
make clean install
Running st
----------
If you did not install st with make clean install, you must compile
the st terminfo entry with the following command:
tic -sx st.info
See the man page for additional details.
Credits
-------
Based on Aurélien APTEL <aurelien dot aptel at gmail dot com> bt source code.

43
README.md Normal file
View File

@@ -0,0 +1,43 @@
# st
This is my patched version of st. The base version is directly from suckless.org.
This belongs to my larbs installation script, but does not directly depend on it.
It is supposed to work in the environment after the larbs-base-installation.
## Patches
The list below shows the currently applied patches to the master branch.
- st-alpha-20220206-0.8.5.diff (adds transparency)
- st-anysize-20220718-baa9357.diff (st leaves no gaps if the height/width doesn't match a multiple of
character height)
- st-ligatures-scrollback-20230105-0.9.diff (scrollback compatible addition of ligatures)
- st-scrollback-0.8.5.diff (add scrollback functionality)
## Hotkeys
There are various shortcuts and hotkeys used in this version. Included in my build are the following.
| ModKey | Shift | Key | Function |
| ------ | ----- | --------------- | --------------- |
| Alt | | Break | Send break |
| Alt | | Print | Toggle printer |
| Alt | | Print | Print screen |
| | Shift | Insert | Clipboard paste |
| Alt | | c | Clipboard copy |
| Alt | | v | Clipboard paste |
| Alt | | p | Selected paste |
| Alt | | NumLock | Toggle Numlock |
| Alt | | k | Scroll up |
| Alt | | j | Scroll down |
| | | MouseScrollUp | Scroll up |
| | | MouseScrollDown | Scroll down |
| Alt | Shift | u | Zoom in |
| Alt | Shift | i | Zoom out |
## Installation
The most basic way is to clone the repository and then invoke make.
- `git clone https://github.com/tiyn/st`
- `make clean install`

View File

@@ -5,7 +5,7 @@
* *
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/ */
static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true"; static char *font = "mono:pixelsize=16:antialias=true:autohint=true";
static int borderpx = 2; static int borderpx = 2;
/* /*
@@ -96,32 +96,27 @@ unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */ /* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = { static const char *colorname[] = {
/* 8 normal colors */ /* 8 normal colors */
"black", "#1e1e1e",
"red3", "#f44747",
"green3", "#608b4e",
"yellow3", "#dcdcaa",
"blue2", "#569cd6",
"magenta3", "#c678dd",
"cyan3", "#56b6c2",
"gray90", "#d4d4d4",
"#808080",
/* 8 bright colors */ "#f44747",
"gray50", "#608b4e",
"red", "#dcdcaa",
"green", "#569cd6",
"yellow", "#c678dd",
"#5c5cff", "#56b6c2",
"magenta", "#d4d4d4",
"cyan",
"white",
[255] = 0, [255] = 0,
/* more colors can be added after 255 to use with DefaultXX */ /* more colors can be added after 255 to use with DefaultXX */
"#cccccc", "#1e1e1e", /* 256 -> bg */
"#555555", "#d4d4d4", /* 257 -> fg */
"gray90", /* default foreground colour */ "#a4a4a4", /* 258 -> cursor */
"black", /* default background colour */
}; };
@@ -129,10 +124,10 @@ static const char *colorname[] = {
* Default colors (colorname index) * Default colors (colorname index)
* foreground, background, cursor, reverse cursor * foreground, background, cursor, reverse cursor
*/ */
unsigned int defaultfg = 258; unsigned int defaultfg = 257;
unsigned int defaultbg = 259; unsigned int defaultbg = 256;
unsigned int defaultcs = 256; unsigned int defaultcs = 258;
static unsigned int defaultrcs = 257; static unsigned int defaultrcs = 0;
/* /*
* Default shape of cursor * Default shape of cursor
@@ -175,12 +170,11 @@ static uint forcemousemod = ShiftMask;
* Beware that overloading Button1 will disable the selection. * Beware that overloading Button1 will disable the selection.
*/ */
static MouseShortcut mshortcuts[] = { static MouseShortcut mshortcuts[] = {
/* mask button function argument release */ /* mask button function argument release */
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, { Button4, XK_NO_MOD, "\031" },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, { Button5, XK_NO_MOD, "\005" },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, { XK_NO_MOD, Button4, kscrollup, {.i = 1} },
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, { XK_NO_MOD, Button5, kscrolldown,{.i = 1} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
}; };
/* Internal keyboard shortcuts. */ /* Internal keyboard shortcuts. */
@@ -189,18 +183,19 @@ static MouseShortcut mshortcuts[] = {
static Shortcut shortcuts[] = { static Shortcut shortcuts[] = {
/* mask keysym function argument */ /* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, { MODKEY, XK_Break, sendbreak, {.i = 0} },
{ ControlMask, XK_Print, toggleprinter, {.i = 0} }, { MODKEY, XK_Print, toggleprinter, {.i = 0} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} }, { MODKEY, XK_Print, printscreen, {.i = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, { ShiftMask, XK_Insert, clippaste, {.i = 0} },
{ TERMMOD, XK_Prior, zoom, {.f = +1} }, { MODKEY, XK_c, clipcopy, {.i = 0} },
{ TERMMOD, XK_Next, zoom, {.f = -1} }, { MODKEY, XK_v, clippaste, {.i = 0} },
{ TERMMOD, XK_Home, zoomreset, {.f = 0} }, { MODKEY, XK_p, selpaste, {.i = 0} },
{ TERMMOD, XK_C, clipcopy, {.i = 0} }, { MODKEY, XK_Num_Lock, numlock, {.i = 0} },
{ TERMMOD, XK_V, clippaste, {.i = 0} }, { MODKEY, XK_k, kscrollup, {.i = 1} },
{ TERMMOD, XK_Y, selpaste, {.i = 0} }, { MODKEY, XK_j, kscrolldown, {.i = 1} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} }, { MODKEY, XK_U, zoom, {.f = +1} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, { MODKEY|ShiftMask, XK_U, zoom, {.f = +1} },
{ MODKEY|ShiftMask, XK_I, zoom, {.f = -1} },
}; };
/* /*