Code Monkey home page Code Monkey logo

st's Introduction

St (Suckless Terminal)

Xresources live-reload demo



Dependencies

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

# Debian (and ubuntu probably)
apt install build-essential libxft-dev libharfbuzz-dev libgd-dev

# Nix
nix develop github:siduck/st

# Arch
pacman -S gd

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

# SUSE (or openSUSE)
zypper in -t pattern devel_basis
zypper in gd-devel libXft-devel harfbuzz-devel

# Install font-symbola and libXft-bgra

Try it out!

Before you install st on your system, you might want to try it out first. To do so, simply run (requires Nix) nix run github:siduck/st

Install

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)

Using Nix flakes

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

Fonts

  • Install JetbrainsMono Mono Nerd Font or any nerd font from here

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 ) and more...

Xresources live-reload

# make an alias for this command

alias rel="xrdb merge pathToXresourcesFile && kill -USR1 $(pidof st)"

Ram usage comparison with other terminals and speed test







( note : This benchmark was done on my low-end machine which has a pentium cpu so the speed results might vary )

Default Keybindings

ctrl + shift + c        Copy  
ctrl + shift + v Paste
right click on the terminal ( will paste the copied thing ) (Zoom) alt + comma Zoom in
alt + . Zoom out
alt + g Reset Zoom
(Transparency) alt + s Increase Transparency
alt + a Decrease Transparency
alt + m Reset Transparency
alt + k scroll down alt + j scroll up mod + shift + enter open a new terminal with same cwd ( current working directory )

you can change all of these in config.h

Themes/Fonts used

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

Screenshots:









Credits

st's People

Contributors

alok8bb avatar borsched avatar bscholer avatar deliasvcruz avatar p3nguin-kun avatar rdbo avatar siduck avatar sioodmy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

st's Issues

Font Error!!!!

I have recently set up ST terminal and my ST terminal doesn't display your correct font! How to fix it?
Note : I'm using Ubuntu and I installed JetBrainsMono Nerd Font Mono

image

[Question] Full name

What should be considered the full name: "Suckless terminal" or "Snazzy terminal"? Each of these are presented on the main page.

st not opening after gd update

Hello!
I'm on arch and today gd was updated to 2.3.3-7. Now, when opening st, it errors out st: error while loading shared libraries: libavif.so.16: cannot open shared object file: No such file or directory.

[BUG] Xrdb-merge breaks emojis

Here is a quick DEMO:

satellite-nvim-showcase-2023-08-26_12.12.47.mp4

Why this is important?

I manipulate the terminal padding whenever I enter Neovim. Which requires a xrdb-merge ~/.Xresources



Xft.antialias:	1
Xft.hinting:	1
Xft.autohint:	0
Xft.hintstyle:	hintslight
Xft.rgba:	rgb
Xft.lcdfilter:	lcddefault

! window padding
st.borderpx: 20

!-- values between 0.1  - 1.0 --!

st.alpha: 1.0

#define fonts JetBrainsMono Nerd Font :pixelsize=15:antialias=true:autohint=true, \
                   JoyPixels:style:Regular, \

! Symbola:style:Regular, \
! Noto Color Emoji, \

*.font: fonts



#define base00 #282828
#define base01 #3c3836
#define base02 #504945
#define base03 #665c54
#define base04 #bdae93
#define base05 #d5c4a1
#define base06 #ebdbb2
#define base07 #fbf1c7
#define base08 #fb4934
#define base09 #fe8019
#define base0A #fabd2f
#define base0B #b8bb26
#define base0C #8ec07c
#define base0D #83a598
#define base0E #d3869b
#define base0F #d65d0e

*.foreground:   base05
#ifdef background_opacity
*.background:   [background_opacity]base00
#else
*.background:   base00
#endif
*.cursorColor:  base05


*color0:       base00
*color1:       base08
*color2:       base0B
*color3:       base0A
*color4:       base0D
*color5:       base0E
*color6:       base0C
*color7:       base05

