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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
xkbd command

Jump to

Keyboard shortcuts

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