xrandr/reflection.go

53 lines
713 B
Go
Raw Permalink Normal View History

2023-12-18 23:08:42 +01:00
package xrandr
type Reflection string
const (
ReflectionNormal Reflection = "normal"
ReflectionX Reflection = "X axis"
ReflectionY Reflection = "Y axis"
ReflectionXY Reflection = "X and Y axis"
)
func MakeReflection(ref string) Reflection {
switch ref {
case "normal":
return ReflectionNormal
case "X axis":
return ReflectionX
case "Y axis":
return ReflectionY
case "X and Y axis":
return ReflectionXY
default:
return ReflectionNormal
}
}
func (r Reflection) xrandr() string {
switch r {
case ReflectionNormal:
return "normal"
case ReflectionX:
return "x"
case ReflectionY:
return "y"
case ReflectionXY:
return "xy"
default:
return "normal"
}
}