Invert display and lockscreen control dependencies

This commit is contained in:
2020-08-20 16:57:57 +02:00
parent e6458aba0b
commit ebbd1974df
7 changed files with 59 additions and 17 deletions

View File

@ -6,8 +6,11 @@ import (
)
// XDG uses qdbus to monitor the freedesktop screensaver status
type XDG struct {}
// IsActive checks whether the screen is locked (checks if the screensaver is active)
func IsActive() (bool, error) {
func (XDG) IsActive() (bool, error) {
cmd := exec.Command("qdbus",
"org.kde.screensaver",
"/ScreenSaver",