~kris/suckless

st

e399d28ae49b0c778c3051b01a08ef9f09d3d96d — Kris Yotam 7 months ago a7582f9
Update
1 files changed, 94 insertions(+), 96 deletions(-)

M README.md
M README.md => README.md +94 -96
@@ 1,136 1,134 @@
# St (Suckless Terminal)
# Kris's build of st

## Xresources live-reload demo
The [suckless terminal (st)](https://st.suckless.org/) with additional features that make it the best terminal emulator.

<img src="https://github.com/siduck/dotfiles/blob/all/rice%20flex/live-reloadXresources.gif"> <br><br>
---

## Dependencies
## Features

```
# Void
xbps-install libXft-devel libX11-devel harfbuzz-devel libXext-devel libXrender-devel libXinerama-devel gd-devel
### Clipboard

# Debian (and ubuntu probably)
apt install build-essential libxft-dev libharfbuzz-dev libgd-dev
| Keybinding | Action |
|------------|--------|
| `Ctrl+Shift+c` | Copy selection |
| `Ctrl+Shift+v` | Paste |
| `Right Click` | Paste from clipboard |

# Nix
nix develop github:siduck/st
### Scrollback

# Arch
pacman -S gd
| Keybinding | Action |
|------------|--------|
| `Alt+k` | Scroll up |
| `Alt+j` | Scroll down |

# Fedora (or Red-Hat based)
dnf install gd-devel libXft-devel
### Font & Zoom

# SUSE (or openSUSE)
zypper in -t pattern devel_basis
zypper in gd-devel libXft-devel harfbuzz-devel
| Keybinding | Action |
|------------|--------|
| `Alt+,` | Zoom in |
| `Alt+.` | Zoom out |
| `Alt+g` | Reset to default size |

# Install font-symbola and libXft-bgra
```
### Transparency

## Try it out!
| Keybinding | Action |
|------------|--------|
| `Alt+s` | Increase transparency |
| `Alt+a` | Decrease transparency |
| `Alt+m` | Reset transparency |

Before you install st on your system, you might want to try it out first.
To do so, simply run (requires [Nix](https://nixos.org/download.html))
`nix run github:siduck/st`
### Other

## Install
| Keybinding | Action |
|------------|--------|
| `Mod+Shift+Enter` | Spawn new terminal in current directory |

```
git clone https://github.com/siduck/st.git
cd st
(change the compiler if you cant use c99 to compile: sed -i 's/^#\ CC\ =\ c99/CC=gcc/' config.mk)
sudo make install
xrdb merge pathToXresourcesFile
```
---

(note : put the xrdb merge command in your wm's autostart or similar)
## Patches

### Using Nix flakes
| Patch | Description |
|-------|-------------|
| ligatures | HarfBuzz ligature support |
| sixel | Sixel graphics support (check sixel branch) |
| scrollback | Scroll history |
| clipboard | Clipboard integration |
| alpha | Transparency support with configurable opacity |
| boxdraw | Render box-drawing characters without font glyphs |
| patch_column | Doesn't cut text while resizing |
| font2 | Secondary font support (emoji fallback) |
| right click paste | Paste with right click |
| newterm | Spawn new terminal in current directory |
| anygeometry | Dynamic geometry/borders |
| xresources | Live reload colors/settings from Xresources |
| sync | Better draw timing to reduce flicker/tearing |
| live reload | Change colors/fonts on the fly |
| swapmouse | Swap mouse buttons |

Add `st.url = "github:siduck/st";` to your inputs and install `inputs.st.packages."${system}".st-snazzy` package
---

## Fonts
## Appearance

- Install JetbrainsMono Mono Nerd Font or any nerd font from [here](https://www.nerdfonts.com/font-downloads)
- **Default font:** JetBrainsMono Nerd Font
- **Xresources:** Supports dynamic colors via `~/.Xdefaults` or `~/.Xresources`
- **Live reload:** `xrdb merge ~/.Xresources && kill -USR1 $(pidof st)`

## Patches:
---

- Ligatures
- sixel (check sixel branch)
- scrollback
- Clipboard
- Alpha(Transparency)
- Boxdraw
- patch_column ( doesnt cut text while resizing)
- font2
- right click paste
- st desktop entry
- newterm
- anygeometry
- xresources
- sync patch ( Better draw timing to reduce flicker/tearing and improve animation smoothness )
- live reload ( change colors/fonts on the fly )
- st-swapmouse
  <br>
## Installation

## Xresources live-reload
### Dependencies

```
# make an alias for this command
```bash
# Arch
pacman -S gd

alias rel="xrdb merge pathToXresourcesFile && kill -USR1 $(pidof st)"
```
# Debian/Ubuntu
apt install build-essential libxft-dev libharfbuzz-dev libgd-dev

## Ram usage comparison with other terminals and speed test
# Fedora
dnf install gd-devel libXft-devel

<img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/terminal_ramUsage.jpg"> <br><br>
<img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/speedTest.png"> <br><br>
<img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/speedTest1.png"> <br><br>
# Void
xbps-install libXft-devel libX11-devel harfbuzz-devel libXext-devel libXrender-devel libXinerama-devel gd-devel
```

### Build

( note : This benchmark was done on my low-end machine which has a pentium cpu so the speed results might vary )
```bash
git clone https://github.com/krisyotam/st
cd st
sudo make install
xrdb merge ~/.Xresources
```

## Default Keybindings<br>
> Add the `xrdb merge` command to your WM's autostart.

<pre>
ctrl + shift + c        Copy  <br>
ctrl + shift + v        Paste <br>
right click on the terminal ( will paste the copied thing )
> Requires a compositor (`xcompmgr`, `picom`, etc.) for transparency.

(Zoom)
alt  + comma            Zoom in <br>
alt  + .                Zoom out <br>
alt  + g                Reset Zoom<br>
---

(Transparency)
alt  + s                Increase Transparency<br>
alt  + a                Decrease Transparency<br>
alt  + m                Reset Transparency<br>
## Configuration

alt + k                 scroll down
alt + j                 scroll up
### Xresources

mod + shift + enter    open a new terminal with same cwd ( current working directory )
</pre>
This build reads settings from `~/.Xdefaults` or `~/.Xresources`. Changes reload live with:

you can change all of these in config.h
<br>
```bash
xrdb merge ~/.Xresources && kill -USR1 $(pidof st)
```

## Themes/Fonts used
---

- ls-icons: https://github.com/Yash-Handa/logo-ls <br>
- Xresources: onedark (just `xrdb merge xresourcesfile`, do this everytime you make any change to xresources file) from this repo itself.<br>
- Font: JetbrainsMono Nerd Font + material design icon fonts
## Other Suckless Repos

## Screenshots:
- [dwm](https://github.com/krisyotam/dwm) - dynamic window manager
- [dwmblocks](https://github.com/krisyotam/dwmblocks) - modular status bar
- [surf](https://github.com/krisyotam/surf) - simple web browser

<img src="https://raw.githubusercontent.com/siduck/dotfiles/all/misc/delete_this/bruh.png"> <br><br>
<img src="https://raw.githubusercontent.com/siduck/dotfiles/all/misc/delete_this/ithree0-36-43.png"> <br><br>
<img src="https://raw.githubusercontent.com/siduck/dotfiles/all/misc/delete_this/two7-00.png"> <br><br>
<img src="https://raw.githubusercontent.com/siduck/dotfiles/all/misc/delete_this/u.png"> <br><hr>
---

# Credits
## Contact

- [live-reload](https://github.com/nimaipatel/st)
- [patch_column](https://github.com/nimaipatel/st/blob/all/patches/7672445bab01cb4e861651dc540566ac22e25812.diff)
- Kris Yotam <krisyotam@protonmail.com>
- [https://krisyotam.com](https://krisyotam.com)