Commit Graph

261 Commits

Author SHA1 Message Date
Jake Stanger
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
Jake Stanger
b2a37a32b0 refactor: fix clippy warning 2023-12-31 00:50:41 +00:00
Jake Stanger
967801dc32 refactor(workspaces): avoid sending unknown update info 2023-12-31 00:50:41 +00:00
Jake Stanger
c356b22401 fix(workspaces): favourites missing inactive class on startup
Fixes #390
2023-12-30 23:30:03 +00:00
Jake Stanger
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
Jake Stanger
e847a84c21 refactor: fix casting based clippy warnings 2023-12-18 22:09:21 +00:00
Jake Stanger
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
Jake Stanger
ed5a16237d refactor: update wayland crates to latest versions 2023-12-11 22:01:50 +00:00
Jake Stanger
9a7ee6babc Merge pull request #372 from JakeStanger/feat/auto-hide
feat: bar auto-hide options
2023-12-11 21:37:55 +00:00
Jake Stanger
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
Jake Stanger
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
Jake Stanger
56f423e408 Merge pull request #371 from JakeStanger/refactor/encapsulate
refactor: begin restructuring core code to better encapsulate
2023-12-09 21:37:08 +00:00
Jake Stanger
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
Chris Maniewski
5f82b6e9e0 fix(tray): existing icons rendering as text 2023-12-02 22:26:15 +01:00
Jake Stanger
34ed6a9e11 fix(focused): not clearing when switching to empty workspace 2023-10-19 22:43:18 +01:00
Jake Stanger
08e354e019 refactor: fix new clippy warnings 2023-10-19 21:12:19 +01:00
Jake Stanger
f24b21d242 fix(focused): clear when no window is focused
Fixes #337
2023-10-19 20:34:18 +01:00
Jake Stanger
5582dcf373 refactor: fix new clippy warning 2023-10-17 20:22:19 +01:00
Jake Stanger
40998475e2 fix(styles): hot reload not working when edited with vim
Possibly resolves the same issue with other editors or scripts.

Fixes #304
2023-10-17 20:22:02 +01:00
Jake Stanger
4e67b73a83 refactor(wlr data control): update to new nix epoll bindings 2023-09-05 22:43:29 +01:00
Jake Stanger
60bb69feec feat: add widget and widget-container css classes on all widgets 2023-09-05 22:37:58 +01:00
Alice Janik
25c490b8b4 feat(workspaces): visible CSS selector 2023-08-25 20:50:51 -05:00
Jake Stanger
fea1f18524 refactor: fix new clippy warnings, fmt 2023-08-25 22:55:12 +01:00
Jake Stanger
1b476eb9f9 chore(wayland): downgrade some logs from debug to trace 2023-08-16 20:27:24 +01:00
yavko
9f65cf293d feat(workspaces): add favorites and hidden options 2023-08-15 20:09:32 +01:00
Jake Stanger
8ec0237bc5 amend 54f0f232 2023-08-13 20:38:49 +01:00
Jake Stanger
9e2ac0f43d Merge pull request #272 from JakeStanger/build/stray
build: replace `stray` with `system-tray` fork
2023-08-13 15:25:30 +01:00
Jake Stanger
b6e4ed6608 build: replace stray with system-tray fork
Fully resolves #166
2023-08-13 15:11:29 +01:00
Jake Stanger
54f0f232f2 fix(launcher): popup not closing when hover leaves widget
Fixes #224
2023-08-13 15:07:31 +01:00
Jake Stanger
9fe6d49195 build: update to latest hyprland-rs
Resolves #269
2023-08-11 21:15:45 +01:00
Jake Stanger
901a86caa4 fix(custom): crash when clicking non-popup button 2023-08-01 21:29:00 +01:00
Jake Stanger
2902331af0 fix(dynamic string): incorrectly handling strings containing multipoint utf-8 chars 2023-07-30 23:30:24 +01:00
Jake Stanger
89ec06fc7b fix(music): hide album art widget when no image 2023-07-26 22:03:27 +01:00
Jake Stanger
7f6fef6338 fix(image): matching desktop file names too eagerly
Fixes #228
2023-07-26 22:03:27 +01:00
Jake Stanger
36f3db7411 refactor(image): do not try to read desktop files where definitely not necessary 2023-07-26 22:03:27 +01:00
Jake Stanger
2367faab04 fix(image): using fallback in places it shouldn't 2023-07-26 21:49:45 +01:00
Jake Stanger
ef443e6978 feat(image resolver): add fallback image
Puts a cap on the recursion, and falls back to a question mark image from the icon theme if no image could be resolved.

Fixes #250
2023-07-24 21:04:41 +01:00
Jake Stanger
6f57ad47ac fix(launcher): not setting focus state when opening favourite
Fixes partially #225.
2023-07-16 20:41:53 +01:00
Jake Stanger
87dd7646fc fix(launcher): not clearing focused state when closing window
Fixes #213.
Fixes partially #225.
2023-07-16 20:24:23 +01:00
Jake Stanger
06251e293e refactor: fix new pedantic clippy warnings 2023-07-16 20:17:32 +01:00
Jake Stanger
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
Jake Stanger
c582bc3390 fix(cli): set-visible command causing panic 2023-07-16 18:47:44 +01:00
A-Cloud-Ninja
2ccb2633c6 feat: IPC for get_visible, set_visible, new bar name config option 2023-07-16 18:21:44 +01:00
Jake Stanger
eee2182ab9 fix(ipc): command/response casing 2023-07-09 19:59:17 +01:00
Jake Stanger
4ca17d1337 fix(launcher): incorrectly resolving some applications
Potentially also fixes some mismatches with icons.

Fixes #222.
2023-07-05 23:32:56 +01:00
Jake Stanger
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
Jake Stanger
1a272e00fb fix(label): not using markup 2023-07-04 17:38:08 +01:00
Jake Stanger
f8d8c06300 Merge pull request #210 from christoph00/XDG_DATA_DIRS
Find Additional Applications dirs in XDG_DATA_DIR
2023-07-04 12:53:22 +01:00
Christoph Asche
c711dd8585 fix: failing to resolve icons with home_manager 2023-07-04 01:53:17 +02:00
Jake Stanger
b310ea7636 feat(clock): localization support 2023-07-03 23:20:37 +01:00