*color8:       base03
*color9:       base08
*color10:      base0B
*color11:      base0A
*color12:      base0D
*color13:      base0E
*color14:      base0C
*color15:      base07

! just remove this if you dont use my tabbed

tabbed.selfgcolor:   #d6d8eb
tabbed.selbgcolor:   #1e222a

tabbed.normfgcolor:  #9294a8
tabbed.normbgcolor:  #282c34

Terminal gap

Hi, it's not an issue, just a question.
You have terminal gap when you are just writing commands.
image
But when you enter nvchad, it dissapear.
image
How could I make st to have same behavior?

st crashing with error: RenderBadPicture

~/.xsession-error output:

X Error of failed request:  RenderBadPicture (invalid Picture parameter)
  Major opcode of failed request:  140 (RENDER)
  Minor opcode of failed request:  8 (RenderComposite)
  Picture id in failed request: 0xe743
  Serial number of failed request:  61413
  Current serial number in output stream:  61595

libxft-bgra-git is installed.

Bug: the st window won't close on Wayland

compositor: river (master)
OS: alpine linux

I am investigating this issue and will attempt to fix it.
Initially I thought it could've been an issue with my compositor, but the "close" action is done directly by wlroots/XWayland. And standard st doesn't have this issue. This doesn't discard the possibility that wlroots might be at fault though.
I noticed that this happens after a call to sigchld, which makes sense since I just signalled for the process to close the window. But after going through sigchld, the program gets stuck at exit, with some calls related to a pthread mutex? Not sure yet what it is.
If I figure out and fix it, I will do a PR

Rows reflow patch

I'm pretty sure you know there's output loss in st when its height is reduced and increased back again. I can see that your build doesn't have that issue. Could you please point me to a patch that does that.

patch not working

when i try to use it with mpv . the swallowing patch is not working. even not for emacs, sxiv too. when i try to open it opening different window

No transparency

Thank you for the project!

I installed it recently and noticed that when using the -n (name) flag, terminal transparency stops working.

What could be the problem?

Icon error

simplescreenrecorder-2021-05-11_15.24.10.mp4

Hey I added some icon for typefile in neovim config but it doesn't show correct way :( Help me !

How to autoreload xresources when I log in Ubuntu

