Giter Club home page Giter Club logo

st-flexipatch's People

Contributors

badarg1 avatar bakkeby avatar dosisod avatar hejsil avatar jcallicoat avatar kiprasmel avatar loiccoyle avatar pk-kampanart avatar sajayprakash avatar step- avatar stevenrace avatar ultrahalf avatar utkarshverma avatar veltza 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

st-flexipatch's Issues

click url patch?

I was interesting in trying to implement a click url method as I wasn't really a fan of having to put the link in my clipboard history before being able to right click the link (through the right click to plumb patch). With a cursory google search, I stumbled across this reddit post. Would you be willing to include the patch provided in the post with this repo? If not, no big deal; it was pretty easy to include myself.

glitches after opening new windows?

image
image
no idea what causes this
the patches i have enabled are:

alpha
anysize
anysize_nobar
boxdraw
clipboard
columns
font2
ligatures
newterm
openurlonclick
scrollback
scrollback_mouse
sixel
sync
w3m
xresources
xresources_reload

Unable to use externalpipe with right-click-to-plumb and/or opencopied patches

As the title says, the patches don't seem to work together. If they're all enabled (or external pipe and one of the others is enabled) using the opencopied command or making a right click on a selection freezes the st window. I assume that this is probably intentional, but I thought I'd ask because I'm not sure.

I would really like to have the ability of having both the external pipe and right-click-to-plumb. If indeed these two patches aren't meant to work out of the box together, is there a way to make them cooperate? It looks like there's a newer version of right-click-to-plumb if that helps https://st.suckless.org/patches/right_click_to_plumb/

Mouse Scrollback does not work in manpages with the correct patches enabled

I cannot mouse scroll in manpages with st-flexipatch
I have enabled the scrollback, scrollback-mouse and scrollback-mouse-altscreen patches. Scrolling with the mouse works in the terminal but not in manpages specifically.
Interestingly manpage mouse scrolling works in Distrotube's build https://gitlab.com/dwt1/st-distrotube
I tried replacing the kscrollup and kscrolldown bindings in config.h with the bindings that DT used
{ XK_ANY_MOD, Button4, kscrollup, {.i = 3}, 0, /* !alt */ -1 },
{ XK_ANY_MOD, Button5, kscrolldown, {.i = 3}, 0, /* !alt */ -1 },

However when I do this I get the following warning:

[matt@mpc ~/st-flexipatch]$ sudo make install 
c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`  `pkg-config --cflags freetype2`  `pkg-config --cflags harfbuzz` -DVERSION=\"0.8.4\" -D_XOPEN_SOURCE=600  -O1 -c st.c 
c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`  `pkg-config --cflags freetype2`  `pkg-config --cflags harfbuzz` -DVERSION=\"0.8.4\" -D_XOPEN_SOURCE=600  -O1 -c x.c 
In file included from x.c:59: 
config.h:192:87: warning: excess elements in struct initializer 
  192 |         { XK_ANY_MOD,           Button4, kscrollup,      {.i = 3},      0, /* !alt */ -1 }, 
      |                                                                                       ^ 
config.h:192:87: note: (near initialization for ‘mshortcuts[0]’) 
config.h:193:87: warning: excess elements in struct initializer 
  193 |         { XK_ANY_MOD,           Button5, kscrolldown,    {.i = 3},      0, /* !alt */ -1 }, 
      |                                                                                       ^ 
