Text this: Arithmetic of generalized Dedekind sums and their modularity