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.
Finally, Ironbar will respond to events of monitors being (dis)connected, and will create bars when a monitor connects.
This means at last - resolves#291
yaay
This does away with `lazy_static` singletons for all the clients, instead putting them all inside a `Clients` struct on the `Ironbar` struct.
Client code has been refactored in places to accommodate this, and module code has been updated to get the clients the new way.
The Wayland client has been re-written from the ground up to remove a lot of the needless complications, provide a nicer interface and reduce some duplicate data.
The MPD music client has been overhauled to use the `mpd_utils` crate, which simplifies the code within Ironbar and should offer more robustness and better recovery when connection is lost to the server.
The launcher module in particular has been affected by the refactor.
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
This is a first pass towards trying to structure things a bit better, with data generally encapsulated under a single hierarchical tree, rather than lots of globals all over the place. Lots of work is still required.
The plan is that with this and some more work, #291 should become a lot easier to sort.
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.
Resolves#25.
Completely refactors the MPD module to be the 'music' module. This now supports both MPD and MPRIS with the same UI for both.
BREAKING CHANGE: The `mpd` module has been renamed to `music`. You will need to update the `type` value in your config and add `player_type` to continue using MPD. You will also need to update your styles.
Adds `on_click_middle`, `on_click_right`, `on_scroll_up`, `on_scroll_down`.
BREAKING CHANGE: `on_click` is now called `on_click_left` for consistency with new options.
Resolves#44.
* feat: more positioning options
Can now display the bar on the left/right, and avoid anchoring to edges to centre the bar.
BREAKING CHANGE: The `left` and `right` config options have been renamed to `start` and `end`
* refactor: major module restructuring
Modules now implement a "controller", which allows for separation of logic from UI code and enforces a tighter structure around how modules should be written. The introduction of this change required major refactoring or even rewriting of all modules.
This also better integrates the popup into modules, making it easier for data to be passed around without fetching the same thing twice
The refactor also improves some client code, switching from `ksway` to the much more stable `swayipc-async`. Partial multi-monitor for the tray module has been added.
BREAKING CHANGE: The `mpd` module config has changed, moving the icons to their own object.