Re: [PATCH 3/6] Disable sfdump if there is no xrandr support.

Jeremie Courreges-Anglas <[email protected]> Sun, 27 Nov 2016 11:45:15 +0100
Newsgroups gmane.comp.window-managers.ratpoison.devel
Message-ID <[email protected]>
Mathieu OTHACEHE <[email protected]> writes:

> Hi,

Ehlo,

>> I think this is headed in the wrong direction.  There is no reason to
>> disable this command when we can easily deal with the single available
>> screen.
>
> Yes I agree, it is not a very good idea after all.
>
> Maybe we could copy the old behaviour by mapping the Xrandr identifier
> to an integer going from 0 to screen count.
>
> For example,
>
> Xrandr id -> Ratpoison id
> 0x47         0
> 0x48         1
> 0x49         2
>
> Then we would use this ratpoison id to identify screens in sdump,
> sselect and sfrestore commands.

No idea whether how stable would be the mapping between Xrandr ids and
ratpoison ids, though, as we don't control the former.  There's not much
choice though, but 1. you already have implemented a screen_sort
function, and 2. this sounds better than forcing the user to deal with
numbers like 42 and 66, especially for 'sselect'. :)

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

_______________________________________________
Ratpoison-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/ratpoison-devel
signature.asc (application/pgp-signature, 800 B)
-----BEGIN PGP SIGNATURE-----

iQIbBAEBCgAGBQJYOrk7AAoJEA36dK4VJOfuu2oP9RZkHLo5uW5YLELFMESa8d5j
F2KeB8g5KhEbtOjKE0U77nRdj57mPPrhhOCg4MqeLPj3pvF4fVCox5l6pTpZ3I7B
TEW9mc4bKdPNIW+FL/NNBhTHLIPDxVberadF16u3XKHhxB15IUVd3FU373v2WS23
EoGGyFXp6c97YXtRHqlkBSv86G7JxuvzQlPkY/wrMCsJir0y6tV6pjHIbfTDf74D
PnjbFFx6lxNEWp1McpJLGVTDZn6vQwHCVwcilq1BEbRC0kEbMRC711z0gE5Wkq7r
ClaUV1lMVOloM4a5nrVk64otQsPcEAU9H94AVyU+VzbE/Ro7u5Q9Uif5O8eKczU+
alJ3lO8hMAGk5hxgphyL69vzHrr5tHqLjXjf8Et3Gs/fFGFzJRDF+cgzT/tPPqNY
cSRCwAZnJXfFc80TIupbDZuQQWe11ekGaPxLMQBdutcsjBhMEwKENs35XMGG2Eyf
yq/IjksJaNcdrEWMUdBDz3n9ay/6+96JDUuq7rNMtwRKkMOAaAkEBxq3ykFuQZAt
SK4mlUxkEE80NRSkQALjZ+eGQTDMW46RTNAzjh5o6jM3LSrvjgxl/zVE3YIKaGa1
fCJuCnhQuEf4Ju8XhTRhysM8TTMQI0FKhGLPNrk5uPfN0VrnKBBg2e+F/iJwW6pg
vsB97rVIUogSEVNQGDo=
=gYnt
-----END PGP SIGNATURE-----