 
            Attached is a patch file that updates Max's terminal.py and trunking.py in a few ways:
1. terminal.py reads the window size at startup and adjusts the curses settings accordingly. If you set xterm or equivalent to more rows (I'm using 38), you can handle sites with more than 20 frequencies without crashing. This is the patch I posted a week or so ago. (Max, I think your idea of making the main window two columns is still a good one, and the space that frees up could be used to display other interesting info. I don't think I'll have the time to learn how to implement that, though.)
2. terminal.py now displays an info line at the bottom of the screen showing the keyboard commands that are available. I also added a blank line or two to make the display look (IMHO) a bit cleaner.
3. If you set -v to 5 or higher, every frequency or talkgroup command is output on stderr (this will generate a lot of output on a busy system!). If you want to generate a list of every unique frequency used by the system, this will produce it from the stderr.2 file:
grep freq: stderr.2 | cut -d" " -f3 | sort | uniq
or to get all the unique talkgroups:
greg freq: stderr.2 | cut -d" " -f5 | sort | uniq
Max, this was actually a bit less trivial than first thought. The code is easy, but where to put it wasn't. Your suggestion about the end of update_state() led to only one update per second, and lost many freq/talkgroup set commands. I think I found a spot that doesn't miss any. Lots of output, but lets you build a comprehensive tgid list.
4. The stderr output of "set trunk_cc..." was not all that useful, so it's now set to appear only when the -v level is set to 6 or greater. (Behavior of -v 10 includes the above but is otherwise unchanged.)
5. I cleaned up all the logging/status/debug outputs in trunking.py to use "sys.stderr.write()" rather than "print". That will stop them from showing up in the terminal screen. While I was at it, I also added newlines to the end of all output and did some other cleanup.
Hope this is useful.
73, John
 
            I have added some terminal resizing code that allows resizing of the curses terminal along with error detection to prevent a long frequency list from crashing the application. It's not totally bulletproof (if you resize absurdly small it will crash) but it is more robust and flexible than before.
In addition, I have also added hotkeys to allow fine tuning to be changed dynamically as an aid when initially setting things up and dialing in the tuning. Keys "," and "." change the tuning by +/- 100Hz and "<" and ">" change it by +/- 1200Hz. The current fine tuning correction is shown in parentheses after the tuned frequency at the bottom of the screen.
All modifications were committed to my github repo. https://github.com/boatbod/op25

