Skip to content

Conversation

@elParaguayo
Copy link
Member

Add a widget implementing the StatusNotifierItem specification. Should work on both x11 and Wayland backends.

NB Currently, the widget does not implement context menus for the icons.

This replaces #2601. The only difference is that context menu support has been removed/disabled so as not to include popup toolkit in main codebase. I can host on my qtile-extras repo.

NB - I've left in the underlying methods to generate the menus from DBus. However, the widget does not access these and there is not code to turn a DBusMenuItem into a visible menu.

@elParaguayo elParaguayo mentioned this pull request Sep 4, 2021
7 tasks
@m-col
Copy link
Member

m-col commented Sep 4, 2021

There is a lot of code here for supporting menus, when menus are ultimately not supported. How much of that needs to be in libqtile? Ideally we'd have a version that is similar to the Systray in behaviour. Could the extra dbus menu functionality also be packaged as part of the full bells-and-whistles widget?

@elParaguayo
Copy link
Member Author

Systray supports context menus because they're provided by the window. Not having them is a step backwards but understandable since it's now on us to implement.

Add for the menu stuff. I'll take another look and see if we can strip it out and find a simple way to hook it back in without significant rewrites.

@m-col
Copy link
Member

m-col commented Sep 4, 2021

Also - where does the XML originally come from? I guess you didn't type it out :p

@elParaguayo
Copy link
Member Author

Can't remember. Some Google search. No, didn't type it but could have also dumped it from an introspection call.

@m-col
Copy link
Member

m-col commented Sep 4, 2021

Is that introspection call possible during runtime? I guess it's very unlikely, but could that interface change?

@elParaguayo
Copy link
Member Author

Yes, it's possible at runtime. I avoided it as this is meant to be a standard (although the code is already catering for non-standard icons)

@m-col
Copy link
Member

m-col commented Sep 4, 2021

Do you know how I could get that xml myself via introspection? Just interested in how this works - my dbus is lacking.

@elParaguayo elParaguayo marked this pull request as draft September 4, 2021 11:34
@elParaguayo
Copy link
Member Author

I'm flipping this in to draft as I may make some changes as I'm working on the menu version in qtile-extras in parallel.

@elParaguayo elParaguayo force-pushed the simplified_sni_widget branch from 9ee9d41 to d213dfe Compare September 4, 2021 12:55
@elParaguayo
Copy link
Member Author

This should be good now. I've got menus working in my repo with not too much additional code required to hook it into this one.

@elParaguayo elParaguayo marked this pull request as ready for review September 4, 2021 12:58
@elParaguayo elParaguayo force-pushed the simplified_sni_widget branch from d213dfe to d4513fc Compare September 4, 2021 13:10
@judemille
Copy link

Any updates on this? I'm in the process of switching to Wayland and would like to use qtile -- if this won't be done in the next week is there a guide for setting up waybar with qtile?

@m-col
Copy link
Member

m-col commented Sep 26, 2021

is there a guide for setting up waybar with qtile?

waybar (and other bars) should work out of the box as you'd expect, so please post an issue if you do come across any issues with doing so!

@elParaguayo can comment on the widget.

@judemille
Copy link

waybar (and other bars) should work out of the box as you'd expect, so please post an issue if you do come across any issues with doing so!

My understanding is that won't do things like show workspaces and layouts? Perhaps I'm mistaken.

@elParaguayo
Copy link
Member Author

Given that we've carved out the the context menus, this should be done and, ideally, just need testing by volunteers.

Once it's committed, I'll push the context menus to my repo.

@judemille
Copy link

Given that we've carved out the the context menus, this should be done and, ideally, just need testing by volunteers.

Once it's committed, I'll push the context menus to my repo.

Do you have an ETA on those context menus? I don't poke at tray icons too much but I don't want to run into a situation where I'm screwed without the menus.

@m-col
Copy link
Member

m-col commented Sep 26, 2021