When I log in, some settings change default and I must reload xresources when i turn on ST terminal. How to solve that ???
P/s : actually I don't know what xresources is so I don't know solve that :( Do you have a discord sever? Plz send me, I need your help :<
image

Sixel support?

Thanks for the great build of st. The readme says to check out the sixel branch for support on sixel graphics, but I don't see the branch. I do see activity as recently as April 18th. Is this an error or has the branch been removed and readme just needs updating?

Xresources Issue

I get this error: '#D9E0EE': unknown terminal type.
Also weird stuff happens with my input (can't remove letters, etc..)

This is my xressources:

Xft.antialias:	1
Xft.hinting:	1
Xft.autohint:	0
Xft.hintstyle:	hintslight
Xft.rgba:	rgb
Xft.lcdfilter:	lcddefault

! window padding
st.borderpx: 20

!- 0.1 to 0.9 = transparency
st.alpha: 1.0

*background: #1E1E2E
*foreground: #D9E0EE

! Gray
*color0: #6E6C7E
*color8: #988BA2

! Red
*color1: #F28FAD
*color9: #F28FAD

! Green
*color2: #ABE9B3
*color10: #ABE9B3

! Yellow
*color3: #FAE3B0
*color11:  #FAE3B0

! Blue
*color4: #96CDFB
*color12: #96CDFB

! Mauve
*color5: #DDB6F2
*color13: #DDB6F2

! Pink
*color6: #F5C2E7
*color14: #F5C2E7

! Whites
*color7: #C3BAC6
*color15: #D9E0EE

README Images Broken

Self explanatory, the images in the README.md are invalid links. Judging by the url, it looks like the original repository containing the images has been deleted or it has been made private.

Control Backspace mapping

Summary

When I press ctrl+backspace I expect the last word to get deleted but the last character gets.

Note: Generally these kind of issues relate to terminal emulator mappings.


I had the same issue when using kitty & alacritty.

  • Here is the solution I used to address this on kitty:
map ctrl+backspace send_text all \x17

copy paste

How on earth do you copy paste, or how can i make it so that I can. I also cannot figure out how to change the font.
I am new to dwm and st so sorry if I am being a noob.

Change Color SSH

First thanks for this awesome patchset, it is my favorite one. I'm not sure this is the best place to ask, but my C experience is a bit limited and I'm not sure exactly how to extend st.

It's really cool to be able to hot-reload the terminal colors for every emulator on a machine. I would like to be able to have the same effect but for a terminal in a ssh session to use the .Xresources on the remote machine.
In other words, You could have a terminal open running a local shell that has the color scheme of the local machine, but then another terminal open simultaneously that is ssh'd into a remote box and has the color scheme of that remote machine.
Tell me if I'm wrong but I don't think that's currently possible with any patches I've found to st.

My use case is I always forget I'm ssh'd into a machine and accidentally run a command intended for my local machine on the remote box. I think everyone heard of the gitlab database deletion case.

I think this would really be a feature that is not only very visually appealing, but would also be extremely practical.

Could not open input device

just setting up my new T400, trying to install st, that works. but when i wanna launch it, i get this error:
XOpenIM failed. Could not open input device.

Xresources?

You can share your xresources to theme st?

Like in the README.md screenshots

Building under debian

Hello,

FYI, You will need the following dependencies to build under Debian (Ubuntu is probably similar):

apt install build-essential libxft-dev libharfbuzz-dev

issue: icons do not get fully loaded inside st using nvchad

Hello there, siduck. I am arztareef, a great admirer of your work (both NvChad and chadwm). I have been using st as my terminal emulator since I started linux and just now I have found this issue. The icons do not get fully loaded in when i open up nvim tree using nvchad. All the other other terminal emulator like alacritty and kitty works but only this build of st can fully render the icons. I would like to know what you did to accomplish this.

The issue:
image

ligatures patch

hey siduck I was wondering how did u apply ligatures patch. Did u apply ligatures patch before or after boxdraw patch. Then what is the name of the patch. There is two ligatures patch ligatures-alpha and ligatures-boxdraw. Which one did u use

[help] Gaps around st terminal

Hulloa there, siduck! I have figured out another issue with my patch of st terminal (https://codeberg.org/st). There is seem to have some awkward gaps around my patch of st while using neovim and other TUI(s.) utility. I am dropping a picture depicting the problem. I have tried other forks of ST Terminal and it appears that they also go through the same issue except _yours._I would really appreciate it how you went around and fixed this.
png

Killing terminals instead of reloading them

Hi! I'm trying to add "xrdb merge ~/.cache/wal/colors.Xresources && kill -USR1 $(pidof st)" to my bspwmrc, bspwm just killing all st windows instead of reloading colors from xresources file.

emoji not rendering properly(no color shown)

Hi Siduck76,

I am user of your nvim build, and through that saw your dwm and now your st fork. I previously had LukeSmith st build, but had always issues with emojis shown. So thanks first of all for the amazing colors and beautifully looking builds.

I am using your default settings. At the beginning I was having spacing issues, now it renders properly but emojis dont.
term2

OS:
Ubuntu 18.04

fc-list | grep JetBrains

/home/david/.local/share/fonts/JetBrains Mono Medium Nerd Font Complete Mono.ttf: JetBrainsMono Nerd Font Mono:style=Medium,Regular
/home/david/.local/share/fonts/JetBrains Mono Medium Nerd Font Complete.ttf: JetBrainsMono Nerd Font:style=Medium,Regular
/home/david/.local/share/fonts/JetBrains Mono Regular Nerd Font Complete.ttf: JetBrainsMono Nerd Font:style=Regular
/home/david/.local/share/fonts/JetBrains Mono Regular Nerd Font Complete Mono.ttf: JetBrainsMono Nerd Font Mono:style=Regular

fc-list | grep Iosevka

/home/david/.local/share/fonts/Iosevka Medium Nerd Font Complete Mono.ttf: Iosevka,Iosevka Nerd Font Mono:style=Medium,Regular
/home/david/.local/share/fonts/Iosevka Nerd Font Complete.ttf: Iosevka,Iosevka Nerd Font:style=Regular,Book
/home/david/.local/share/fonts/Iosevka Medium Nerd Font Complete.ttf: Iosevka,Iosevka Nerd Font:style=Medium,Regular/home

Also, I have installed the libraries mentioned in your README as well. I also used xrdb merge xresources and still no go. Could you help me sort out what the problem could be?

nb: the emoji does render properly in gnome-terminal or any other terminal not being st. I know in ARCH i could use the ttf fonts but yeah I am at a lost now. Thanks!

Wrong Font

Because you delete the repo matfonts, I can't install rigth fonts.

image

Please help me!

[Question] How did you get glyp-patch work with boxdraw

Hello you have a nice build here!

I just wanna ask that how did you make "glyph wide support" to work with boxdraw patch?

I can use 3rd patch from here https://st.suckless.org/patches/glyph_wide_support/
But it has some weird glyph blinking when I edit the file or move my cursor over the glyph: LukeSmithxyz/st#349

I try to add their fix but it seems to fail if I have boxdraw installed.

With your build glyphs are working without blinking so can you link the patch that you are using. The link in your credits give me "404"

Which patch fixes wide glyph truncation?

Hi. This is less an issue and more a question about a feature of your st build.

In a stock st build with the font set to iosevka (the same configuration as in your build) I find that wide icons are truncated when there's a color change.

# Truncated
echo -e '\e[0;31m\e[0m buddy'

# Not truncated
echo -e '\e[0;31m \e[0m buddy'

Now there is a space before the escape sequence in the second command which is why the glyph isn't truncated in it but otherwise st seems to see the change in color as an indication the some non-space character follows and then cuts off the symbol.

Screenshot_20210819_040314

However in your configuration this doesn't happen. At the moment I'm going through the difffering patches trying to find out which one gets this but I've also noticed some patches of unknown origin (like sixel). I'd appreciate if you could point out the relevent commits or help whatsoever.

Screenshot_20210819_040431

Emojis not showing and crashing terminal

2021-06-26_14-03-08.mp4

In the video you can see that I am using alacritty and starship prompt. Alacritty renders emojis correctly. But st cannot render the emojis and crashes on my face. I have jet brains mono nerd font also installed and also used default xresoirces but it didnt work

St crashing `X Error of failed request: BadLength (poly request too large or internal Xlib length error)`

The full error log

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:  24458
  Current serial number in output stream:  24479

The emulator closes and ssh session terminates.

OS: Ubuntu 20.04.5 LTS x86_64
Kernel: 5.15.0-46-generic
Shell: zsh 5.8

Missing dependency for void linux

I'm on void linux, by copying the dependencies you listed I got fatal error: gd.h: No such file or directory at compile time.
After installing gd-devel it compiles flawlessly, you can add it.

Thank you, I appreciate your efforts

Crashed during make some project like vue-cli

I was facing some issue like i'm make some project using vue-cli (vue create app) the terminal was going force closed/crashed, its also happened on gatsby too. here some preview

outputvideo.mp4

Re-add the licence

Greetings!

It seems you removed the MIT licence (485b01e) from this code you forked from Luke Smith (who in turn forked it from suckless). This is in violation of the licence. The licence itself states the following:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

By removing the licence, you are violating this. While I of course cannot force you, I suggest you bring it back as I see no reason to not keep it here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.