Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting window title in tmuxline_preset #76

Open
bearcatsandor opened this issue Feb 27, 2017 · 1 comment
Open

Setting window title in tmuxline_preset #76

bearcatsandor opened this issue Feb 27, 2017 · 1 comment

Comments

@bearcatsandor
Copy link

bearcatsandor commented Feb 27, 2017

Simply, is there a way to place the current window title into section a? Since the tmuxline_preset takes variables as arguments and that's not a variable, how would one do it? With a script?

In other words when i do an 'emerge -avuND @world'' which sets my window title to 'emerge (1 of 3) media-video/parole-0.9.1", i want that to appear in tmuxline_preset.

If i figure this out on my own, i'll place the answer here for others.

Thanks.

@slabua
Copy link

slabua commented Jan 9, 2018

I have a similar problem. I realised that on a remote session, the parameter #W is replaced by the current running program, whilst locally it shows the title of the terminal.
Locally I've also edited .bashrc in order to succesfully change the title of the terminal (gnome-terminal in this case) whenever a command is running. Though, after starting a tmux session, the terminal title is set to tmux for the whole duration of the session, making it seemingly impossible for tmuxline to show the running program, and in tmuxline I see user@host:path.
I'm not sure which is the expected behaviour, but I would like to show in tmuxline the running command as well.

Edit:
I checked more in detail, but it seems like the issue is not related to whether I use tmux locally or remotely. On one machine it shows the current command being executed, on the other machine, instead, the standard user@host:path.
I have the exact system running, with the same tmux version and same tmuxline config file.

screenshot from 2018-01-09 17-03-24

Edit2:
Further investigation made me solve my issue by editing line 32 of /etc/bashrc from
PROMPT_COMMAND='printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
to
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants