contextual xcape manager
Go to file
Nathan Dwarshuis 7eacd0134f REF use rio and such 2023-02-13 21:40:26 -05:00
app REF use rio and such 2023-02-13 21:40:26 -05:00
.gitignore REF use rio and such 2023-02-13 21:40:26 -05:00
LICENSE init 2020-03-31 23:15:43 -04:00
README.md REF update documentation 2020-04-01 16:51:28 -04:00
fourmolu.yaml REF use rio and such 2023-02-13 21:40:26 -05:00
make_pkgs ADD make pkgs list 2022-07-26 23:18:00 -04:00
package.yaml REF use rio and such 2023-02-13 21:40:26 -05:00
stack.yaml REF use rio and such 2023-02-13 21:40:26 -05:00

README.md

XMan

A daemon to manage xcape instances based on which app is in focus.

Xcape allows one to configure any key to send an arbitrary key upon release (for instance, the Control key can function as itself on keypress and an Escape key on key release).

This works beautifully except when one tries to switch to a virtual machine (VM), particularly a windows machine with an Autohotkey script to replicate the keymap in the host machine. In this case, any xcape'd keys will be sent twice. The obvious (and somewhat crude solution) is to start and stop xcape depending on which apps have focus.

Usage

xcape-hs [-t TIMEOUT] BINDINGS REGEXP [[REGEXP] ...]

Where TIMEOUT and BINDINGS are the timeout argument and the key bindings to be passed to the -t and -b flags respectively in xcape and REGEXP is a POSIX-style regular expression matching a window app name for which xcape will not be running when it is in focus. To find the app name for a window, use the xprop program and look for the first member of the WM_CLASS atom.

Dependencies

  • xcape

Installation

Clone this repo and run stack install.