sargon / trayer-srg

trayer fork with multi monitor support, cleaned up codebase and other fancy stuff
Other
223 stars 34 forks source link

Switching monitors and --edge right #26

Closed mklinik closed 6 years ago

mklinik commented 8 years ago

I'm using trayer like this: trayer --edge top --align right --SetPartialStrut true --height 14 --widthtype request --alpha 200 --transparent true I use xrandr to switch between monitors with a different resolution, a laptop screen and a desktop monitor. When switching monitors, trayer stays at the position where it was on the other monitor before. Only when an icon appears or disappears does trayer update its position to the new screen edge.

Is it possible to update trayer's position immediately when switching monitors?

Thanks!

sargon commented 8 years ago

Yeah, AFAIK there are events which notify about changes. But we are not listing to them. The observed behavior results from the fact that we read the screen values on every update, I think. Maybe I will be able to have a look into this in the end of the week, but no promises.

jfly commented 6 years ago

I've been working around this by running the following python script every time I run xrandr:

> python2 -c 'import gtk; gtk.StatusIcon()'

It would be great to have trayer listen to the relevant events itself.

sargon commented 6 years ago

Maybe 6c670cf fixes this problem.

mklinik commented 6 years ago

Yes it works. When I switch between laptop and desktop monitor now, trayer stays at the right edge of the screen. Awesome, thanks!

sargon commented 6 years ago

Fine. I am going to bump the version soon, so this fix moves into the distro packages.

jfly commented 6 years ago

I can confirm that this works for me now. Thanks!