2023-12-18 23:08:42 +01:00
|
|
|
package xrandr
|
|
|
|
|
|
|
|
type Rotation string
|
|
|
|
|
|
|
|
const (
|
|
|
|
RotationNormal Rotation = "normal"
|
|
|
|
RotationInverted Rotation = "inverted"
|
|
|
|
RotationLeft Rotation = "left"
|
|
|
|
RotationRight Rotation = "right"
|
|
|
|
)
|
|
|
|
|
2023-12-18 23:15:12 +01:00
|
|
|
func makeRotation(rot string) Rotation {
|
2023-12-18 23:08:42 +01:00
|
|
|
switch rot {
|
|
|
|
|
|
|
|
case "normal":
|
|
|
|
return RotationNormal
|
|
|
|
|
|
|
|
case "inverted":
|
|
|
|
return RotationInverted
|
|
|
|
|
|
|
|
case "left":
|
|
|
|
return RotationLeft
|
|
|
|
|
|
|
|
case "right":
|
|
|
|
return RotationRight
|
|
|
|
|
|
|
|
default:
|
|
|
|
return RotationNormal
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|