-
-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(xwindow): allow pinning window titles to output where the bar is displayed #576
Conversation
… displayed -boolean config property called "pin-output". defaults to false -window title is only displayed on bar on currently focused monitor -window geometry from scb is used to determine a windows position
Thank you for contributing. I'll check it out once I have some time. |
Well, out of nowhere I decided to give bspwm a try. Turns out, this does not work on bspwm. I'll see about fixing that. |
This may show just how little I understand X11, but on bspwm using xcb to query window size is returning unexpected values. The positions are being given back doubled. A window is at actual horizontal pixel 6459, but xcb is saying 12918. |
to determine monitor window is on
I did some testing with other WM's (i3, openbox, fluxbox, awesome, xfce, lxqt, lxde, mate at least). bspwm is the only one that I have seen that exhibits this behavior. The workaround is to not use translated coordinates relative to the root window, since for whatever reason on bspwm the coordinates relative to parent window (given by xcb_get_geometry()) are correct. I cleaned up the active_window_on_monitor() function and put in a check for the bspwm socket. If it is found, do not check the window position using the translated coordinates. I do not know a better way around this bspwm oddity. TLDR: the last commit implements a workaround which fixes detection of window positions on bspwm. |
I am interested in this feature. |
Having the active window title displayed on all bars did not make sense to me. With this pull request I added a config value to skip displaying the window title on bars on other monitors.
-boolean config property called "pin-output". defaults to false
-window title is only displayed on bar on currently focused monitor
-window geometry from xcb is used to determine a window's position
Fixes #252.