When checking frontend tasks, I always struggle with getting random content to get to the edge cases. Yes, there are some generators online, but it requires me to get to some website which isn’t very efficient. But a few days ago I realized that (at least on Linux) dictionaries that you use are installed on the system for things like spellcheck and whatnot. It didn’t take me long to find them, and as it turned out, those are just huge text files with one word per line.

So I wrote a script to leverage that and then bound it to a key combo:

bindsym $mod+F5 exec rofi -dmenu -p "How many random words you want?" | xargs "$scripts_dir/random-words.sh" | xclip -selection clipboard

so I can choose how many words I want and automatically copy it to my clipboard.

Tags: english technical programming shell bash i3wm

Posted on: 2021-08-07, last edited on: 2021-08-08, written by: Kavelach