-// The caller is responsible for tracking the lifetime of the returned X
+// Note: The caller is responsible for tracking the lifetime of the returned X
// connection and calling connection.Close() when appropriate.
func connectToXServer() *xgb.Conn {
connection, err := xgb.NewConn()
}
func getAttachedScreens(conn *xgb.Conn) (screens []xinerama.ScreenInfo) {
- // First, attempt to use xinerama to obtain screen information.
+ // Attempt to use xinerama to obtain screen information.
err := xinerama.Init(conn)
if err != nil {
fmt.Fprintf(os.Stderr, "ILLI: Unable to initialize xinerama: %s\n", err.Error())
}
func getKeyboardMap(conn *xgb.Conn) (keymap [256][]xproto.Keysym) { // TODO: Why 256?
- const ( // TODO: WhyTF? How does the keymap work under the hood?
+ const ( // TODO: Why? How does the keymap work under the hood?
loKey = 8
hiKey = 255
)