Giter Site home page Giter Site logo

Comments (8)

LukeSmithxyz avatar LukeSmithxyz commented on July 17, 2024 3

I think there are only a few terminal emulators that don't do this. It certainly does so on my machine as well. The problem is pretty much inherent as it would require storing output and rewriting it constantly upon resize.

Now if someone out there has written an st patch to somehow solve this problem, I'd be happy to integrate it into this repository, but I don't think there is such a thing.

from st.

terriblephrases avatar terriblephrases commented on July 17, 2024 1

Use tmux if you want that seamless resize functionality.

from st.

 avatar commented on July 17, 2024

Ah I see. However, there is a scrollback patch. Doesn't it have to store output for us to scroll back too ? I am not good enough with C to investigate how it does that, though. I will try the tmux way but I need to figure a good way to handle nested tmux since I connect to remote machines with tmux on them

from st.

LukeSmithxyz avatar LukeSmithxyz commented on July 17, 2024

It would actually be a lot more complicated than mere scrollback, because you would have to keep track of line breaks and basically reoutput everything. E.g. let's say you run pacman -Sy and there appear loading bars... well, what happens to the loading bars when you resize? They'd have to be recreated and resized with information from the original program, etc.

from st.

exapsy avatar exapsy commented on July 17, 2024

If anyone's interested at that point, since ST is not gonna offer such functionality until someone makes a big patch about it, personally I just launch a TMUX session

Put this in your ~/.bashrc or ~/.zshrc

if [ -z "$TMUX" ]
then
    tmux attach -t TMUX || tmux new -s TMUX
fi

Just learn to use windows in your tmux session, since that script is not gonna start a new session in every new shell instance you open.

Also, do not use this script to avoid that

exec tmux
//or
tmux

since that is gonna bloat your tmux with a new session every time you open a new shell, which session is never exited even after you exited the shell.

If you want to navigate on tmux windows easily you can use this configuration in your .tmux.conf

// Use Shift+Arrow to navigate
bind -n S-Left Previous-Window
bind -n S-Right Next-Window

from st.

 avatar commented on July 17, 2024

@Eksapsy Yep that's what I ended up doing. It works fine

from st.

abzrg avatar abzrg commented on July 17, 2024

Here is a fix for that: https://groups.google.com/g/wmii/c/iJvvk0oIlIk?pli=1

Simply install scroll program (clone ...; cd scroll; make; sudo make clean install) and afterwards spawn terminals with the command: st -e scroll /bin/<fav shell>

For example, I have the following termcmd (command to spawn a terminal) in my dwm config:

 static const char *termcmd[] = { "st", "-e", "scroll", "/bin/zsh", NULL };

also for scratchpad, if you have one:

const char *spcmd[]    = {"st", "-n", "spterm", "-g", "90x23", "-e", "scroll", "/bin/zsh", NULL };

From the scroll webpage:

At the moment it is in an experimental state. Its not recommended for productive use.

Sometimes (1 out of 10 maybe) when I spawn new terminal an % appears persistently at the end of output of every command. I managed to get rid of with opening and closing lf file manager. Not sure if it's a shell problem or related to scroll. Anyhow, that is my only problem with it.

from st.

LukeSmithxyz avatar LukeSmithxyz commented on July 17, 2024

Scroll used to be in this build, but I removed it because it's awful and regularly breaks everything.

from st.

Related Issues (20)

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.