LBCrion / sfwbar

S* Floating Window Bar
GNU General Public License v3.0
276 stars 17 forks source link

Tray tooltips? #245

Open alaricljs opened 1 month ago

alaricljs commented 1 month ago

I'm working on the switch from X to Wayland and sfwbar is a pretty close fit for me.

The Tray items do not have any tooltips and I'm wondering if that's on your roadmap? Right now the apps I use have an array of possibilities from their window name (like: 'Passwords - KeePassXC'), status output (connection list from nm-applet or nextcloud client), to nothing at all (solaar). None of these show up with sfwbar's tray implementation. Not sure if that's an application side thing or sfwbar.

LBCrion commented 1 month ago

Hi, are you using one of the releases or the latest git? I've beefed up the tray tooltip support since the last release.

On Tue, Oct 15, 2024 at 10:15 PM alaricljs @.***> wrote:

I'm working on the switch from X to Wayland and sfwbar is a pretty close fit for me.

The Tray items do not have any tooltips and I'm wondering if that's on your roadmap? Right now the apps I use have an array of possibilities from their window name (like: 'Passwords - KeePassXC'), status output (connection list from nm-applet or nextcloud client), to nothing at all (solaar). None of these show up with sfwbar's tray implementation. Not sure if that's an application side thing or sfwbar.

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/245, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFG42QHTKWAPHNVSHVTZ3WAWTAVCNFSM6AAAAABQABAWBOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU4DSOJUG44DMNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

alaricljs commented 1 month ago

AUR release, weekend attempt at building it myself landed me a binary that does nothing but instantly segfault

alaricljs commented 1 month ago

^^ aur -git did the same

LBCrion commented 1 month ago

Can you try sfwbar-git from aur?

On Tue, 15 Oct 2024, 22:41 alaricljs, @.***> wrote:

AUR release, weekend attempt at building it myself landed me a binary that does nothing but instantly segfault

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/245#issuecomment-2415216949, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFAMABBXVXWKL3NOZMLZ3WDZVAVCNFSM6AAAAABQABAWBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVGIYTMOJUHE . You are receiving this because you commented.Message ID: @.***>

LBCrion commented 1 month ago

Looks like our messages crossed. Just saw the your tried -git.

On Tue, 15 Oct 2024, 22:42 alaricljs, @.***> wrote:

^^ aur -git did the same

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/245#issuecomment-2415217802, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFBKBNUTSFI2IY5UBOLZ3WD4HAVCNFSM6AAAAABQABAWBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVGIYTOOBQGI . You are receiving this because you commented.Message ID: @.***>

alaricljs commented 1 month ago

did it again anyhow, still segfault/coredump.

LBCrion commented 1 month ago

I have been testing nm-applet specifically with the git version and it's been showing tooltips. You don't see anything for this applet even when connected to WiFi?

Can you try running 'sfwbar -d -g sni' in a terminal and post the output you get?

On Tue, 15 Oct 2024, 22:43 Lev Babiev, @.***> wrote:

Looks like our messages crossed. Just saw the your tried -git.

On Tue, 15 Oct 2024, 22:42 alaricljs, @.***> wrote:

^^ aur -git did the same

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/245#issuecomment-2415217802, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFBKBNUTSFI2IY5UBOLZ3WD4HAVCNFSM6AAAAABQABAWBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVGIYTOOBQGI . You are receiving this because you commented.Message ID: @.***>

alaricljs commented 1 month ago

no config crashes looking for /usr/share/sfwbar/startmenu.css ... my config crashes after the ubiquitous "Theme parsing error: :1:32 Expected semicolon that the release version also gives. I have attempted to find that issue and failed, can't even get it to change the location of it.

LBCrion commented 1 month ago

Do you mean you get a segfault with the -git aur version? What compositor are you using?

On Tue, 15 Oct 2024, 22:47 Lev Babiev, @.***> wrote:

I have been testing nm-applet specifically with the git version and it's been showing tooltips. You don't see anything for this applet even when connected to WiFi?

Can you try running 'sfwbar -d -g sni' in a terminal and post the output you get?

On Tue, 15 Oct 2024, 22:43 Lev Babiev, @.***> wrote:

Looks like our messages crossed. Just saw the your tried -git.

On Tue, 15 Oct 2024, 22:42 alaricljs, @.***> wrote:

^^ aur -git did the same

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/245#issuecomment-2415217802, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFBKBNUTSFI2IY5UBOLZ3WD4HAVCNFSM6AAAAABQABAWBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVGIYTOOBQGI . You are receiving this because you commented.Message ID: @.***>

alaricljs commented 1 month ago

yes to the -git versions and Hyprland. Do you want the above sfwbar attempt on -git or release?

LBCrion commented 1 month ago

Startmenu.css? Are you using a default config or something custom? I don't this startmenu.css is referenced anywhere in the default config.

