1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-20 11:54:23 +02:00
Commit graph

57 commits

Author SHA1 Message Date
b004d5007c
fix(launcher): favourites not focused when opened
Fixes #225
2024-01-13 17:15:19 +00:00
c702f6fffa
refactor: major client code changes
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.
2024-01-09 23:33:07 +00:00
57b57ed002
refactor: pass context into modules controllers
This paves the way to keep things tidier for the next refactors.
2024-01-07 23:42:34 +00:00
b4d75450ac
fix(regression): GTK refactor causing updates to be missed
Regression introduced by recent GTK refactor.

The `glib_recv` macros  previously using the passed in expression as the receiver, which was causing a new receiver to be created *every* time an event was received. This caused some peculiar behaviours where some events just never got through if sent too close to each other.

This was most obvious in the `workspaces` module.

Fixes #381
2023-12-31 15:56:41 +00:00
e847a84c21
refactor: fix casting based clippy warnings 2023-12-18 22:09:21 +00:00
bea442ed96
refactor: update gtk/glib, remove glib channels
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.
2023-12-18 22:09:21 +00:00
8ec0237bc5
amend 54f0f232 2023-08-13 20:38:49 +01:00
54f0f232f2
fix(launcher): popup not closing when hover leaves widget
Fixes #224
2023-08-13 15:07:31 +01:00
2367faab04
fix(image): using fallback in places it shouldn't 2023-07-26 21:49:45 +01:00
6f57ad47ac
fix(launcher): not setting focus state when opening favourite
Fixes partially #225.
2023-07-16 20:41:53 +01:00
87dd7646fc
fix(launcher): not clearing focused state when closing window
Fixes #213.
Fixes partially #225.
2023-07-16 20:24:23 +01:00
b7ee794bfc
feat(ipc): commands for opening/closing popups
Also includes some refactoring around related GTK helper code
2023-07-16 19:15:55 +01:00
7016f7f79e
refactor: use new smart pointer macros throughout codebase 2023-06-29 23:16:31 +01:00
cc181a8b6d
refactor: fix new clippy warnings 2023-06-29 16:57:47 +01:00
27f920d012
feat(launcher): slightly improve focus logic when clicking item with multiple windows 2023-06-29 16:42:03 +01:00
d121dc3d1e
refactor: fix unused var warning 2023-06-22 23:21:02 +01:00
103a224355
fix(launcher): crash when focusing newly opened window in popup
Attempting to focus a newly opened window from the launcher popup attempted to close the popup directly in an invalid manner, which caused the bar to hard crash. The controller already handles this correctly, so removed this code.

Resolves #41 🎉
2023-06-18 16:21:35 +01:00
87ca399220 fix: poor error handling for missing images
Previously images that could not be located were handled by throwing a
full report error, which incorrectly stated it was an invalid image
*type*.

This changes the image handling to instead log a single-line warning
directly in the image provider code, reducing the error handling
required by each consumer.

Resolves #146.
2023-05-20 14:38:39 +01:00
dea66415c2
feat: module-level name and class options
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.
2023-05-06 13:22:35 +01:00
735f5cc9f1
fix(launcher): crash when focusing window
Fixes #41 🎉
2023-05-04 20:07:46 +01:00
7f46cb4976
refactor(wayland): update to 0.30.0
This is pretty much a rewrite of the Wayland client code for `wayland-client` and `wayland-protocols` v0.30.0, and `smithay-client-toolkit` v0.17.0
2023-05-04 20:07:42 +01:00
2da28b9bf5
feat: ability to configure image icon sizes
Adds `icon_size` option to following widgets:

- `clipboard`
- `launcher`
- `music`
- `workspaces`

Also adds `cover_image_size` option to `music`.
2023-04-22 22:22:49 +01:00
dfe1964abf
feat(custom): slider widget
Resolves partially #68.
2023-04-10 00:17:09 +01:00
6221f7454a
refactor: fix new clippy warnings 2023-03-19 16:22:40 +00:00
d84139a914
refactor: general tidy up
fix clippy warnings from latest stable rust
2023-02-25 14:26:02 +00:00
c347b6c944
feat: add feature flags
Flags allow you to disable certain functionality and compile with only select features to reduce build time.

Resolves #54.
2023-02-01 20:45:52 +00:00
b054c17d14
feat(workspaces): support for using images in name_map 2023-01-30 11:51:01 +00:00
3cf9be89fd
feat: global icon theme setting
BREAKING CHANGE: This removes the `icon_theme` option from `launcher` and `focused`. You will need to set this at the top of your config instead.
2023-01-30 11:51:01 +00:00
15f0857859
refactor: replace icon loading with improved general image loading 2023-01-29 17:46:02 +00:00
ea2c84d1bd
refactor: general code tidy-up 2022-12-11 23:17:15 +00:00
5e21cbcca6
refactor: macros to reduce repeated code 2022-12-11 22:45:52 +00:00
9d5049dde0
refactor: standardise error messages 2022-12-11 21:31:45 +00:00
2c1b2924d4
refactor: move most of the horrible add_module macro content into proper functions 2022-12-04 23:23:22 +00:00
c9e66d4664
feat: common module options (show_if, on_click, tooltip)
The first three of many options that are common to all modules.

Resolves #36. Resolves partially #34.
2022-11-28 22:09:18 +00:00
4662f60ac5
refactor: move various clients to own folder 2022-11-06 23:38:51 +00:00
ff17ec1996
refactor: various changes based on rust 1.65 clippy 2022-11-06 22:53:48 +00:00
ad77dc4e4c
feat: improved logging & error handling 2022-11-05 17:32:29 +00:00
3a83bd31ab
fix: able to insert duplicate keys into collection
This replaces the custom `Collection` implementation with `IndexMap` from the crate of the same name.

Fixes #28.
2022-11-05 17:32:01 +00:00
b7b64886e3
fix: sometimes panicking on startup 2022-10-15 18:01:09 +01:00
06cfad62e2
feat: more positioning options (#23)
* 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`
2022-10-15 16:27:25 +01:00
1dd0a9e52f
feat(launcher): add popup css selectors 2022-10-14 23:49:11 +01:00
5523e9af46
fix(popup): often opening in wrong place
Fixes #16.
2022-10-14 23:48:28 +01:00
5ce50b0987
refactor: tidy and format 2022-10-10 21:59:44 +01:00
b1c66b9117
feat: wlroots-agnostic support for launcher module 2022-10-10 20:15:24 +01:00
720ba7bfb0
Major module refactor (#19)
* 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.
2022-09-25 22:49:00 +01:00
64650fbf3a
Merge pull request #14 from JakeStanger/fix/launcher-state
Fix launcher state issues
2022-09-06 21:56:21 +01:00
a35d25520c
fix(launcher): item state changes not handled correctly
This completely rewrites the item open state handling code (again) in a more logical way that should prevent incorrect states, and removes some locking issues.
2022-09-06 21:46:02 +01:00
78e30b39fe docs: add some rustdoc comments throughout 2022-08-28 16:57:41 +01:00
b81927e3a5
fix(launcher): opening new instances when focused/urgent 2022-08-25 22:08:08 +01:00
6dcae66570
fix: avoid creating loads of sway/mpd clients 2022-08-25 21:53:42 +01:00