Martin Heidegger wrote about boredom in two texts available in English, in the 1929/30 semester lecture course The Fundamental Concepts of Metaphysics, and again in the essay What is Metaphysics? published in the same year. In the lecture, Heidegger included about 100 pages on boredom, probably the most extensive philosophical treatment ever of the subject. He focused on waiting at railway stations in particular as a major context of boredom. Søren Kierkegaard remarks in Either/Or that "patience cannot be depicted" visually, since there is a sense that any immediate moment of life may be fundamentally tedious.
The French loanword ennui comes from the very same Late Latin word that gave us annoy — inodiare ("to make loathsome"). We borrowed ennui several centuries after absorbing annoy into the language. Ennui deals more with boredom than irritation - and a somewhat specific sort of boredom at that. It generally refers to the feeling of jadedness that can result from living a life of too much ease. The poet Charles Lloyd described it well in his 1823 Stanzas to Ennui when he referred to that world-weary sensation as a "soul-destroying fiend" which visits with its "pale unrest / The chambers of the human breast / Where too much happiness hath fixed its home."