niri-taskbar: Initial Module Implementation#4164
Conversation
|
the PR got merged! how is this looking in terms of review readiness? |
|
Well, I've been using this module for a couple months now. There are 2 major outstanding issues to resolve..
I'll see if I can get it polished up this weekend! |
|
Oh also, I have some aspirations to add support for multiple icon theme packs; and support for allowing user config of using characters in place of icons of certain applications (For things like font awesome icons). These are enhancements that should probably crawl in through a later MR. |
Bugs: - Old Niri Untested. - It seems like IPC handling in niri/backend needs to be updated to support the new indicies properly. Moving windows often leads to stale data. - Icons for some flatpak apps (Like obsidian on my laptop) do not work. - Using niri dev branch.
- Add separators when showing multiple workspaces - Add failover if app icon not found
X Applications often use their "StartupWMClass" names from their desktop files. In these cases, we need to parse through the desktop files to get the "Icon" name (which is typically their real app id). This occurs with all X based flatpak apps, since the underlying app id (e.g. "com.myapp.desktop") almost never aligns with the StartupWMClass.
Keep track of buttons and workspaces with their own classes. This should help to allow us to better apply workspace specific styles. It should also allow us to more easily optimize performance.
c254d96 to
b0ad031
Compare
|
Hi, I'm an arch Linux user who wants to try niri/taskbar earlier. I compiled the code using the PKGBUILD from the AUR after modifying the source URL. It seems that When I connect an external display and close the laptop lid, Waybar stops running. |
This has been updated in my latest commit.
I have seen this a few times. I also recently saw it with the other niri modules on mainline waybar. I suspect there is something up with niri backend setting some values to Null from a Niri IPC, then those are improperly handled by modules on bar refresh. I swear I'll actually work on this over this week.. The joys of life becoming busy ^^' |
I believe I was using the latest commit (b0ad031). If the two places mentioned below have been updated, I might have missed something. Another question is how can I use the format 'icon-and-text'/'text'. My config doesn't work now.
It's fine. Life can be very busy owo. Thank you for your consideration! |
|
Oops, yeah it looks like I simply didn't properly test my original update to the IPCs. That should be fixed now, with a bonus of having fixed on of the intermittent crashes on monitor add/remove.
This PR also needs docs for this. In lieu of that, here is a snippet from my config with some comments. As for css, the outer module element is named "taskbar" and each workspace has it's own names "workspace" div. Thus css theming looks vaguely like.. |
|
Thanks for the quick fix! I'm still seeing a small error. Seems the text part can only be |
|
Fixed that error message. Introduced it with my backend refactoring. Updated the "button-format" enum to support using the window title instead of app id. "icon", "app-id", "title, "icon-and-app-id", "icon-and-title". |
|
Great! Thank you so much! |
|
Is there a way to hide the new-workspace-button? |
|
Also, the wlr/taskbar uses class |
|
And a bug: the Edit: I managed to fix it: case WorkspaceFormat::LabelWsName: {
Json::Value name = ws.get("name", Json::Value::null);
if (name.isNull()) {
this->label_.set_label(ws.get("idx", "error").asString());
} else {
this->label_.set_label(name.asString());
}
break;
} |
This PR implements a taskbar that is specific for Niri. Unlike wlr-taskbar, this taskbar provides the ability to order applications by position in the Niri workspace; Groups applications by their workspace; and uses exclusively Niri IPC building on the implementation of the existing niri-workspaces module.
NOTE: This depends on an unmerged Niri PR, niri-wm/niri#1265