On Tue, 15 Oct 2024, 22:48 Lev Babiev, @.***> wrote:

Do you mean you get a segfault with the -git aur version? What compositor are you using?

On Tue, 15 Oct 2024, 22:47 Lev Babiev, @.***> wrote:

I have been testing nm-applet specifically with the git version and it's been showing tooltips. You don't see anything for this applet even when connected to WiFi?

Can you try running 'sfwbar -d -g sni' in a terminal and post the output you get?

On Tue, 15 Oct 2024, 22:43 Lev Babiev, @.***> wrote:

Looks like our messages crossed. Just saw the your tried -git.

On Tue, 15 Oct 2024, 22:42 alaricljs, @.***> wrote:

^^ aur -git did the same

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/245#issuecomment-2415217802, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFBKBNUTSFI2IY5UBOLZ3WD4HAVCNFSM6AAAAABQABAWBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVGIYTOOBQGI . You are receiving this because you commented.Message ID: @.***>

alaricljs commented 1 month ago

with the -git from aur -- I copied sfwbar.config from /usr/share/sfwbar/ and it's choking on startmenu.css and you are totally right, there's no mention of that file in sfwbar.config

LBCrion commented 1 month ago

Did you copy sfwbar.config for /usr/share/sfwbar/ to ~/.config/sfwbar/ and running sfwbar without any parameters?

On Tue, 15 Oct 2024, 22:58 alaricljs, @.***> wrote:

with the -git from aur -- I copied sfwbar.config from /usr/share/sfwbar/ and it's choking on startmenu.css and you are totally right, there's no mention of that file in sfwbar.config

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/245#issuecomment-2415238262, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFAXCPQ3SNWOP3MKEG3Z3WFZJAVCNFSM6AAAAABQABAWBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVGIZTQMRWGI . You are receiving this because you commented.Message ID: @.***>

alaricljs commented 1 month ago

exactly so. in order to determine the failure I strace'd it afterward.

LBCrion commented 1 month ago

The segfault here is a red herring I believe. When sfwbar can't find a config file, it bails and dumps core. I should probably have a more graceful failure for this scenario.

The odd bit is that it's looking for a startmenu.css in the first place. Let me try to replicate this on my machine tomorrow morning.

On Tue, 15 Oct 2024, 23:03 alaricljs, @.***> wrote:

exactly so. in order to determine the failure I strace'd it afterward.

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/245#issuecomment-2415250053, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFEFC4V2WJF2N5MFSYDZ3WGKRAVCNFSM6AAAAABQABAWBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVGI2TAMBVGM . You are receiving this because you commented.Message ID: @.***>

alaricljs commented 1 month ago

ok thanks

LBCrion commented 1 month ago

Can I just confirm that it's looking for startmenu.css and not startmenu.widget?

I just tried installing a clean config into ~/.config/sfwbar and don't see any reference to startmenu.css in the debug mode. On the other hand sfwbar with the default config would bail if startmenu.widget is missing.

alaricljs commented 1 month ago
openat(AT_FDCWD, "/usr/share/applications/org.gnupg.pinentry-qt.desktop", O_RDONLY|O_CLOEXEC) = 15
fstat(15, {st_mode=S_IFREG|0644, st_size=219, ...}) = 0
read(15, "[Desktop Entry]\nName=Pinentry\nTy"..., 4096) = 219
read(15, "", 4096)                      = 0
close(15)                               = 0
access("/usr/bin/pinentry-qt", X_OK)    = 0
getuid()                                = 1000
newfstatat(AT_FDCWD, "/usr/bin/pinentry-qt", {st_mode=S_IFREG|0755, st_size=204424, ...}, 0) = 0
futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
access("/usr/share/sfwbar/startmenu.css", F_OK) = -1 ENOENT (No such file or directory)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
+++ killed by SIGSEGV (core dumped) +++
LBCrion commented 1 month ago

Can you try running "sfwbar -d" to see if there is any debug output that can shed some light on this?

Also, since it dumps core, can you try to get a backtrace? Run "coredumpctl gdb" and in gdb run "bt full".

On Wed, 16 Oct 2024, 19:09 alaricljs, @.***> wrote:

openat(AT_FDCWD, "/usr/share/applications/org.gnupg.pinentry-qt.desktop", O_RDONLY|O_CLOEXEC) = 15 fstat(15, {st_mode=S_IFREG|0644, st_size=219, ...}) = 0 read(15, "[Desktop Entry]\nName=Pinentry\nTy"..., 4096) = 219 read(15, "", 4096) = 0 close(15) = 0 access("/usr/bin/pinentry-qt", X_OK) = 0 getuid() = 1000 newfstatat(AT_FDCWD, "/usr/bin/pinentry-qt", {st_mode=S_IFREG|0755, st_size=204424, ...}, 0) = 0 futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 futex(0x780b92e2fff8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 access("/usr/share/sfwbar/startmenu.css", F_OK) = -1 ENOENT (No such file or directory) --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} --- +++ killed by SIGSEGV (core dumped) +++

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/245#issuecomment-2417563739, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFA4EGWIEIFX2YJPBB3Z32TWFAVCNFSM6AAAAABQABAWBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJXGU3DGNZTHE . You are receiving this because you commented.Message ID: @.***>

