2012-05-04 04:47:50 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
// "fmt"
|
|
|
|
"log"
|
|
|
|
|
|
|
|
"github.com/BurntSushi/xgb"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
log.SetFlags(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
X, err := xgb.NewConn()
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
aname := "_NET_ACTIVE_WINDOW"
|
2012-05-06 00:22:24 +02:00
|
|
|
atom, err := X.InternAtom(true, uint16(len(aname)), aname).Reply()
|
2012-05-04 04:47:50 +02:00
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
log.Printf("%d", atom.Atom)
|
|
|
|
}
|
|
|
|
|