O that
luw'  (loo)
a conditional particle; if;; by implication (interj. as a wish) would that! -- if (haply), peradventure, I pray thee, though, I would, would God (that).
thou hadst hearkened
qashab  (kaw-shab')
to prick up the ears, i.e. hearken -- attend, (cause to) hear(-ken), give heed, incline, mark (well), regard.
to my commandments
mitsvah  (mits-vaw')
a command, whether human or divine (collectively, the Law) -- (which was) commanded(-ment), law, ordinance, precept.
then had thy peace
shalowm  (shaw-lome')
safe, i.e. (figuratively) well, happy, friendly; also (abstractly) welfare, i.e. health, prosperity, peace
been as a river
nahar  (naw-hawr')
a stream (including the sea; expec. the Nile, Euphrates, etc.); figuratively, prosperity -- flood, river.
and thy righteousness
tsdaqah  (tsed-aw-kaw')
rightness (abstractly), subjectively (rectitude), objectively (justice), morally (virtue) or figuratively (prosperity) -- justice, moderately, right(-eous) (act, -ly, -ness).
as the waves
gal  (gal)
something rolled, i.e. a heap of stone or dung (plural ruins), by analogy, a spring of water (plural waves) -- billow, heap, spring, wave.
of the sea
yam  (yawm)
from an unused root meaning to roar -- sea (-faring man, (-shore), south, west (-ern, side, -ward).