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

84 commits

Author SHA1 Message Date
f929aef2d9
refactor: replace channel macros with ext trait methods 2025-05-18 15:22:58 +01:00
202c19efd4
refactor: update to rust 2024, fix strict clippy warnings 2025-03-03 21:28:29 +00:00
b83f26cb1a
feat(sysinfo): expose values as ironvars 2025-02-23 16:51:30 +00:00
1d29d61628
fix: exit 0 on ipc connection error
Will now return code 3

Fixes #868
2025-02-15 23:16:05 +00:00
BowDown097
c2beda852d refactor: ensure one copy of icon_overrides 2025-02-08 04:45:35 -08:00
ccfe73f6a7
feat: libinput keys module
Adds a new module which shows the status of toggle mod keys (capslock, num lock, scroll lock).

Resolves #700
2024-12-27 19:44:25 +00:00
Ridan Vandenbergh
42e25f5ef2
fix(ipc): support querying against duplicate bar names
It is possible/valid to define multiple bars by the same name by setting `name` on the top-level bar object, but not specifying monitors. This updates IPC to support this scenario.

Allow IPC to act on multiple bars by the same name (#777)
2024-11-16 20:48:12 +00:00
f1e87830ed
chore: tidy main 2024-11-08 01:40:25 +00:00
80403e3ca9
fix: not properly redrawing on style reload
Fixes #456
2024-11-05 13:06:23 +00:00
04f45ccae1
refactor: fix some pedantic clippy warnings 2024-08-14 21:26:40 +01:00
474e1fe364
fix(upower): avoid panic on client init error 2024-08-09 23:16:00 +01:00
9d125353c4
refactor: small tidy 2024-08-09 23:08:08 +01:00
45d5bf5feb
fix: popups not accounting for monitor scaling
Fixes #657
2024-08-09 22:56:30 +01:00
7413f78e04
feat(cli): debug flag 2024-06-01 17:01:14 +01:00
a0cb01ae5f
refactor: make Ironbar#unique_id must_use 2024-06-01 17:00:55 +01:00
36d724f148
feat(config): json schema support
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.
2024-05-31 22:01:50 +01:00
SerraPi
4ad4b0e070
fix(ipc): regression - reload not working due to #592
let index = match index {
        Some(index) => index - 1,
        None => {
            lock!(map).push(monitor_name.clone());
            lock!(map).len() - 1
        }
    };

//This causes index to underflow
//Expected Output is something like 0, 1, etc
//But sometimes we go back around to 18446744073709551615

//Removing the -1 here seems to work ok with multi monitor, and reload is not broken anymore
Some(index) => index,
2024-05-19 22:35:52 +01:00
520a94abfa
fix: all bars showing on same display due to GTK bug
This is a nasty hack, which will hopefully only be temporary.

See https://github.com/swaywm/sway/issues/8164 for details
2024-05-18 01:25:14 +01:00
b0a05b7cda
feat: new cairo module
Resolves #105

Co-authored-by: A-Cloud-Ninja <5809177+A-Cloud-Ninja@users.noreply.github.com>
2024-04-17 20:35:35 +01:00
1b35354272
refactor: fix clippy warnings 2024-04-01 16:33:38 +01:00
706e040e25
refactor: split bar/top-level config structs
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.
2024-03-29 21:54:04 +00:00
660dc81e7d
chore: refactors to volume pr #460 i forgot
whoops
2024-03-04 20:21:26 +00:00
aaef3bf96c
refactor: fix new strict clippy warnings 2024-02-01 22:39:43 +00:00
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