enigma9o7
Crew Member
Posts: 1,427
Likes: 1,336
|
Post by enigma9o7 on Apr 29, 2021 19:06:49 GMT
I noticed in Terminology in Bodhi 6, after using "Set Title" the dialog can close! (on bl5 when i tried this it never closes so I never played with it further).
I would like to set it like macos terminal, so that it shows whatever is running right now. This is useful for watching scripts. Is this possible? Is there a variable name or something I can use for "current process" or "current command" or "current line of script" or something that I can set the title to (instead of the "$USERNAME"@"$HOSTNAME":" $PWD" type thing is now).
|
|
|
Post by ylee on Apr 30, 2021 12:35:49 GMT
You can find what ya need in this blog post: Xterm Titles With Bash. It will take some work to make it pretty as a prompt in terminology. Let us know how it goes.
|
|
enigma9o7
Crew Member
Posts: 1,427
Likes: 1,336
|
Post by enigma9o7 on Apr 30, 2021 14:11:52 GMT
You can find what ya need in this blog post: Xterm Titles With Bash. It will take some work to make it pretty as a prompt in terminology. Let us know how it goes. Yep, although I read the article, the answer was right at the bottom, and seems to be working fine. It is not using the "set title" button from terminology at all, it is done by adding the following to .bashrc:
case $TERM in rxvt|*term) set -o functrace trap 'echo -ne "\e]0;"; echo -n $BASH_COMMAND; echo -ne "\007"' DEBUG export PS1="\e]0;$TERM\007$PS1" ;; esac I also learned in that article the reason I've seen it on macOS terminal is cuz this is default behavior for zsh, which they use for default shell.
|
|
enigma9o7
Crew Member
Posts: 1,427
Likes: 1,336
|
Post by enigma9o7 on Apr 30, 2021 15:01:35 GMT
nvm. that messes up the prompt and autocomplete and other things
|
|
|
Post by ylee on Apr 30, 2021 19:04:17 GMT
nvm. that messes up the prompt and autocomplete and other things You are going to have to tweak it some to get it to work as you want. I knew that when i looked at the code and briefly tested myself.
|
|