Invert display and lockscreen control dependencies
This commit is contained in:
		@@ -7,8 +7,11 @@ import (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// Suspend the display using xset
 | 
			
		||||
func Suspend() error {
 | 
			
		||||
// Xset monitors/controls the display using xset
 | 
			
		||||
type Xset struct {}
 | 
			
		||||
 | 
			
		||||
// Suspend the display
 | 
			
		||||
func (Xset) Suspend() error {
 | 
			
		||||
	cmd := exec.Command("xset",
 | 
			
		||||
		"dpms",
 | 
			
		||||
		"force",
 | 
			
		||||
@@ -18,7 +21,7 @@ func Suspend() error {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsOn determines if the display is on
 | 
			
		||||
func IsOn() (bool, error) {
 | 
			
		||||
func (Xset) IsOn() (bool, error) {
 | 
			
		||||
	cmd := exec.Command("xset", "q")
 | 
			
		||||
	outputBytes, err := cmd.CombinedOutput()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user