config.h:193:87: note: (near initialization for ‘mshortcuts[1]’) 
c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`  `pkg-config --cflags freetype2`  `pkg-config --cflags harfbuzz` -DVERSION=\"0.8.4\" -D_XOPEN_SOURCE=600  -O1 -c hb.c 
c99 -o st st.o x.o hb.o -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft -lXrender  `pkg-config --libs fontconfig`  `pkg-config --libs freetype2`  `pkg-config --libs harfbuzz` 
mkdir -p /usr/local/bin 
cp -f st /usr/local/bin 
chmod 755 /usr/local/bin/st 
mkdir -p /usr/local/share/man/man1 
sed "s/VERSION/0.8.4/g" < st.1 > /usr/local/share/man/man1/st.1 
chmod 644 /usr/local/share/man/man1/st.1 
tic -sx st.info 
7 entries written to /usr/share/terminfo 
mkdir -p /usr/local/share/applications # desktop-entry patch 
cp -n st.desktop /usr/local/share/applications # desktop-entry patch 
Please see the README file regarding the terminfo entry of st. 

In addition, those keybinds are the same keybinds that are used in the scrollback-altscreen patch on the suckless site so I'm not sure why I'm thrown such a warning.

How could this be fixed?

How to specify variants of the font?

How does st look for the bold variants of the font? I want to tell st to use a semibold font instead of the bold one. How do I make st behave like this?

I wrote a fontconfig rule to modify the weight of the bold font to semibold and the rule works in fc-match, but st still doesn't pick it up.

Neovim Crashes On Open

Steps to produce:

  • clone this repo
  • # make install
  • $ nvim

$ nvim outputs this to stdout:

ABORT: lookup_next within a TYPE_KEY node
zsh: abort (core dumped)  nvim

$ env -i TERM=ansi-256color "$(which nvim)" runs nvim successfully though. $ nvim runs normal on a fresh st clone.

Incomplete UI with Scroll Back Mouse Patch

I was not able to reproduce this on regular st.

referencing: gokcehan/lf#288
st-flexipatch would sometimes display incomplete UI for the file manager lf.

Steps to reproduce:

  • Clone repo.
  • Enable SCROLLBACK_PATCH and SCROLLBACK_MOUSE_PATCH in patches.h
  • $ while sleep 0.1; do st -e lf; done and press q in lf

It could take several tries to see something like
image
instead of
image

Sometimes it's the first try, sometimes it's the 27th. With other patches (I can't try them all in combinations to be precise) this gets more frequent.

"/usr/bin/ld: cannot find -lXcursor" when compiling

when i run make command, then it'll show error:

/usr/bin/ld: cannot find -lXcursor
collect2: error: ld returned 1 exit status
make: *** [Makefile:33: st] Error 1

after install libxcursor-dev , there's no more error.

If i compile the original source code from suckless.org , everything is fine and i don't have to install this extra dependency (libxcursor-dev), so can you remove this extra dependency or tell us explicitly why we need to install this extra dependency?

## my system:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux bullseye/sid
Release:        testing
Codename:       bullseye

$ uname -a
Linux debian 5.6.0-1-amd64 #1 SMP Debian 5.6.7-1 (2020-04-29) x86_64 GNU/Linux

How `ANYSIZE`s are related to each other

Currently there are 3 similar patches:

  • ANYSIZE_PATCH
  • ANYSIZE_NOBAR_PATCH
  • ANYSIZE_SIMPLE_PATCH

but under none of them is written about their relationships (they conflict with each other
or one depends on the other).

`ANYSIZE_NOBAR_PATCH` causes span on `xev` output

I don't know yet if this is a bug or not. But since ANYSIZE_NOBAR_PATCH causes
a redraw, which causes hxev to spam a continuous stream of messages like:

PropertyNotify event, serial 34, synthetic NO, window 0x2600001,
    atom 0x157 (_NET_WM_STATE), time 2364461, state PropertyNewValue

This is reproducible as it turns out to be Xmonad but not in dwm, so it's not clear if this
is a bug or Xmonad's distinction.

st -e with fzf leaves garbage at the top of the terminal

$ st -e dash -c 'printf "a\nb\n" | fzf --border rounded --color dark'

image

The top few characters are garbage that is not indented to be here. Sleeping for 0.1 seconds before calling fzf and the garbage is gone:

$ st -e dash -c 'sleep 0.1s; printf "a\nb\n" | fzf --border rounded --color dark'

image

Currently, I have a patch locally that removes the code in st that waits for the window to start up. My theory is that st does not respond to fzf with correct information in time (or something like that). Unsure if this is the right fix. I'm assuming there must have been some good reason to wait for the window (though I don't quite see what that would be).

diff --git a/x.c b/x.c
index 52c7348..22b5b02 100644
--- a/x.c
+++ b/x.c
@@ -3088,22 +3088,6 @@ run(void)
 	struct timespec seltv, *tv, now, lastblink, trigger;
 	double timeout;
 
-	/* Waiting for window mapping */
-	do {
-		XNextEvent(xw.dpy, &ev);
-		/*
-		 * This XFilterEvent call is required because of XOpenIM. It
-		 * does filter out the key event and some client message for
-		 * the input method too.
-		 */
-		if (XFilterEvent(&ev, None))
-			continue;
-		if (ev.type == ConfigureNotify) {
-			w = ev.xconfigure.width;
-			h = ev.xconfigure.height;
-		}
-	} while (ev.type != MapNotify);
-
 	ttyfd = ttynew(opt_line, shell, opt_io, opt_cmd);
 	cresize(w, h);

Scrollback mouse altscreen speed

How make scrolling with mouse wheel faster, what I need to change for it?
(I set its in my patches.h:

#define SCROLLBACK_PATCH 1
#define SCROLLBACK_MOUSE_ALTSCREEN_PATCH 1

)

Patch request: palettes / colour schemes

Hi! Would it be possible to include the palettes / colour schemes st patch for flexipatch? I'd love to make use of it in my current flexipatch build to cycle between a black-and-white palette and a standard 16-colour palette on the fly, but for now that seems to be missing from flexipatch entirely.

sixel graphics become white when combined with alpha patch and the background is white

Adding this here for reference. The alpha compatibility for sixel graphics is not quite there and colors blend into the background when transparency is used against a white background.

This is believed to be due to that the sixel graphics use RGB colors instead of RGBA. If anyone knows how to do this properly then help would be appreciated.

sixel

Feat req: Add glyphs to boxdraw patch

Would it be possible to add the glyphs "▏" and "▎" to the boxdraw patch? I use them for git signs and indentlines in my nvim config and having these drawn as long lines would be awesome.

By the way, Alacritty and foot seem to include this glyph by default, so maybe their source code could be helpful here.

Here's a comparison:
image

Left is Alacritty and st on the right.

You can see that the glyphs are not being joined in the case of st.

extract sixel patch

hello, is it possible that the sixel patch from this repository (assuming it works), can be extracted for manual patching use?

Can't take screenshots of st using maim in certain instances

I have had this problem for months and it has killed me inside.
Essentially, when I use maim to take a screen and xclip to copy it to the clipboard, most of the time it doesn't work and when I try to paste it in Firefox it freezes for several seconds. I have been totally unable to solve this and I can screenshot every other thing, except my terminal.
I've had to use Flameshot for a lot of stuff now which I hate for multiple reasons and even then, sometimes it doesn't work properly. Today I made a fresh st-flexipatch and the problem still, annoyingly, persists.
Has anybody got any clue how to fix this? I might have to finally say goodbye to st and try something like alacritty to see if the problem is solved on another terminal.

fatal error: arch/limits.h: No such file or directory

I'm trying to compile but got a weird error.

This is output of 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/sysprof-4 -pthread -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/sysprof-4 -pthread -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread -DVERSION="0.8.5" -D_XOPEN_SOURCE=600 -O1
LDFLAGS = -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft -lXrender -lfontconfig -lfreetype -lfreetype -lharfbuzz
CC = c99
c99 -I/usr/X11R6/include pkg-config --cflags fontconfig pkg-config --cflags freetype2 pkg-config --cflags harfbuzz -DVERSION="0.8.5" -D_XOPEN_SOURCE=600 -O1 -c st.c
In file included from st.c:5:
/usr/local/include/limits.h:4:10: fatal error: arch/limits.h: No such file or directory
4 | #include <arch/limits.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:25: st.o] Error 1
[ble: exit 2]

st -e lf breaks ueberzug previews?

This is weird.. I got previews in lf** running with lfimg*** using ueberzug no problem in st-flexipatch when starting lf withing st.
But when I use st -e lf in a shortcut the image preview is broken on images and videos..

patches applied:
ALPHA_PATCH 1
COLUMNS_PATCH 1
HIDE_TERMINAL_CURSOR_PATCH 1
KEYBOARDSELECT_PATCH 1
SYNC_PATCH 1
UNIVERSCROLL_PATCH 1
WIDE_GLYPHS_PATCH 1
XRESOURCES_PATCH 1
XRESOURCES_RELOAD_PATCH 1

** https://github.com/gokcehan/lf
*** https://github.com/cirala/lfimg

I don't even know if this is an st issue..

Add new patch that is not included

I am trying to install the Nord Theme patch, but it doesn't seem to be working. How can I use st-flexipatch to install the Nord theme, or any other patch that is not included?

2 character wide glyphs don't work properly in st

Unicode 9 added glyphs and emojis that are 2 characters wide instead of one which has caused problems for me like overlap with text (adding a space fixes this which isn't a huge issue) and the main issue of characters in a line that contains a 2 char wide glyph getting deleted. It's quite random and it can be worked around but is very annoying regardless. Letters in words can be deleted randomly just because I have a desktop emoji in the same line.

This is also an st issue, not restricted to flexipatch and afaik some terminals have fixed the issue but not st. Anyone know how it could be fixed?

patching st-flexipath/config.h with st-solarized-dark-0.5.diff

Hello, thanks for an excellent tool. Having patched and installed included patches to my heart's content, I now wish to patch st-solarized-dark-0.5.diff, which isn't included. The perequisite no-bold-colors.diff is included in flexiptach. Can I just patch st-flexipatch/config by hand at the alpha patch stage? Or, must I await it's possible inclusion into the flexiptach project?

Blinking cursor patch?

First of all, thank you for this! As someone not too comfortable with C this is a great starting point/reference for working with st.
The only thing I miss is having a blinking cursor. Is this possible to include?

Add support for `anysize` patch for sixel

The current sixel patch doesn't respect the border offset set by the anysize patch.

The fix is simple, just add the following in x.c in xfinishdraw():

#if ANYSIZE_PATCH
XCopyArea(xw.dpy, (Drawable)im->pixmap, xw.buf, gc, 0, 0, im->width, im->height, win.hborderpx + im->x * win.cw, win.vborderpx + im->y * win.ch);
#else
XCopyArea(xw.dpy, (Drawable)im->pixmap, xw.buf, gc, 0, 0, im->width, im->height, borderpx + im->x * win.cw, borderpx + im->y * win.ch);
#endif

I'm too busy right now to work up a PR, sorry.

st-flexipatch gives errors when using nvim

When I use neovim in st I get these errors:

erresc: unknown csi ESC[22;0;0t

erresc: unknown csi ESC[22;0t

erresc: invalid color j=258, p=?

erresc: unknown csi ESC[23;0;0t

erresc: unknown csi ESC[23;0t

This only happens when I use nvim and I have seen other people with this error but I haven't found a fix for it. I do know that distrotube's build doesn't have this issue however I don't want to switch to his build. These errors annoyingly clog up the ~/.xsession-errors file

How to preserve scrollback buffer on `Ctrl+l`.

Most terminals(e.g. Alacritty) have this thing where pressing Ctrl + l only scrolls the shell prompt to the top, while keeping the scrollback history.

In st, however, this keybinding clears the scrollback buffer as well. As it's not to my preference, could you please let me know which section of the code should I look into?

[patch request] Here is a list of the patches that should be included in the project

Hello and first of, thank you so much for create this awesome project, without this i will never even thinking about using of patching ST. But there are some patches that i think should be included in the project:

Patches

ANSI escape sequences

ANSI escape sequences (e.g: OSC and SGR parameters) are the standard that all terminal should supported, it's enable some tool such as bui-terminal to handle changing color scheme on-the-fly (doesn't need to restart the terminal) and cross-terminal without having to config individual terminal (some of which doesn't support xresources).

  • blinking_cursor (mentioned in #20): to control cursor's look
  • osc_10_11_12_2: change terminal's colorscheme
  • xclearwin: clears the window before the redraw of the terminal when the bg color has been changed (merged)
  • undercurl (mentioned in #20): support for special underlines

Desktop icon

  • desktopentry: creates a desktop-entry for st. This enables to find st in a graphical menu and to display it with a nice icon
  • netwmicon: enables to set _NET_WM_ICON which hardcodes an icon for st:

    Generally the icon of an application is defined by its desktop-entry. A patch with the name desktopentry already exists for this purpose. However, some programs like tint2 do not respect the desktopentry and rely instead on an hardcoded icon which has to be defined by _NET_WM_ICON. Since st does not define _NET_WM_ICON those programs will display some default icon (which is ugly).

Rendering

  • sync: better draw timing to reduce flicker/tearing and improve animation smoothness

Inputs

  • delkey: return BS on pressing backspace and DEL on pressing the delete key
  • universcroll: always use Mouse{4,5} to scroll {Up,Down}. Doesn't matter alt screen or not. No more ^Y^Y^Y^Y^Y^E^E^E^E^E!

Extra

Features that can be achieved through using terminal multiplexers or other utility.

  • vim_browse: move through the terminal history-buffer, search for strings using VIM-like motions, operations and quantifiersdelete key

swapmouse patch?

Sorry to make intermittent requests, but I was wondering if you'd be willing to implement the swapmouse patch?

Unicode characters not displayed when ncmpcpp-ueberzug is opened directly with a dwm keybind

I have binded ncmpcpp-uezberg to a key in my dwm config (static const char *music[] = {"st", "-e" , "/home/sophos/.config/ncmpcpp/ncmpcpp-ueberzug/ncmpcpp-ueberzug"};). When I use this keybinding unicode characters aren't displayed.
image
Left window is how it should look, right window is how it looks when opened with the keybind.
This doesn't happen when I open the terminal first and then enter the command. It also doesn't happen if I open it using the command st -e /home/sophos/.config/ncmpcpp/ncmpcpp-ueberzug/ncmpcpp-ueberzug either. It works fine with normal ncmpcpp.
It works as it should on alacritty.

Unable to `make` while using scrollback patch

image

Reproduce:

  • Clone the repo.
  • Enable SCROLLBACK_PATCH (line 191)
  • Run make.

Error:

In file included from st.c:20:
st.h:133:12: error: ‘HISTSIZEundeclared here (not in a function)
  133 |  Line hist[HISTSIZE]; /* history buffer */
      |            ^~~~~~~~
make: *** [Makefile:32: st.o] Error 1

[request] Add patch column patch

Hi @bakkeby , st cuts text inside it when st's window is resized :/ . Most terminals dont do this. I didnt find any patches for it either.

I found a build which has this issue fixed , seems like it extends the patch column from here.

@BeyondMagic 's build didnt provide any patch for it tho , I found some useful commits BeyondMagic/flarity@4339de9.

( st without patch column and with it (beyondmagic's build) )

simplescreenrecorder-2021-07-22_07.54.21.mp4

It would be very nice if there was a patch for this :]

Unknown CSI errors in st-flexipatch when opening and closing neovim

I had this problem before and applying a newer CSI patch fixed it, however these errors seem to have returned whenever I do st -e nvim

erresc: unknown csi ESC[>4;2m
erresc: unknown csi ESC[>4;0m

Opening nvim in st normally is fine, it's when I do st -e nvim that gives trouble, even doing something like st -e sleep 2; nvim doesn't output an error, so it's something specific. It may be to do with neovim 7.0 having been released?

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.