LemonBoy / bar

A featherweight, lemon-scented, bar based on xcb
MIT License
1.62k stars 194 forks source link

Set WM_CLASS #174

Closed CrackedP0t closed 8 years ago

CrackedP0t commented 8 years ago

It would be very useful to set the WM_CLASS property of the Lemonbar windows to something like "Lemonbar", and/or to add a flag like "-n" to set it on the command line.

My specific use case is targeting it with BSPWM rules, but I'm sure there are many other uses as well.

dylanaraps commented 8 years ago

I might be wrong but can't you use WM_NAME with BSPWM rules? I'm pretty sure you could get it working this way. Just name each bar something unique with -n.

lwilletts commented 8 years ago

WM_CLASS would be still be useful, especially as it would follow X11 conventions. I can already see uses for this with wmutils for example. Also, it should probably be hard coded as something like 'Lemonbar', and leave the WM_NAME attribute free.

LemonBoy commented 8 years ago

The customizable WM_NAME allows people to have custom rules for each bar, WM_CLASS should be set to a constant string, removing the ability to do so. Closing this for now, if you have some more question feel free to re-open it.

MarcelRobitaille commented 7 years ago

@dylanaraps How do you do that? I tried that with bspc rule -a notification state=floating but my bar with -n "notification" doesn't float. I have verified the WM_NAME and the state with xprop. Is there a special syntax for name rules as apposed to class rules?

dylanaraps commented 7 years ago

It's been well over a year since I've used BSPWM, I wouldn't have a clue anymore. I've moved on to using dunst and notify-send for my notification needs.

MarcelRobitaille commented 7 years ago

What de/wm do you use now? I tried the dunst thing for a while. It was nice but how do you handle click events?

MarcelRobitaille commented 7 years ago

I'm not familiar with bspwm's source but here, assuming r->cause.name is the name in the config and reply.instance_name is the WM_NAME, it looks like is should work.