How aunetx/blur-my-shell works
This project is a GNOME Shell extension that “blurs” various parts of the GNOME Shell interface, including the panel, dash, overview, lockscreen, and even elements of other extensions. In other words, it injects custom visual effects into the GNOME Shell by processing static images or dynamic content through a configurable pipeline of blur effects and related visual modifications.
Main Components
• Extension Core – The entry point is located in “src/extension.js” which initializes the extension and ties together the various modules.
• UI Components – Under “src/components” you have JavaScript files for areas such as “appfolders.js”, “applications.js”, “dash_to_dock.js”, “overview.js”, “panel.js”, etc. These files represent the different regions of the GNOME Shell that the extension enhances.
• Effects Engine – In “src/effects”, you have GLSL (shader) files alongside their corresponding JavaScript wrappers (e.g., gaussian_blur, Monte Carlo blur, pixelize). This is where the image processing is implemented, forming the “pipeline” through which the blur effects are applied.
• Preferences & Pipeline Configuration – The “src/preferences” folder contains the UI logic for configuring how the effects are applied such as toggling between static and dynamic blur, managing the list of effects (pipelines) and additional visual settings.
• Common Utilities – The “src/conveniences” subdirectory provides helper modules for settings handling, pipeline management, and other essential utilities used throughout the extension.
• DBus Integration – Under “src/dbus” there are modules (client, services, and an iface.xml) which indicate that the extension exposes or consumes DBus services to interact with other components of the GNOME environment.
• Localization – The “po” directory contains a multitude of translation files (in various languages) that tie into the internationalization of the extension.
• Build & Documentation – Files like the Makefile, README.md, and metadata.json tie everything together, instructing on build, installation, and usage.
Relationships and Interactions
• The Core (extension.js) is the orchestrator that loads UI components, initializes the effects pipeline, and connects the preferences.
• Each UI component (from “src/components”) leverages the effects engine modules (from “src/effects”) and the utilities (from “src/conveniences”) to apply either static or dynamic blur effects.
• The preferences modules in “src/preferences” provide a user interface for tweaking these pipelines and effects. They interact with the core logic to update settings which in turn affect the UI components.
• The DBus module in “src/dbus” is responsible for handling or broadcasting messages between the extension and GNOME Shell services (or for integration with other extensions, as indicated by compatibility considerations with “Dash to Dock”, “Dash to Panel”, etc.).
• The settings, as defined in the GSettings schemas, are read and written by both the utilities and preferences, and may be used to modulate the effects dynamically on the GNOME Shell.
Architectural Patterns and Key Design Principles
• Modularity – The code is organized into clear modules (UI, effects, preferences, DBus, utilities) which simplifies testing and future maintenance.
• Separation of Concerns – The pipeline for image processing is decoupled from the UI components and settings management, enhancing flexibility.
• Extensibility – Inherent to the design is the ability to add or refine effects pipelines; new effects can be introduced without modifying the core logic.
• Localization Support – Full internationalization is provided through the “po” translations.
• Integration with External Components – The extension is designed to work harmoniously with other GNOME Shell extensions by interfacing with common GNOME Shell APIs and DBus services.
Final Recommendations for the Principal Software Engineer
• Because this is a GNOME Shell extension, indicate its integration point with GNOME Shell and any interoperability with other extensions as mentioned in the README.