Nanoscale modulation of friction and triboelectrification with application to electrohydrodynamic nanolithography