aboutsummaryrefslogtreecommitdiff
path: root/nexgb/examples/atom.go
blob: c64acee8d3ce18e7b1d4ebaf4e3450737cfb8e14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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"
	atom, err := X.InternAtom(true, uint16(len(aname)), aname)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("%d", atom.Atom)
}