From ae92b0e8b3f922dcfc2402ea1d3f369daff5613b Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Wed, 1 Apr 2020 16:51:28 -0400 Subject: [PATCH] REF update documentation --- README.md | 12 ++++++------ app/Main.hs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d83128f..b395b4f 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,14 @@ on which apps have focus. # Usage ``` -xcape-hs BINDINGS REGEXP [[REGEXP] ...] +xcape-hs [-t TIMEOUT] BINDINGS REGEXP [[REGEXP] ...] ``` -Where `BINDINGS` 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. +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 diff --git a/app/Main.hs b/app/Main.hs index c38963e..6a7a56e 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -13,8 +13,8 @@ -- The process for doing this using Xlib: -- 1) Listen for PropertyNotify events from the root window -- 2) Of those events, filter those where the _NET_ACTIVE_WINDOW atom has changed --- 3) Using the value of _NET_ACTIVE_WINDOW, get the title of the active window --- 4) If active window matches a certain criteria, turn off xcape (vice versa) +-- 3) Using the value of _NET_ACTIVE_WINDOW, get the app name of the active window +-- 4) If the app name matches a certain criteria, turn off xcape (vice versa) -- -- The matching criteria in (4) are POSIX regular expressions. --