lukesmithxyz / st Goto Github PK
View Code? Open in Web Editor NEWLuke's fork of the suckless simple terminal (st) with vim bindings and Xresource compatibility.
License: MIT License
Luke's fork of the suckless simple terminal (st) with vim bindings and Xresource compatibility.
License: MIT License
My dmenu does appear and extract links but doesn't seem to be able of opening anything. Using linkhandler separately does work though.
Hey Luke,
I'm on a fresh Archlabs install and just used pywal on a wallpaper I have. Everything applied well, even in st, but now the windows aren't transparent like they were before. I added *.alpha = 255
(tried other values too) to my .Xresources, I've checked the st config file and recompiled that as well but it's still the same.
I haven't changed the default compton config that is installed by LARBS.
edit: just to clarify, it was working before I used pywal
I have started to maintain my own fork of the official git repo. The one problem I keep getting on is to customize keybindings. I guess I edit the config.h
file, but I don't understand which keys are what. For example, how did you get Alt
+j/k
to scroll up and down?
I am trying to use Gruvbox light with st and it doesn't seem to work. I tried with Solarized dark too, but didn't work.
i can't use mouse to scroll down,while scroll up is working properly,does anyone has the same problem?
Hi Luke
I really like your stuff. But I'm missing that you are listing the requirements for your builds. I'm working on a minimal Linux installation. But when I compile your ST it failed. Sure I can figure out what is missing. But remember the guys that are new to Linux
Here are my output. I will add my solution asap I have time
# make
st build options:
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
CFLAGS = -I/usr/X11R6/include -DVERSION="0.8.1" -D_XOPEN_SOURCE=600 -O
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
LDFLAGS = -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft -lXrender
CC = c99
c99 -I/usr/X11R6/include `pkg-config --cflags fontconfig` `pkg-config --cflags freetype2` -DVERSION=\"0.8.1\" -D_XOPEN_SOURCE=600 -O -c x.c
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
x.c:15:10: fatal error: X11/Xft/Xft.h: No such file or directory
#include <X11/Xft/Xft.h>
^~~~~~~~~~~~~~~
compilation terminated.
Makefile:22: recipe for target 'x.o' failed
make: *** [x.o] Error 1
ST doesn't show '\U1F50D' but xfce4-terminal does. How do I fix it?
How can I remove patches and add patches??
Like the background opacity in st, how can I remove that?
Or can you point me to a tutorial?
OS: Ubuntu 16.04
After compiling, changing the font to font that I have, and installing st as mentioned, I can't run it, no error message is being printed.
config.h
it does exact same thing ad above.So I'm just wondering if you put some config that relates only for your setup ?
Is the delete key supposed to do nothing at all ? Am I missing something here ?
Hello.
I'm having trouble getting this feature
Compatibility with
Xresources
andpywal
for dynamic colors
to work. Unfortunately you don't provide an example .Xresources
file. So what I did is, I used terminal.sexy to export my desired color scheme for .Xresources
:
! special
*.foreground: #f7f1ff
*.background: #222222
*.cursorColor: #f7f1ff
! black
*.color0: #222222
*.color8: #69676c
! red
*.color1: #fc618d
*.color9: #fc618d
! green
*.color2: #7bd88f
*.color10: #7bd88f
! yellow
*.color3: #fce566
*.color11: #fce566
! blue
*.color4: #fd9353
*.color12: #fd9353
! magenta
*.color5: #948ae3
*.color13: #948ae3
! cyan
*.color6: #5ad4e6
*.color14: #5ad4e6
! white
*.color7: #f7f1ff
*.color15: #f7f1ff
After that, I reload it with xrdb ~/.Xresources
. But even after relogging st still displays the solarized theme. I hope I made it clear.
Thanks in advance, cheers!
I was using urxvt and the ranger image preview was working. With urxvt I didn't use compton. With st I began to use compton and with it my ranger preview image broke.
The image below shows what is happening.
I don't have any compton configuration, I just installed. Someone know what should I do?
Here is my rc.conf
set preview_script ~/.config/ranger/scope.sh
set use_preview_script true
set preview_images true
set preview_images_method w3m
set preview_files true
set preview_directories true
set draw_borders true
ps: When I kill compton process everything works fine. I don't know exactly if the problem is with st + ranger + compton or if is just ranger+compton problem, but maybe someone could help me.
In your last commit 0bd7a0b you changed the license from MIT to GNU which is a violation of the MIT license. It is stated very clearly:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
Hello,
How can I change default font ? Is this possible ? I am using Larbs setup. Please help me.
Thanks
Hi,
I'm pretty new to this so apologies if this isn't how I should be using issues. I was able to resize st's font with Xft.dpi
(I think? maybe *.font
though) after installing with LARBS in late January, but I just reinstalled from scratch with LARBS and there was no .Xresources.
In the issues and commits of voidrice
I think you removed it because of a color scheme issue? Anyway, I added it again with only the line Xft.dpi: 192
. I'm pretty sure that works because dmenu, i3 gaps, and window borders are bigger, but the st font isn't. I then added *.font: mono:size=20
to .Xresources
, still nothing. Running st -f "mono:size=20"
works as expected with a larger font.
I don't think you removed .Xresources
support in this build because it's still all over the readme and config.h (although the colors loaded there probably don't do anything on the latest voidrice
?). But issue #19 seems to just dismiss it entirely, no explanation? I love the vim features of this build and don't feel capable enough to heavily modify the xst build linked in that issue. Does this build support .Xresources
anymore, or am I misunderstanding?
Am I analyzing all this right? Thanks for any help!
Wide emojis get cut off when displayed in certain applications.
For example, compare newsboat in st
with newsboat in alacritty
This is not an issue of the font, I tested multiple for both terminal emulators. In other applications, such as (neo)vim, the emoji covers the following char as long as that char is not highlighted.
Hi, maybe I'm too dumb to realize the problem but why is my terminal cursor a vertical line instead of block shape like how it is in Luke's video. I fresh installed Arch Linux and install Larbs. I have also tried installing the Luke's st build but the cursor still remain as vertical line. When going into Vim, the cursor turns to block shape. After quit Vim, it turns back to vertical line. Anyone know how to fix this?
Hi Luke,
First, a big thanks for sharing! 🥇
Next, you should upload the PKGBUILD script to AUR for easy access to updates, etc, for Arch'ers using yay and similar pacman helpers 👍
i just recompiled st and the dmenu for the url link (Alt+l) is just blank...is anyone having this issue?
Hi! Sorry if this is not the right place but I got inspired to do an st build by your youtube videos so this was the first place I thought to come and seek help. I'm not using your build, but just a vanilla st with a couple of patches added. I'm doing this so I can actually learn how to configure this thing. Sorry in advance, I'm a total noob with suckless tools as I started only today.
So everything in my build went fine until I started to apply the xresources patch. I think the problem might be that the patch is not specifically for my version of st, the patch just has a date on it. Also I'm building with makepkg instead of normal make. Here is my PKGBUILD:
pkgname=reeky-st
appname='st'
conflicts=(${appname})
provides=(${appname})
pkgver=0.8
pkgrel=0
pkgdesc='A simple virtual terminal emulator for X. My personal config.'
arch=('i686' 'x86_64')
license=('MIT')
depends=('libxext' 'libxft')
makedepends=('ncurses')
url="http://st.suckless.org"
_patches=(
"https://st.suckless.org/patches/scrollback/$appname-scrollback-$pkgver.diff"
"https://st.suckless.org/patches/scrollback/$appname-scrollback-mouse-$pkgver.diff"
"https://st.suckless.org/patches/scrollback/$appname-scrollback-mouse-altscreen-$pkgver.diff"
"https://st.suckless.org/patches/xresources/st-xresources-20190105-9f80f67.diff"
)
source=(
"http://dl.suckless.org/st/$appname-$pkgver.tar.gz"
"config.h"
"st.desktop"
"${_patches[@]}"
)
md5sums=('4cae10d2dcc1f97ead37181b21b54212'
'e89bc7a7aa2beb6bc7a43597e2f562cc'
'a984de398f12717f0144b9a2bd2953ed'
'bbe056eaed5914f55ccea001ca7f05e9'
'72227737f6cd831afd014a3613bd559d'
'fa0bf6c0dae5a69e3b1916ce093f6aff'
'11e28f38988de5141bfdf0da8cbfde8a')
prepare() {
cd $srcdir/$appname-$pkgver
for patch in "${_patches[@]}"; do
echo "Applying patch $(basename $patch)..."
patch -Np1 -i "$srcdir/$(basename $patch)"
done
# skip terminfo which conflicts with nsurses
sed -i '/tic /d' Makefile
cp $srcdir/config.h config.h
}
build() {
cd $srcdir/$appname-$pkgver
make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
}
package() {
cd $srcdir/$appname-$pkgver
make PREFIX=/usr DESTDIR="$pkgdir" TERMINFO="$pkgdir/usr/share/terminfo" install
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$appname/LICENSE"
install -Dm644 README "$pkgdir/usr/share/doc/$appname/README"
mkdir "$pkgdir/usr/share/applications"
install -m755 "$srcdir/st.desktop" "$pkgdir/usr/share/applications/st.desktop"
}
And here is the error it spurts out:
patching file x.c
Hunk #3 succeeded at 802 (offset 5 lines).
Hunk #4 FAILED at 1019.
Hunk #5 succeeded at 1888 (offset 4 lines).
Hunk #6 succeeded at 2014 with fuzz 1 (offset 4 lines).
1 out of 6 hunks FAILED -- saving rejects to file x.c.rej
==> ERROR: A failure occurred in prepare().
Aborting...
Any idea why this is happening?
EDIT: Here is also the x.c.j rej:
--- x.c
+++ x.c
@@ -1019,8 +1033,6 @@ xinit(int cols, int rows)
pid_t thispid = getpid();
XColor xmousefg, xmousebg;
- if (!(xw.dpy = XOpenDisplay(NULL)))
- die("can't open display\n");
xw.scr = XDefaultScreen(xw.dpy);
xw.vis = XDefaultVisual(xw.dpy, xw.scr);
free(): invalid next size (normal)
Aborted (core dumped)
help pl0x
Hi Luke, thank you so much for your amazing amount of work setting LARBS and making your videos.
I am testing LARBS and I am having problems to get the transparency on st working. I have changed the alpha value on the .Xresources but nothing. And yes, "xrdb .Xresources" is automatically called by your .vimrc.
Any ideas?
i want to run a bash script which opens a file on another i3 workspace in vim in st.
it looks somehow like that:
i3-msg "workspace 5"
i3-msg "exec st vim /some/file"
the problem is, when i run st like this
st
it opens like i would expect it.
when i run st like this
st -e "vim /some/file"
st closes instantly after launching.
How can i achieve that st stays open with vim already open?
btw really awesome work you did with larbs!!!!
When I try to run st from another temrinal (in this case, Konsole because I'm running Kubuntu 18) the program does not launch and instead my terminal returns
Segmentation fault (core dumped)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [st] Error 1
Abandon all hope those who have joined the Mac cult?
I cannot get st to compile without the pywal colorscheme, which I no longer use. I've deleted the wal directory in .config/, I've uninstalled pywal, I've verified Xresources is empty, but no joy.
I've run through the commit history, looks like pywal compatibility was added in 195535f but this was just the Xresources patch. The patch was added to src in 7f231a6. In 1210133 the README was updated to reflect pywal taking precedent over all other colorscheming methods.
I cannot figure out why it is that my old pywal colorscheme is still overriding both the gruvbox default (which is what I would like) and my .Xresources (which is just gruvbox colors).
If st
launched with -n
argument then opacity from Xresourses ignored:
st -n asdf
I'm getting a little annoyed by the default solarized colors and am thinking of replacing them.
Does anyone have any particular colorscheme that they would recommend?
Obviously it should be somewhat generic since it's default (i.e. not all hot colors), but I'm pretty open. I just want it to have variant enough colors and look okay in most circumstances.
Hello, I'm using st for the first time and apparently everything is working good, except for the alpha config. No matter what value I set both in config.h or in .Xresources, the background remains solid.
ps: I'm remembering to use xrdb .Xresources after .Xresources changes and I'm remember to compile when I change config.h as well.
Someone knows what this could be?
this might be a stupid question, but some reason i can not locate the config.h file.
Hello,
I have added the entry:
st.alpha: 100
to my .Xresources file and ran
xrdb .Xresources
but my st terminal is still fully opaque.
Any ideas?
Since when did this function get removed?
(this is my first github issue so pls tell me if i need to provide more information)
I use youtube-viewer to browse Luke's videos because I hate using bloated webkits to perform such a basic service. I'm using this fork of st bc i'm too much of a brainlet to get the patches working, and anyways youtube-viewer almost always causes st to crash. Running st in another terminal, I get the following output.
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: 4621
Current serial number in output stream: 4841
Interestingly, it seems to be dependent on window size. When the terminal is less than roughly 1/3 of my screen, youtuve-viewer renders fine. I hypothesize this is because the terminal size "cuts off" incompatible emoji titles in Luke Smith's videos, and prevents st from crashing. More interestingly, it seems only some emoji are affected. The "lightning bolts" render fine.
So I changed the font to Unifont and it did render Luke Smith's video titles without crashing. However... it's output is a little less than ideal.
I want to keep my Liberation (FREE AS IN FREEDUMS) Sans font, and I don't want to have to be limited by fonts that must support emoji unicodes. Is there a way for st to handle like URxvt and just "default" to a block when it fails to render a character? And if there isn't, can Luke pls include a statement in the README listing some cool, hip fonts that renders unicode emojis well in terminals? Thanks.
Compiles normally on the latest arch, but when I try to run it it says
free(): invalid next size (normal)
st somehow can't use del keys and it have some pasting issues. When pasting, the text somehow got cutted half of the word. Is this a common issues on st ?
The backspace key is exhibiting some weird behavior. After typing in something and hitting backspace, whitespace is inserted. In essence, backspace acts like the spacebar visually, but internally it recognizes the backspace.
If |
is the cursor:
$ exit|
After hitting backspace once
$ exit |
Spamming backspace:
$ exit |
And then hitting enter:
$ exit
$ |
I don't know if that helps or not.
Hi, I absolutely love your st fork. When in command mode pressing v
opens vim. I want to remove this shortcut. I've looked into config.h
but I didn't find where this shortcut is defined!. (shotcuts[]
doesn't contain this shortcut). Your LARBS's bashrc file defines an alias v as $EDITOR (vim by default). But I dont' this that has anything to do with pressing v
in command mode in your st. Please help!
Doing Shift+Alt+PageUp/PageDown
does not increase or decrease the font, instead it scrolls up or down
How do I fix that?
when i set in config.h :
unsigned int alpha = 0xff; which mean no transparency everything works fine.
when i set the transparency to 0xed for example ranger cant display images
anyone can help or experienced the same issue ?
https://imgur.com/a/JGanPCq
➜ st git:(master) ✗ make
st build options:
CFLAGS = -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DVERSION="0.8.1" -D_XOPEN_SOURCE=600 -O
LDFLAGS = -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft -lXrender -lfontconfig -lfreetype -lfreetype
CC = c99
c99 -I/usr/X11R6/include pkg-config --cflags fontconfig
pkg-config --cflags freetype2
-DVERSION="0.8.1" -D_XOPEN_SOURCE=600 -O -c x.c
x.c: Dans la fonction « config_init »:
x.c:1999:11: error: « resources » non déclaré (première utilisation dans cette fonction); vouliez-vous utiliser « resource_load » ?
for (p = resources; p < resources + LEN(resources); p++)
^~~~~~~~~
resource_load
x.c:1999:11: note: chaque identificateur non déclaré est rapporté une seule fois pour chaque fonction dans laquelle il apparaît
make: *** [Makefile:22: x.o] Error 1
From a fresh clone
OS: Kubuntu 18.04.1 LTS
Version of st: latest
When I paste, it doesn't paste anything at all, pasting my primary clipboard works in other applications (and urxvt) but not in st. Now if I select some text in st and try to paste it will past that text perfectly fine, but if I close the current st and open up a new one then it won't paste the previously selected text.
Hello, I use st with i3wm and when a new window spawn next to a window containing a terminal, the text on that terminal gets truncated instead of resizing. I never noticed a similar issue in your setup while watching your videos. Is there a specific patch for this problem ?
I'd like to either patch in libsixel support natively, or add an option patch for it so my build of st
would be able to use sixel to view images and moving gifs.
There is an already existing patch for an earlier version of st here: https://gist.github.com/saitoha/70e0fdf22e3e8f63ce937c7f7da71809
I haven't bothered to get this working because it requires more than just dealling with .rej
files, but also I think some variables and functions have been renamed and moved between files. So I haven't actually gotten this working on my current updated build.
So I'm curious if anyone else with some time to tinker is willing to play around with this.
Of course, that one linked is a big patch (putting the source over 5k lines), hence why I might prefer it as a patchable diff. Of course, if you're more familiar with sixel, you might be able to do it more elegantly.
After a upgrade, some text editors and file managers closes almost instantly on opening and previewing text files with colored emojis inside.
Before the upgrade i was able to open and preview these same text files with the same applications listed below.
ST terminal was open while the update was in progress because i did a command-line request.
I did the reboot a couple hours later. Maybe 6h or 8h after the update.
Manjaro-i3
editor: vim, nano
file managers: vifm, ranger, lf, nnn
others: newsboat, neomutt
Emoji font installed: EmojiOne (installed at distro install), noto-fonts-emoji (installed at 2019/04/01)
The upgrade was at 2019/03/30 ==> PACMAN.LOG at pastebin.com
The .Xresources at pastebin.com
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.