Massive commit
This commit is contained in:
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# If you prefer the allow list template instead of the deny list, see community template:
|
||||||
|
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
||||||
|
#
|
||||||
|
# Binaries for programs and plugins
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Test binary, built with `go test -c`
|
||||||
|
*.test
|
||||||
|
|
||||||
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
|
*.out
|
||||||
|
|
||||||
|
# Dependency directories (remove the comment below to include it)
|
||||||
|
# vendor/
|
||||||
|
|
||||||
|
# Go workspace file
|
||||||
|
go.work
|
5
go.mod
Normal file
5
go.mod
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
module aaw3/xmonad-log-multiscreen
|
||||||
|
|
||||||
|
go 1.20
|
||||||
|
|
||||||
|
require github.com/godbus/dbus v4.0.0+incompatible
|
2
go.sum
Normal file
2
go.sum
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
github.com/godbus/dbus v4.0.0+incompatible h1:iNJ3QcnEtQA2va/vj1d2Ng5Ld6tWno5HscHoVw9Bk/I=
|
||||||
|
github.com/godbus/dbus v4.0.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
|
10
main.go
10
main.go
@ -13,8 +13,14 @@ func main() {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
conn.BusObject().Call("org.freedesktop.DBus.AddMatch", 0,
|
if len(os.Args) < 2 {
|
||||||
"type='signal',path='/org/xmonad/Log',interface='org.xmonad.Log',member='Update'")
|
fmt.Fprintln(os.Stderr, "Missing screen_id argument, rerun as \"xmonad-log screen_id\" ex: xmonad-log 0")
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
args := fmt.Sprintf("type='signal',path='/org/xmonad/Log%s',interface='org.xmonad.Log',member='Update'", os.Args[1])
|
||||||
|
|
||||||
|
conn.BusObject().Call("org.freedesktop.DBus.AddMatch", 0, args)
|
||||||
|
|
||||||
c := make(chan *dbus.Signal, 10)
|
c := make(chan *dbus.Signal, 10)
|
||||||
conn.Signal(c)
|
conn.Signal(c)
|
||||||
|
Reference in New Issue
Block a user