select active sun (daylight system)

hello everyone!

I am trying to write a simple script that will select the active Daylight System Sun and switch to max motion mode to let me quickly adjust time and date for the active sun.
Often working with archviz I have more than one sun in a scene. Sometimes different sun for each camera. The way I switch between them is to uncheck 'active' for all except one relevant for a particular camera. Would be great to have a script connected to a hotkey that when pressed would select the active sun.

So far I came up with this:

(
csun = ($Sun001)
if csun.on == true then
		(
			select csun
			max motion mode
		)
)

but I have no ide a how to change $Sun001 to something more universal.

I would be thankful for any hints.
best,
alex