Linux shell script enables custom tray icons with YAD

A recent Hackaday article explores a straightforward method for Linux users to create custom system tray icons using shell scripts and the YAD tool. The technique allows quick access to RSS feeds, such as the latest posts from Hackaday itself. By leveraging Freedesktop standards, the process works across various desktop environments like KDE and GNOME.

Published on January 6, 2026, the Hackaday piece titled "Linux Fu: Yet Another Shell Script Trick" highlights how Linux's Freedesktop standards simplify custom tray icon creation, avoiding compatibility issues between desktop environments such as KDE and GNOME.

The author admits to having too many tray icons but notes their utility for background tasks or quick service access. To build one, the tutorial employs YAD, described as "yet another dialog," a GTK-based program derived from Zenity. Despite potential minor issues on KDE, YAD serves as a versatile tool for dialogs, file selectors, and more.

The example script creates a tray icon that fetches and displays the latest Hackaday articles via RSS. When run without arguments, it sets up the icon using an image file named after the script with a ".icon.png" extension. A right-click menu offers an exit option, while clicking the icon triggers a dialog showing feed content.

Initial attempts to use YAD's WebKit for HTML rendering failed due to an outdated repository version, missing dependencies, and NVIDIA OpenGL errors. Instead, the script uses wget to grab the RSS feed and awk for parsing titles and URLs. Two dialog approaches are presented: a text-info dialog piping output with the --show-uri option for clickable links, or a standard dialog with Pango-formatted text for better visuals, including a yellow "Hackaday Today!" header.

The formatted version pipes awk output into a variable for cleaner command lines, resulting in underlined, clickable links that open in the default browser. Scripts are available on GitHub, and alternatives like Python or tray-minimizing tools such as AllTray are mentioned, though some may not support Wayland.

This method underscores Linux's flexibility for scripting practical desktop enhancements without complex programming.

Связанные статьи

Windows 11 desktop mockup showcasing the proposed PowerToys Command Palette Dock, a Linux-inspired customizable panel with system widgets.
Изображение, созданное ИИ

Microsoft proposes Linux-inspired dock for Windows PowerToys

Сообщено ИИ Изображение, созданное ИИ

Microsoft is exploring a new Command Palette Dock feature for its PowerToys utility, drawing inspiration from Linux desktops to add a customizable secondary panel to Windows. This optional UI element would allow users to pin widgets for quick access to system information and controls. The proposal aims to address user demands for more flexible desktop customization in Windows 11.

A tech enthusiast has shared how they fully automated their Linux desktop environment without ever opening the terminal. The process transformed everyday repetitive tasks into seamless, invisible workflows.

Сообщено ИИ

jdSystemMonitor is an open-source application that offers a comprehensive view of Linux system internals, going beyond standard monitoring tools. Developed by Jakob Dev, it combines essential resource tracking with unique features like Flatpak management and autostart entries. Available primarily as a Flatpak, it emphasizes portability and minimalism.

A recent article highlights several command-line and graphical tools that automate the installation and updating of software binaries from GitHub releases on Linux systems. These utilities address the limitations of traditional package managers by handling pre-compiled applications not yet available in official repositories. Published on December 23, 2025, the overview covers options for various distributions and user preferences.

Сообщено ИИ

System76 has released COSMIC 1.0.5, a point update to its Rust-based desktop environment first stabilized in December 2025 alongside Pop!_OS 24.04 LTS. New features include battery percentage display in the system tray, plus enhancements for Pop!_OS and other GNU/Linux distributions.

An article highlights five user-friendly terminal text editors that surpass nano in ease of use, featuring mouse navigation and familiar shortcuts. Published on January 31, 2026, the guide showcases options with intuitive interfaces for Linux users seeking efficiency without complexity. These tools emphasize accessibility while packing advanced functionalities.

Сообщено ИИ

How-To Geek has published a guide showcasing five Linux desktop environments that mimic the Windows interface for users seeking familiarity. The article emphasizes that Linux can adopt a Windows-like appearance without compromising its core features. It was released on December 28, 2025.

 

 

 

Этот сайт использует куки

Мы используем куки для анализа, чтобы улучшить наш сайт. Прочитайте нашу политику конфиденциальности для дополнительной информации.
Отклонить