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

61 commits

Author SHA1 Message Date
8371a92204
feat: load bars on monitor when it connects
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
2024-01-13 17:20:09 +00:00
6f531a5654
refactor: remove lazy_static and async_once 2024-01-09 23:33:07 +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
80de5dd824
fix: some modules crashing due to recent gtk refactor
Fixes a crash introduced by commit bea442e where the `await_sync` function incorrectly tried to use the current tokio runtime, which it is often outside, instead of the singleton.

Fixes #382
2023-12-24 13:44:38 +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
9a7ee6babc
Merge pull request #372 from JakeStanger/feat/auto-hide
feat: bar auto-hide options
2023-12-11 21:37:55 +00:00
659c93dd2a
feat: use top-level config as fallback when using monitor-based config
This allows you to configure a default bar to use, then override specific monitors.

Not setting anything at the top level will hide bars which are not explicitly configured.

This actually came about as a bug in the recent refactorings, but now it's a feature :)
2023-12-10 23:12:21 +00:00
ee04cd025a
feat: bar auto-hide options
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
2023-12-10 22:56:43 +00:00
b2fa19ab6c
refactor: begin restructuring core code to better encapsulate
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.
2023-12-08 22:39:27 +00:00
fea1f18524
refactor: fix new clippy warnings, fmt 2023-08-25 22:55:12 +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
738b9e3da7
feat(config): use default fallback with config instructions
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.
2023-07-04 17:38:39 +01:00
7d3bb02b46
feat(ipc): reload config command 2023-07-01 00:05:12 +01:00
6db7742e06
fix: crash on startup introduced by recent refactors 2023-06-29 18:02:51 +01:00
9a68dc99bd
build: fix error 2023-06-29 17:37:10 +01:00
cc181a8b6d
refactor: fix new clippy warnings 2023-06-29 16:57:47 +01:00
ded50cca6f
feat: support for 'ironvar' dynamic variables 2023-06-29 16:26:54 +01:00
f5bdc5a027
feat: ipc server and cli 2023-06-29 16:19:19 +01:00
a5ecb363fd
fix: popups occasionally getting jumbled with multiple bars 2023-05-29 14:01:42 +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
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
14b6c1a69f
fix: bars duplicate when starting second instance
This ensures that starting `ironbar` while an instance already running causes the 2nd instance to cleanly exit, and avoids launching the init code a second time.
2023-04-30 19:43:58 +01:00
e63509a3a7
refactor: fix a few new clippy warnings 2023-04-22 13:45:44 +01:00
07df51c249
docs: include readme in rust docs 2023-04-21 23:50:49 +01:00
ecdd71a43d
refactor(config): use universal-config crate.
XML config is not supported.
2023-03-19 16:22:40 +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
fd2d7e5c7a
refactor: move startup logging code to logging module 2022-12-11 21:31:23 +00:00
2c1b2924d4
refactor: move most of the horrible add_module macro content into proper functions 2022-12-04 23:23:22 +00:00
862c46c7ec
style: run rustfmt
d'oh
2022-11-30 22:49:49 +00:00
64f54040ef
refactor: move dynamic_label.rs to dynamic_string.rs and fix failing test 2022-11-30 22:40:53 +00:00
5d153a02fc
feat(custom): ability to embed scripts in labels for dynamic content
Fully resolves #34.
2022-11-28 22:30:31 +00:00
4662f60ac5
refactor: move various clients to own folder 2022-11-06 23:38:51 +00:00
bc625b929b
refactor: clippy & fmt 2022-11-05 17:32:42 +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
b7792a415e
feat: env var to set custom css location
Set `IRONBAR_CSS` to load CSS from that path instead of regular path.
2022-11-01 13:25:46 +00:00
a93700e8fd
Merge pull request #27 from JakeStanger/feat/custom-widget
feat: new custom module
2022-10-23 17:11:17 +01:00
3750124d8c
feat: new custom module
Allows basic modules to be created from a config object, including popup content.
2022-10-23 17:01:35 +01:00
cbd0c49e25
fix: css watcher not working 2022-10-16 22:21:51 +01:00
27f6abad67
chore: format and fix clippy warnings 2022-10-16 13:54:48 +01:00
70e1b526a9
fix(logging): file log not capturing panics 2022-10-16 13:42:35 +01:00
3c43c20c6a
fix: weird behaviour when config does not exist 2022-10-16 12:58:11 +01:00
b66bd788b2
fix: logging for creating bar incorrect still 2022-10-16 12:57:37 +01:00
bd5bdf5af5
fix: logging for creating bar incorrect 2022-10-15 15:36:23 +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
324f00cdf9
feat: wlroots-agnostic support for focused module 2022-10-04 23:26:07 +01:00
b188bc7146
feat: initial support for running outside sway
Progress is being tracked in #18. Currently the workspaces, focused and launcher modules are not supported.
2022-09-27 20:24:16 +01:00