Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add module interactivity + popups #18

Merged
merged 23 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,308 changes: 2,096 additions & 212 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ hyprland = { git = "https://github.com/hyprland-community/hyprland-rs", branch =
iced = { git = "https://github.com/Faervan/iced_pop-os.git", branch = "master", features = [
"tokio",
"wayland",
"winit"
"winit",
"image"
] }
notify = "7.0.0"
system-tray = "0.5.0"
Expand All @@ -30,6 +31,8 @@ wayfire-rs = "0.2.2"
serde_json = "1.0.135"
niri-ipc = "=0.1.10"
handlebars = "6.3.0"
serde = { version = "1.0.217", features = ["derive"] }
reqwest = "0.12.12"

[profile.dev.package."*"]
opt-level = 3
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

A simple status bar, written using [iced-rs](https://github.com/iced-rs/iced/) (specifically the [pop-os fork](https://github.com/pop-os/iced/) of iced, which supports the [wlr layer shell protocol](https://wayland.app/protocols/wlr-layer-shell-unstable-v1))

![2024-12-29_17-16](https://github.com/user-attachments/assets/199452ec-b5bc-4ac3-ac35-ef7aed732c2f)
![image](https://github.com/user-attachments/assets/c62d8399-0f80-4c3b-8cb8-a325db13fc32)

![image](https://github.com/user-attachments/assets/1a2de7fe-ffa4-4cde-9ccd-2c6c74e579b6)
![image](https://github.com/user-attachments/assets/d71b0fc2-a9fb-43e9-b358-9b1f2cb3d487)

![image](https://github.com/user-attachments/assets/52f343cd-5397-4165-8189-9727627c816f)
![image](https://github.com/user-attachments/assets/d0073653-01ed-4084-9c33-0d161cd98ec7)



Expand All @@ -23,6 +23,7 @@ For a list of all currently supported modules, see [the Wiki](https://github.com
- [x] very basic style customization
- [x] basic vertical bar support
- [x] a base set of useful modules
- [x] Module interactivity (popups, buttons)
- [x] hyprland workspace + window modules
- [x] wayfire workspace + window modules
- [x] niri workspace + window modules
Expand All @@ -33,7 +34,6 @@ For a list of all currently supported modules, see [the Wiki](https://github.com
- [ ] plugin api (for custom rust modules)
- [ ] custom fonts
- [ ] X11 support
- [ ] Module interactivity (tooltips, popups, buttons)
- ...

## Installation
Expand Down
3 changes: 2 additions & 1 deletion crates/bar-rs_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ pub fn derive_builder(input: TokenStream) -> TokenStream {
_ => None,
}
.unwrap_or_else(|| quote! {#ident::default()});
let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl();
quote! {
impl crate::registry::Builder for #ident {
impl #impl_generics crate::registry::Builder for #ident #ty_generics #where_clause {
type Output = Self;
fn build() -> Self::Output {
#default
Expand Down
3 changes: 2 additions & 1 deletion default_config/vertical.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hot_reloading = true

[style]
padding = 20 5
width = 50
width = 65

[modules]
left = time, date
Expand All @@ -29,3 +29,4 @@ active_background = rgba(255, 255, 255, 0.5)
[module:niri.workspaces]
icon_size = 24
active_size = 24
icon_margin = 0 0 0 20
Loading
Loading