Original: https://mods.factorio.com/mod/AutoSwitchTechs
Forked for 2.1, only changed settings:
Factorio Version 2.1
Changed paths to include -forked in the name.
Seems to work fine for me this way.
While apparently in 2.1 there is now a way to use circuitry to do this, from a quick glance that seems to be a much more involved process to set up than what this mod already achieves in a simple way.
Original Description:
"Moves techs around in your research queue whenever your labs are missing research packs for the first tech in the queue. Does not add or remove techs from the queue. Also prioritizes any tech with spoilable research packs, when your labs have those packs in stock.
The mod only runs if you turn on the shortcut button next to your quickbars - see picture above. There are settings to control how switching works. You can also turn on warnings, so the mod will tell you when nothing in the queue can be researched, or when the queue is empty.
Mod supports English, Pусский (благодаря dodther за перевод),
and has AI-generated translations for Deutsch, français, 日本語, 한국어, and 简体中文.
If you encounter bugs, make a post in the discussion tab. You can remove the mod from your game with no consequences.
Works with or without Space Age. Compatible with overhaul mods.
Why would you need this mod? You want to build enough Gleba science production so that you can research all the techs that use Gleba science, but you don't need to build so much Gleba science production that you can research with Gleba science ALL the time, since many techs don't need it. And you want to use the science when it becomes available, not wait until it's half-spoiled. This leaves you in an annoying position where the optimal strategy is to check on your labs and SPM every 5 minutes and manually move around techs in the queue."