MaxVerevkin / i3bar-river

A port of i3bar for wlroots-based compositors
GNU General Public License v3.0
39 stars 5 forks source link

Add support for Hyprland #4

Closed user451421541757324 closed 1 year ago

user451421541757324 commented 1 year ago

Hi, I'm trying i3bar-river on Hyprland (with i3status-rust) and it works almost perfectly.

The only thing that doesn't work is the workspace numbers, which don't appear at all. Could you support Hyprland too?

MaxVerevkin commented 1 year ago

AFAIK, Hyprland advertises it's workspace info via ext-workspace-unstable-v1, a protocol extension which uses wayland-protocols naming scheme but is not yet part of wayland-protocols (there is an open PR to upstream it, under a different name), which is usually discouraged.

I'm not against supporting it, but it will probably be behind a feature flag. Would you like to try implementing it? If not I'll look into it a bit later.

user451421541757324 commented 1 year ago

Would you like to try implementing it?

I'm really sorry, but I don't know Rust and not even Wayland protocols. I'm just a "normal user".

MaxVerevkin commented 1 year ago

@user451421541757324 I'm not very familiar with hyprland, so... Do you use multiple monitors? If so, do you expert to se the exact same set of workspaces on each display's bar? I think it would make sense for each bar to display only it's subset of workspaces, but it looks like hyprland does not share this information (even though protocol provides a way to do so).

user451421541757324 commented 1 year ago

Do you use multiple monitors?

Yes, I have a LG and a Samsung. This is the monitor config that I used on Sway (the Hyprland one still not works as I wish):

output DP-1 scale 2
output DP-1 adaptive_sync on
output DP-1 max_render_time 10

output HDMI-A-1 disable

# Bind a workspace to a display
workspace 1 output DP-1
workspace 9 output HDMI-A-1
workspace 10 output HDMI-A-1

# Toggle primary and secondary displays
bindsym $mod+l output DP-1 toggle
bindsym $mod+p output HDMI-A-1 toggle

When both are turned on, swaybar shows:

Maybe this project can help you, it supports Hyprland. There is also Waybar that can be patched to work with Hyprland, but for some reason I'm not able to compile it (it crashes).

MaxVerevkin commented 1 year ago

Ah, okay, I understand.

but it looks like hyprland does not share this information

It does, but I couldn't make it to work because of a bug in hypland: https://github.com/hyprwm/Hyprland/issues/1466. Working around this bug is a bit awkward, so I'll wait for it to be fixed first.

MaxVerevkin commented 1 year ago

I'm trying i3bar-river on Hyprland (with i3status-rust)

@user451421541757324 are you affected by https://github.com/hyprwm/Hyprland/issues/1485?

user451421541757324 commented 1 year ago

@user451421541757324 are you affected by hyprwm/Hyprland#1485?

I'm not:

I'll compile i3bar-river with recent commits too, and I will let you know.

MaxVerevkin commented 1 year ago

i3status-rust 0.22.0-1

I'm using latest master, might be relevant... BTW it happens only when I click on a block, like 5 times.

user451421541757324 commented 1 year ago

it happens only when I click on a block, like 5 times.

I compiled last i3bar-river and I clicked more than five times on various blocks, but I still cannot reproduce:

MaxVerevkin commented 1 year ago

@user451421541757324 WIP: https://github.com/MaxVerevkin/i3bar-river/tree/hyprland

user451421541757324 commented 1 year ago

Hi, thanks for the update! Am I able to test it?

I compiled it, but I cannot see any block (no workspaces block and no normal blocks (music, date...)).

MaxVerevkin commented 1 year ago

Make sure to use the latest hyprland version (from the master branch). It... works for me?

user451421541757324 commented 1 year ago

You are right, with the latest hyprland everything works fine.

MaxVerevkin commented 1 year ago

everything works fine.

Except "click to focus" :)

MaxVerevkin commented 1 year ago

everything works fine.

Except "click to focus" :)

Which is blocked by https://github.com/hyprwm/Hyprland/issues/2084