There is a couple of known font changing escape code for urxvt (rxvt-unicode):
printf '\e]710;%s\007' "$FONT" printf '\e]50;%s\007' "$FONT"
I have been using it in my change-term-font.sh for three years, but I never could figure out how to make it work within tmux. I did search for an answer, but didn’t find any solution, probably wasn’t trying hard enough.
The solution is quite simple, you prepend \ePtmux;\e and append \e\\ around the escape codes. That’s it, and tmux would pass along without eating it, for instance:
printf '\ePtmux;\e\e]710;%s\007\e\\' "$FONT"
It’s more than three years and was released in tmux v1.5 (2011-07-09):
- Support passing through escape sequences to the underlying terminal by using DCS with a “tmux;” prefix.
If I really need to change fonts, I would have to detach tmux, change the font, then finally reattach, quite a hassle. That’s why I don’t usually do it unless I have to.
Well, it’s better late than never.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.