My understanding is that won't do things like show workspaces and layouts? Perhaps I'm mistaken.

I don't think third party bars would display desktops in any wayland compositor as there isn't (yet?) a standard way to communicate "virtual desktops" as X11 knows them. Interesting point that I hadn't considered. There is a protocol for third party tools to control (i.e. close, focus) windows but that isn't implemented yet in Qtile. This is definitely on my list so it's good to have some reinforcement that there is demand for such tools.

@judemille
Copy link

judemille commented Sep 26, 2021

I don't think third party bars would display desktops in any wayland compositor as there isn't (yet?) a standard way to communicate "virtual desktops" as X11 knows them. Interesting point that I hadn't considered. There is a protocol for third party tools to control (i.e. close, focus) windows but that isn't implemented yet in Qtile. This is definitely on my list so it's good to have some reinforcement that there is demand for such tools.

Perhaps something that works similar to swaymsg? I'm not too involved in the development but having a protocol with some of the same abilities as swaymsg or even EWMH would be extremely useful.

E: Regardless, that isn't really a discussion for this PR lol. Perhaps set up a tracking issue or other method of conversation?

@m-col
Copy link
Member

m-col commented Sep 26, 2021

Perhaps something that works similar to swaymsg?

Ah yes - you can use Qtile's IPC for this, if the bar can execute arbitrary commands for things. See: http://docs.qtile.org/en/latest/manual/commands/shell/qtile-cmd.html

E: Regardless, that isn't really a discussion for this PR lol. Perhaps set up a tracking issue or other method of conversation?

Feel free to open an issue or discussion, or chat on IRC :)

@m-col
Copy link
Member

m-col commented Sep 30, 2021

This is working great! I remember asking this before but I can't find it, and maybe things have changed, but is it possible to load the data in SCHEMA_STATUS_NOTIFIER_ITEM during runtime? I remember that you said it isn't likely to change, so I know that won't be an issue, but it just seems odd to check data like that into source control.

@elParaguayo
Copy link
Member Author

Ah, yeah. We were going to replace it with the introspection call. I can do that.

@elParaguayo
Copy link
Member Author

Given that we've carved out the the context menus, this should be done and, ideally, just need testing by volunteers.
Once it's committed, I'll push the context menus to my repo.

Do you have an ETA on those context menus? I don't poke at tray icons too much but I don't want to run into a situation where I'm screwed without the menus.

@judemille Sorry. Missed this. In short, the code for the context menus is pretty much all done. It was originally part of this PR but we cut it back as it adds too much extra code to the codebase. The additional code and the full StatusNotifier widget will be available from my 'qtile-extras' repo.

I'd be very surprised if the menus provide any functionality that's not available from the app itself. The menus should really just be there for convenience.

@elParaguayo elParaguayo force-pushed the simplified_sni_widget branch 2 times, most recently from d21cce9 to a14eff9 Compare October 1, 2021 16:53
@elParaguayo
Copy link
Member Author

Schema stuff has been removed. Fixed the docs.

NB this PR also adds the widget to the default config but maybe we should think about that a bit.

@elParaguayo elParaguayo force-pushed the simplified_sni_widget branch from a14eff9 to e734750 Compare October 9, 2021 17:07
Add a widget implementing the StatusNotifierItem specification.
Should work on both x11 and Wayland backends.

NB Currently, the widget does not implement context menus for
the icons.
@elParaguayo elParaguayo force-pushed the simplified_sni_widget branch from e734750 to e8caefb Compare October 9, 2021 17:09
@elParaguayo
Copy link
Member Author

Added changelog entry and removed from default_config (we can look at that separately).

This should be good to merge now.

@m-col
Copy link
Member

m-col commented Oct 10, 2021

Beautiful! Thanks for working on this!

@m-col m-col merged commit 0e9d5d9 into qtile:master Oct 10, 2021
@elParaguayo elParaguayo deleted the simplified_sni_widget branch October 10, 2021 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants