I am a loyal Linux fan who has been spending a lot of time using iTerm on a mac lately. One thing I really like about the mac, and iTerm in particular, is the ability to use a keyboard shortcut to in/decrease the font size. I believe it's apple+ and apple- to do this. AFAIK this is also possible using gnome-terminal and possibly konqueror.
However, I am an rxvt-unicode user. Period. I'm not willing to switch my terminal, but I would like to be able to have the ability to quickly resize the font. Currently, to resize the font I have to do this:
- Detach tmux
- $EDITOR ~/.Xdefaults
- xrdb -all ~/.Xdefaults
- close terminal
- open a new terminal
- Reattach tmux
I'm thinking that it must be possible to script something that would reduce the above steps to one by perhaps binding to a keyboard shortcut, maybe with xbindkeys or something similar. Anyone have any thoughts on how this might best be accomplished?
Note: I'm using awesome window manager and prefer to keep things ultra-simple (i.e., no Gnome/KDE-specific solutions, please).
@Keith: I am familiar with the escape sequences and it's my fault for not saying so explicitly in my original question, but: I'm looking for a solution that will persist between sessions. Likely that will involve writing some code.
Best Answer
From the man page:
Depending on the shell you use you could assign those to keyboard shortcuts. In zsh you could define a shell function and use bindkey to bind it to an alt-key for example.