this post was submitted on 28 Dec 2023
1473 points (99.3% liked)
Programmer Humor
19623 readers
34 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
How can you do fractional rotation? Does it only work with x11 or is it also supported in wayland?
I was looking into this earlier to try fixing a display that was being offset on an old tv screen. The display was going off the left side of the TV, causing a black bar on the right side.
I was trying
xrandr
, and fixed it somewhat by offsetting the display back, but somehow it did not fix the right side - it seemed as if the display had went under the black bar.But yeah you can offset, stretch, skew and rotate with
xrandr
The
--rotate normal,inverted,left,right
does not work, but you can use the transform option to achieve the same effect. To create the transformation matrix you can use something like: https://angrytools.com/css-generator/transform/The final command looks like this:
xrandr --output screen-1 --transform 0.87,-0.50,960,0.50,0.87,540,0,0,1
To restore the original use (type this in first, because if you screw up you might not be able to see anything anymore):
xrandr --output screen-1 --transform 1,0,0,0,1,0,0,0,1
I tested it on x11.