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

build: fix compilation for many feature combinations (#932)

* Fix compilation for many feature combinations

* fix: keep Mpris as the default music player type

* fix: update futures-lite comment

* fix: remove redundant "clap" feature dependency from "cli"

* fix: don't make IPC a dependency of sysinfo module

* refactor: move serde_json feature to "shared" section

* refactor: avoid cfgs inside listen_workspace_events

by splitting list_keyboards_events out of it, which manages its own
connection to the Hyprland IPC socket.

* refactor: sort multiline cfg any's

* Revert "refactor: avoid cfgs inside listen_workspace_events"

This reverts commit 1b4202ed80c9483c609ada8c4436e0fec26a9eef.

* refactor: split listen_workspace_events in more functions

* style: fix broken identation

Not sure why rustfmt didn't catch this.
This commit is contained in:
Rodrigo Batista de Moraes 2025-04-16 18:43:14 -03:00 committed by GitHub
parent 5744929931
commit cff6b1fc83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 363 additions and 265 deletions

View file

@ -6,10 +6,13 @@ use std::ops::Deref;
#[derive(Debug, Clone)]
#[cfg(any(
feature = "cairo",
feature = "clipboard",
feature = "clipboard",
feature = "keyboard",
feature = "launcher",
feature = "music",
feature = "workspaces"
feature = "workspaces",
))]
pub struct IconButton {
button: Button,
@ -17,10 +20,13 @@ pub struct IconButton {
}
#[cfg(any(
feature = "cairo",
feature = "clipboard",
feature = "clipboard",
feature = "keyboard",
feature = "launcher",
feature = "music",
feature = "workspaces"
feature = "workspaces",
))]
impl IconButton {
pub fn new(input: &str, icon_theme: &IconTheme, size: i32) -> Self {
@ -57,6 +63,15 @@ impl IconButton {
}
}
#[cfg(any(
feature = "clipboard",
feature = "keyboard",
feature = "music",
feature = "workspaces",
feature = "cairo",
feature = "clipboard",
feature = "launcher",
))]
impl Deref for IconButton {
type Target = Button;
@ -138,6 +153,7 @@ impl IconLabel {
}
}
#[cfg(any(feature = "keyboard", feature = "music", feature = "workspaces"))]
impl Deref for IconLabel {
type Target = gtk::Box;