32 lines
458 B
Go
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
|
|
|
|
}
|
|
}
|