Giter Site home page Giter Site logo

Comments (4)

thestinger avatar thestinger commented on June 27, 2024 2

You can set a title with the escape code used by xterm/rxvt. There are some examples here.

I use this with zsh and it works with termite:

case "$TERM" in
    vte*|xterm*|rxvt*)
        precmd() { print -Pn '\e];%n (%~) - Terminal\a' } ;;
esac

from termite.

mb720 avatar mb720 commented on June 27, 2024 1

I have this in my .bashrc to set the window title (tested with i3 and Sway):

# After each command finishes, we set the terminal window title to the
# current working directory. If, for example, Vim sets the window title
# to the file's name and we exit Vim, the window title becomes the
# current directory again.
# There has to be a space between $(pwd) and \007 so the sequence is ended properly,
# otherwise the window title would only be changed sometimes.
# These escape sequences are documented in man 4 console_codes.
# \033 is octal for ESC in ASCII, \007 is BEL
PROMPT_COMMAND="$PROMPT_COMMAND;echo -ne \"\033]0;\$(pwd) \007\""

from termite.

thestinger avatar thestinger commented on June 27, 2024

I'm opening a separate bug for the upstream issue with weechat/vim mouse/title behaviour. Just so I don't forget about it :)

from termite.

alecmev avatar alecmev commented on June 27, 2024

A relevant section in Arch wiki, for future lurkers: https://wiki.archlinux.org/index.php/Zsh#xterm_title

from termite.

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.