Hi, Here's a very small patch against HEAD that provides window labels where window numbers are currently displayed. The patch consists of a labels command, tweaks to display functions to display label instead of number, and a change to WindowByName to let windows be selected by label or title.
This is most useful if you have more than 10 windows and want to switch to them with something better than C-a ' 10 <RET>. By default, the patch does nothing, but if you add something like this to your .screenrc: labels "0123456789qwertyuiosfghjzvbmQERTYUIOPDGHJKLZCVBM" bind q select q bind w select w ... bind M select M then you can switch to window 11 via "C-a w" for example. If there are more windows than labels, it simply displays the window number instead of the window label. Debug and info messages are not affected. I originally wrote this patch for screen-4.0.2 in 2007 and in that version I did go through all the info messages and change the sprintf("...%d...", p->w_number) calls to sprintf("...%s...", p->w_label) but I figured it was simpler to submit this patch without doing so. I only just got around to updating the patch for screen HEAD, but better late than never... Please let me know if there are any other changes I should make to the patch so it can be included. A couple of possible improvements that I could work on are: - Automatically update the bindkeys from the labels as long as the key isn't already bound - Update debug and info messages to display window label instead of number - Update window list to show label, number, and title Thanks, Janos
screen-labels.patch
Description: Binary data