alaricljs commented 1 month ago

it's calling the init function for appmenu and produces a list of appmenu items. Then there's 4 expr's like '""open-menu"" = "open-menu" (vstate: 0)' and then the seg fault. I can past the whole output if you like.

backtrace:

(gdb) bt full
#0  0x000071af3999460b in workspaces_supported () at /usr/lib/sfwbar/libsfwbar.so
#1  0x000071af39998c0b in ??? () at /usr/lib/sfwbar/libsfwbar.so
#2  0x000071af3984bb09 in g_type_create_instance () at /usr/lib/libgobject-2.0.so.0
#3  0x000071af39830805 in ??? () at /usr/lib/libgobject-2.0.so.0
#4  0x000071af39831e7f in g_object_new_with_properties () at /usr/lib/libgobject-2.0.so.0
#5  0x000071af39832ed2 in g_object_new () at /usr/lib/libgobject-2.0.so.0
#6  0x000071af399ab630 in config_widget_child () at /usr/lib/sfwbar/libsfwbar.so
#7  0x000071af399ab742 in config_widget () at /usr/lib/sfwbar/libsfwbar.so
#8  0x000071af399afab1 in config_parse_toplevel () at /usr/lib/sfwbar/libsfwbar.so
#9  0x000071af399aa6a8 in config_parse_data () at /usr/lib/sfwbar/libsfwbar.so
#10 0x000071af399aa899 in config_parse () at /usr/lib/sfwbar/libsfwbar.so
#11 0x00005b9c97866596 in ??? ()
#12 0x000071af3981e82a in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#13 0x000071af3984f565 in ??? () at /usr/lib/libgobject-2.0.so.0
#14 0x000071af3983fca9 in ??? () at /usr/lib/libgobject-2.0.so.0
#15 0x000071af3983ff32 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#16 0x000071af3983fff4 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#17 0x000071af38f0f9a1 in ??? () at /usr/lib/libgio-2.0.so.0
#18 0x000071af38f0fb47 in g_application_run () at /usr/lib/libgio-2.0.so.0
#19 0x00005b9c978660eb in main ()
LBCrion commented 1 month ago

Thank you. This is just what I needed. It looks like the startmenu.css is a red herring (does it show up as an error message when you start sfwbar normally or only in strace?). The issue was triggered by only partially merged update I was working on. I pushed the rest of it now and segfault should be gone. Can you try updating sfwbar-git from AUR and see if it works?

On Tue, Oct 15, 2024 at 11:09 PM alaricljs @.***> wrote:

ok thanks

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/245#issuecomment-2415256965, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFGYXOPSHZREUX6KQM3Z3WHADAVCNFSM6AAAAABQABAWBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVGI2TMOJWGU . You are receiving this because you commented.Message ID: @.***>

alaricljs commented 1 month ago

Not an error message, just the last thing in strace before the dump.

The new -git r1594.70ba3ef-1 build works to a large extent. Amusingly enough nm-applet is the one that has no tooltip, everything else does. The menu is different for nm-applet between X and Wayland as well which is odd but not your problem. Another thing is Solaar using html(?) that is not getting interpreted, specifically \\. I'll need to track down a unicode glyph for blueman... hm, battery apparently (01f50b).

alaricljs commented 1 month ago

On another note (glad to open a separate issue) what should be responsible for notifications generated by these tray apps? blueman pops notifications for my mouse connect/disconnect and they appear with an sfw icon so sfwbar is seen as the owner/parent. The particular issue I face is that they show up and never go away without being deliberately closed.

LBCrion commented 1 month ago

I added an update to the latest git to handle tooltip markup. Hopefully this will help with Solaar. For nm-applet, can you try running sfwbar -d -g sni to see what nm-applet sends over dbus?

As for blueman, if you get a popup window notifying you of a mouse connection, it's a notification being handled by a program other than sfwbar (i.e. mako or dunst). sfwbar does have a notification center, but it's disabled by default to avoid interfering with what you may already have setup on your system (you can only have one notification center). If you want to enable sfwbar's notification center, you can uncomment include("ncenter.widget") in the config, but you probably want to disable your existing notification center first.

alaricljs commented 1 month ago

I can paste it here, but the short story is nm-applet isn't providing anything not labelled a menu. And while looking at the menu it's apparently updating icons in the menu.

alaricljs commented 1 month ago

Wow... nm-applet has issues. I created a VPN profile and now there's a tooltip.

alaricljs commented 1 month ago

Your ML adjustment is working.