Wiring new light switch
I see where you took the 2 blacks that had been on the same terminal of the old switch, and joined them with a wire nut.   Good instincts.  

Now, as you observed, the cables coming into the box had exactly the same color scheme- 1 black 1 white 1 bare.  That is how cables are made. The colors indicate nothing about the purpose/function of the wire, however white must be used for neutral if neutral is present.  So there's that.   If you want color coding by function, you must re-mark the wires e.g. With colored tape.  That is exactly what I want you to do.  

Take the remaining solo wire and mark it with red electrical tape.  I like red for switched-hot, and so does everyone else including your switch.   

As it happens, the blacks and whites are color coded correctly (black=always-hot). 

Now, they're color coded.  Match 'em up EXCEPT STOP.  DO NOT HOOK UP RED. 

Now, see if the switch will power up.  If it does, then shut off power again and hook up red; you're done.  



Now, we are all assuming the usual situation, where supply comes in on one cable, and always-on power is carried onward down another cable.   Given you have at least 5 lights here, it's possible that 2 strings of lights branch from the switch, and we have it all backwards.  In that case, the solo black is supply, and the two blacks together are to-the-lamp and ought to be red.  In that case, hooking the switch black to the solo black will make it power up.  Then mark the other two blacks red and onward!