Using the Steam Controller with a game requires the Steam Overlay. The Steam Overlay won't work with the original Quake (DOS Quake or WinQuake). It may or may not work with GLQuake, especially the version of GLQuake that ships with Steam. I've done my best to make the controls setup of this configuration work with GLQuake, but that won't do you any good if the GLQuake program is unhappy with the Steam Overlay on your computer.
So before you do anything else with this setup, you should check to see whether the Steam Overlay works with the Quake engine (Quake-playing program) that you want to run.
If not, then you'll probably want to use a modern Quake engine rather than the ones that ship with Steam. There are also several other good reasons to use a modern Quake engine, including easy reconfiguration of video settings and support for a lot of community-created singleplayer content.
You can launch a modern Quake engine through Steam, if you drop its files into your Steam Quake folder, delete the existing "Winquake.exe" file, and make a copy of the modern Quake engine's executable renamed as "Winquake.exe". Then when you choose to launch "Quake" through Steam, it will run that modern Quake engine.
Similarly you could replace "Glquake.exe", to control what program Steam runs when you choose to launch "GLQuake".
For example if you want to use Quakespasm as your Quake engine, you could drop its files into your Steam Quake folder, delete the existing "Winquake.exe" or "Glquake.exe", and then make a copy of "quakespasm.exe" and rename that copy to replace the file you deleted.
Or if you're using the Quake Singleplayer Starter Pack, you can move all of its files into the Steam Quake folder, and use copies of the Quakespasm-Spiked executable to replace either or both of "Winquake.exe"/"Glquake.exe".
Whatever Quake engine you choose, make sure that when you launch it through Steam you get the little popup telling you that the Steam Community overlay is available.
If you don't want to mess with your Steam Quake folder, you can also have a Quake installation outside of Steam (again the Quake Singleplayer Starter Pack would be a way to do this) and then add the executable to Steam as a "non-Steam game". This adds a shortcut to that executable in your Steam library, so that you can still launch it through Steam and have the Steam Overlay.
You can use the community Steam Controller configurations for Quake for that non-Steam game, if you name the shortcut appropriately. Naming it "Quake" may work; if not, try naming it "2310" which is the Steam application ID for Quake.