This is a quick script I knocked up which monitors how much time you spend in each window in irssi.
Originally I planned to have it move your windows around for you so they were sorted by how much you used them, but I never got that working.
Instead, it’ll just output a list of windows in the order it thinks you should have them, and then you can manually rearrange things with /window move.
Please note I didn’t originally intend to release this script (certainly not in its current state) so it’s a bit messy! There are a couple of caveats, so please read all of the stuff below.
To use, pop it in your .irssi/scripts/ directory and /script load windowsort. It will immediately start tracking your window usage. You can /set windowsort_max_time to an integer to say how many seconds maximum a window can get in one go. It defaults to 300 (5 minutes) so when you leave your client idle for 10 hours, the window you’re on only gets 5 minutes of credit.
Once you’ve accumulated a reasonable amount of data (say, a day’s worth), run /windowtidy to receive a horribly formatted list of how your windows should be arranged. It’s then up to you to use /window goto N and /window move N to rearrange them as you wish. Once you’ve moved windows around you MUST reload the script. This also includes closing windows manually, as the script tracks usage by window number not name or contents!
Told you it wasn’t finished yet ;)
This script goes well with windowtidy, which closes windows with no items in. Run that first, and then let windowsort accumulate some data.
Here’s the script; download and gunzip it: windowsort for irssi
