Hey Bruny,

On Wed, Nov 15, 2017 at 11:20:00PM -0800, Bruno Inec wrote:
> I have a very hard time finding the use of ev in:
> 
> @libqtile.hook.subscribe.screen_change
> def restart_on_randr(qtile, ev):
>     qtile.cmd_restart()
> 
> 
> I'd like to know when it's just a screen plugged or if it is a change in 
> the configuration through randr.
> Is it possbile to do so with the 'ev' argument?

Probably, but you'd have to do more digging than I have time for at
the moment. 'ev' is a ScreenChangeNotifyEvent object, 

        <event name="ScreenChangeNotify" number="0">
                <field type="CARD8" name="rotation" mask="Rotation" />
                <field type="TIMESTAMP" name="timestamp" />
                <field type="TIMESTAMP" name="config_timestamp" />
                <field type="WINDOW" name="root" />
                <field type="WINDOW" name="request_window" />
                <field type="CARD16" name="sizeID" />
                <field type="CARD16" name="subpixel_order" enum="SubPixel" />
                <field type="CARD16" name="width" />
                <field type="CARD16" name="height" />
                <field type="CARD16" name="mwidth" />
                <field type="CARD16" name="mheight" />
        </event>

I guess looking at some properties of the root window combined with
the width/height you'll be able to figure this out.

Cheers,

Tycho

> Thank you! 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "qtile-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to