xrandr/rotation.go
2023-12-18 23:15:12 +01:00

32 lines
458 B
Go

package xrandr
type Rotation string
const (
RotationNormal Rotation = "normal"
RotationInverted Rotation = "inverted"
RotationLeft Rotation = "left"
RotationRight Rotation = "right"
)
func makeRotation(rot string) Rotation {
switch rot {
case "normal":
return RotationNormal
case "inverted":
return RotationInverted
case "left":
return RotationLeft
case "right":
return RotationRight
default:
return RotationNormal
}
}