Blog

Create Customized Tray Icons on Linux Using Shell Script

January 6, 2026
warHial Published by Redacția warHial 4 months ago

Tray Icons: A Simple Solution for Linux

I admit, I have too many icons in my tray. These are located on the taskbar, with some serving hidden roles or providing quick access to services. Creating a customized icon on Linux is not as complicated as it seems, thanks to the standards set by Freedesktop, which allow for easy compatibility between different desktop environments like KDE and GNOME.

In this article, we will focus on using the YAD (Yet Another Dialog) program, an extension of Zenity, which becomes a fundamental tool for creating customized scripts. YAD can generate dialogs, file selections, and even simple web browsers. However, the most interesting use is the quick creation of tray icons, which offer an advantage over other applications.

YAD's usage is versatile, having the capability to read information from the command line, files, or standard input. Additionally, there are numerous options, which can be confusing for users. The guide provided by Ingemar Karlsson is a valuable resource for navigating through these options.

For example, I created a script that sets a tray icon displaying the latest articles from Hackaday through an RSS feed. Using the YAD command to create a notification, I specified an image, text, and a context menu for right-click actions. Thus, the script displays the articles and makes them clickable, enhancing accessibility.

The created script allows for the management of the tray icon, and the two main functions—displaying articles and user interaction—are implemented efficiently. However, I did encounter challenges with output formatting. Ultimately, the choice between a standard dialog and a text-info dialog can significantly influence the final appearance of the application.

This guide demonstrates how useful and straightforward it can be to create customized applications on Linux using a simple script. Besides YAD, there are alternatives that can manage the minimization of other programs in the tray, but our approach ensures increased flexibility.

Leave a comment