Last Updated on May 25, 2022
Who loves eye candy? Don’t be shy — you can raise both hands!!
Linux Candy is a series of articles covering interesting eye candy software. We’re only featuring open-source software in this series.
If you spend all day embroiled in political in-fighting, fighting bureaucracy, coding a new program in Assembler, sit in countless meetings wishing you were relaxing on a Caribbean island, you’ll need some light relief at the end of the day. And what better way by making your desktop environment a bit more fun.
There’s lots of fun in the terminal. How about a classic iconic tile-matching puzzle video game? Step forward tetris, a terminal interface for Tetris with the main file coded in a mere 333 lines of Haskell.
Installation
As I’m running Arch, I installed tetris with the Arch User Repository. It pulled in a ton of other software though. Alternatively, it’s trivial to install from the project’s GitHub repository, with:
$ cd tetris
$ stack install tetris
You’ll need Stack installed to compile the source code. Stack is a cross-platform program for developing Haskell projects.
In Operation
Here’s an image of tetris in action.
When you start the game, you have the choice of skipping one or more of the levels. The graphics are colorful. There’s stats, level indicator, and a high score facility to boot. And it even sports Vi(m) navigation keys. What more could you want in such a tiny program?
There’s a few options available. You can turn off the preview cell which helps to increase the difficulty. You can also start at a specific level.
In the game, you can drop a block, pause the game, and restart the game if it’s going badly.
Summary
tetris is a faithful classic of the timeless classic video game. It’s a bit of light-hearted relief, offers some harmless fun, and brightens up my terminal at the same time.
tetris uses Unicode graphics, but if this cause a problem in your terminal, you can play the game using ASCII graphics only.
There’s no leaderboard, just a single highest score. Report that score with:
$ tetris --high-score
Website: www.doof.me.uk/xcowsay
Support:
Developer: Sam Tay
License: Open Source
tetris is written in Haskell. If you’re looking to improve your knowledge of this language, check out our recommended free Haskell books and free Haskell tutorials.
Complete list of articles in this series:
Linux Candy | |
---|---|
ASCIIQuarium | Embrace marine life from the terminal with beautiful ASCII art |
ASCII Art Converter | A small utility that converts images into ASCII art |
BobRossQuotes | Collection of quotes from Bob Ross |
Boxes | Command line ASCII boxes |
Buoh | Online strips comics reader |
cacafire | Color ASCII fire |
catclock | xclock with an enhanced cat mode |
cbonsai | Generate bonsai trees in the terminal |
christmasfetch | Festive cheer on the desktop |
chucknorris | Chuck Norris jokes in your terminal |
cornyjokes | Corny jokes for the terminal |
CMatrix | ncurses program that simulates the display from “The Matrix” |
ctree | A Christmas tree right on your terminal |
eDEX-UI | Sci-fi computer terminal emulator and system monitor |
emoj | Simple tool that to find suitable emojis for pasting to your clipboard |
Emote | Modern popup emoji picker |
Evolvotron | Interactive generative art |
Fantascene | Dynamic wallpaper changer |
Fondo | Find beautiful wallpapers from Unsplash |
gti | Typo-based curio inspired by Steam Locomotive |
Hollywood | Fill your console with Hollywood melodrama technobabble |
linuxwave | Generate music from the entropy of Linux |
lolcat | Rainbows and unicorns |
No More Secrets | Recreates the data decryption effect from the Sneakers movie |
nook | Plays Animal Crossing hourly themes on the hour |
nyancat | Terminal-based Pop Tart Cat Animation |
oneko | Animal chasing fun |
pipes.sh | Animated pipes terminal screensaver |
ponysay | cowsay reimplemention for ponies |
projectM | Music visualizer originally based on Milkdrop |
pscircle | A different take on the venerable ps command |
PyBonsai | Generates procedural ASCII art trees |
pyjokes | One line jokes for programmers |
Pywal | Generate color schemes on the fly |
Relaxator | Relax to soothing sounds |
Rusty Aquarium | Monitoring by visualization |
Steam Locomotive | C program written in 295 lines. It's harmless fun |
Ternimal | Animated lifeform in the terminal |
terminal-parrot | Party parrot time |
tetris | Tile-matching puzzle video game in your terminal |
Variety | Wallpaper manager with many desktops and wallpaper sources |
WallGen | Generate HQ poly wallpapers with a few arguments. |
WallpaperDownloader | Download, change, and manage wallpapers |
xcowsay | Displays a cow on your desktop with message |
XDecorations | Add some festive cheer to your desktop |
XScreenSaver | Framework and collection of screensavers |