focus

package module
v0.0.0-...-2328c69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2016 License: MIT Imports: 5 Imported by: 0

README

focus

GoDoc License MIT

Subscribe to window focus events. Currently only supports Linux.

Background

I wrote this mainly to solve the problem of application-specific keyboard layouts in Linux. Simply put, I want to use Swedish layout when browsing but US layout when I am coding and I could not find any simple way of doing this.

The xkbd command in this project is a uses the package to solve this by executing setxkbmap whenever I switch between browser and terminal.

If you know of any better way of doing this, please let me know.

Note: Honestly, this is yak shaving at it's finest. Nowadays I'm using: setxkbmap -layout us -variant altgr-intl -option ctrl:nocaps

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(fn func(e Event)) error

Listen ...

Types

type Event

type Event interface {
}

Event ...

type Gained

type Gained struct {
	WMClass []string
}

Gained ...

type Lost

type Lost struct {
	WMClass []string
}

Lost ...

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL