Wall mount Rotary Dimmer installed on lamp cord?
Installing a wall-type dimmer in a portable electrical box (with the proper hardware and accessories) is a common project. People typically take a 6ft (2m) mains power extension cord, chop it in half and wire the "input" and "output" halves into the box.

There is even a commercial product nearily identical to this: A "router speed control" available at retail places like Harbor Freight, et.al.

NOTE HOWEVER:


Since this involves power mains wiring, it should be done only by someone with experience or expert help executing PROPER methods of maintaining safety for the users of the gadget. There is very significant possibility of creating something lethal if wired improperly.
Using a touch-control "downstream" AFTER a dimmer like this is NOT RECOMMENDED because of significant potential for interaction and improper operation between the dimmer and the touch-sensitive circuit.