Giter Site home page Giter Site logo

Comments (12)

eschnett avatar eschnett commented on June 28, 2024 2

I already typed develop TerminalExtensions.

from terminalextensions.jl.

Keno avatar Keno commented on June 28, 2024

I think the image features of iTerm don't work in tmux either, so that's probably not a bad thing.

from terminalextensions.jl.

JonathanAnderson avatar JonathanAnderson commented on June 28, 2024

from terminalextensions.jl.

JonathanAnderson avatar JonathanAnderson commented on June 28, 2024

from terminalextensions.jl.

Keno avatar Keno commented on June 28, 2024

Huh, fascinating. In that case the proprietary escape codes do make it through tmux. Not sure why iTerm doesn't respond with its ident then.

from terminalextensions.jl.

eschnett avatar eschnett commented on June 28, 2024

imgcat begins with these lines:

# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux;
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It
# only accepts ESC backslash for ST. We use TERM instead of TMUX because TERM
# gets passed through ssh.
function print_osc() {
    if [[ $TERM == screen* ]] ; then
        printf "\033Ptmux;\033\033]"
    else
        printf "\033]"
    fi
}

# More of the tmux workaround described above.
function print_st() {
    if [[ $TERM == screen* ]] ; then
        printf "\a\033\\"
    else
        printf "\a"
    fi
}

from terminalextensions.jl.

Keno avatar Keno commented on June 28, 2024

Great find. Wanna submit a PR? ;)

from terminalextensions.jl.

eschnett avatar eschnett commented on June 28, 2024

... and the result is that tmux cannot display images consistently. imgcat uses extra escape sequence to "smuggle" the image past tmux so that iTerm draws it onto the screen. Of course, once tmux decides to redraw the contents, it overwrites the image.

iTerm has a "tmux integration mode". In this mode, if you start tmux via "tmux -CC", things are already working as expected. However, this changes the way one interacts with tmux: instead of the ^b key, one now has to use iTerm menus.

from terminalextensions.jl.

JonathanAnderson avatar JonathanAnderson commented on June 28, 2024

from terminalextensions.jl.

eschnett avatar eschnett commented on June 28, 2024

@JonathanAnderson Are you also using ssh? I'm using first ssh, then tmux on the remote system. At first glance this didn't work with tmux integration mode; tmux crashes with an error when I create a second tmux window (aka iTerm tab) ("bad working directory").

from terminalextensions.jl.

JonathanAnderson avatar JonathanAnderson commented on June 28, 2024

I do all my work over ssh. My iTerm profile will send the following text at start tmux -CC attach -t main -d && exit I think I also did something to make the command window hide.

iTerm with tmux -CC will keep an image in the terminal until the window is closed. If you disconnect, close the window, and reconnect, the image will be gone since the encoded image data isn't saved in the terminal buffer...

from terminalextensions.jl.

JonathanAnderson avatar JonathanAnderson commented on June 28, 2024

screen shot 2019-02-01 at 13 01 51

it seems to be working just needs a little cleanup here and there...

from terminalextensions.jl.

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.