From 4395f67fdf2713e71b9db753757bd66dc7a72776 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Tue, 31 Mar 2020 23:27:28 -0400 Subject: [PATCH] ADD readme --- README.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 987634a..9a9b3b1 100644 --- a/README.md +++ b/README.md @@ -1 +1,30 @@ -# xman-hs +# XMan +A daemon to manage [[https://github.com/alols/xcape][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 KEYS REGEXP [REGEXP [REGEXP] ...] +``` + +Where `KEYS` are the keys supplied to the `-e` argument of `xcape` and `REGEXP` +is a POSIX-style regular expression matching a window title for which xcape will +not be running when it is in focus. To find a window title, use the `xprop` +program and look for the `WM_NAME` and `_NET_WM_NAME` atoms in the output. + +# Dependencies + +* xcape + +# Installation + +Clone this repo and run `stack install`.