Adds a dependency array system to `recv_glib` which internally clones the passed deps and then passes by reference to the callback.
This cleans up a lot of the big `{}` blocks full of `widget.clone()` and removes a lot of boilerplate. Yay!
Adds a new Menu module which allows users to create XDG or custom menus that open after clicking on a button.
Resolves#534
Co-authored-by: Jake Stanger <mail@jstanger.dev>
Rewrites the desktop file parser code and image resolver code to introduce caching system and make fully async. They should be much faster now.
BREAKING CHANGE: The `icon_theme` setting has been moved from per-bar to top-level
Adds `orientation` and `justify` options to all modules and custom
widgets where it makes sense to do so.
Any modules without support document this. Widgets fully document the
options inline where present for now.
Resolves#296
This extends the existing `keys` module to be able to show the current keyboard layout, and cycle between layouts (using the `next` command) by clicking. The `keys` module has been renamed to `keyboard` to more accurately reflect its extended featureset.
* feat: add sway-mode module
* refactor: Avoid making multiple connections to SwayIPC
Now `sway::Client` is store in `ironbar.clients`, and allow dynamically
registering event listeners, instead of hardcoding events for Workspace
updates.
Remove the use of `swayipc::Connection` from `sway-mode` module, and
replace it with the new event listener system.
#671
This PR includes the necessary code changes, CI changes and documentation to generate and deploy a full JSON schema for each release and the master branch, which can be used within config files for autocomplete and type checking.
This allows for some options which are not actually bar-level to be separated, which makes some work moving forward a little easier and keeps things cleaner.
This is a major refactor which updates GTK, GLib and GTK Layer Shell to their latest versions.
GLib channels, previously used for receiving events on the GLib Main Context thread have been deprecated and a new method for running Futures on the main thread has been added instead. This commit also replaces all the deprecated code with this.
As part of the above, a bug was uncovered related to creating the GLib main context inside the Tokio runtime. Spawning of Tokio tasks has been refactored to fix this.
Adds two new bar-level options:
- `start_hidden`, which stops a bar from showing when Ironbar starts. It can then be hidden via IPC or auto-hide.
- `autohide`, which takes a delay after which the bar will be hidden when the cursor leaves. Hovering at the screen edge where the bar is located reveals the bar again.
Resolves#167
When no config file is found, the bar will now automatically instead load a hard-coded default consisting of the `focused` and `clock` modules, and a `label` informing you the bar is not configured. Instructions are also printed to the log.
BREAKING CHANGE: To allow for the `name` property, any widgets that were previously targeted by name should be targeted by class instead. This affects **all modules and all popups**, as well as several widgets inside modules. **This will break a lot of rules in your stylesheet**. To attempt to mitigate the damage, a migration script can be found [here](https://raw.githubusercontent.com/JakeStanger/ironbar/master/scripts/migrate-styles.sh) that should get you most of the way.
Resolves#75.