Commits
- Commit:
c21d6eaf97dbcc03bbf6bd90096349dba8e1b071
- From:
- Omar Polo <op@omarpolo.com>
- Date:
grabkey only on the targeted windows
now we grabkey() only on the window that matches what the user
requested. That is, given
match class 'Firefox'
on "C-n" do "<Down>"
we only bind C-n on windows that match the class Firefox, and not on
the root window as we did before.
In order to do this, we traverse the tree during startup and grabkey
on matching windows, than we subscribe also to SubstructureNotify so
that when a window gets mapped we receive an event.
There are still some downsides to this. Firefox uses also
'/usr/local/lib/firefox/firefox' as class name on my machine, and
sometimes it seems like we don’t grab the key at the first try (maybe
Firefox changes the class after the window gets mapped?)
- Commit:
c85d4bf338efd6371825dfe51680c62ee65be408
- From:
- Omar Polo <op@omarpolo.com>
- Date:
make grabkey accept the target window as parameter
This is needed so we can later grabkey on particular window and not on
the root one.
- Commit:
2eb11d8ec14963a978a1811f5d0beca158d64f50
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rework send_fake: copy as much as possible from the original event
send_fake now copies almost all field from the original event, except
for the the window, keycode and state field.
When we grab a key we grab it onto the root window, so every event we
receive has a field window that is equal to the root. (this will
change in the future), so we need to change that.
The keycode and state obviously need to be changed, it's the whole
point of the function.
It doesn't seem to fix the known bug that occur in dino thought.
- Commit:
e0041ee5139dcd4173fe8f47ff691c0d41951341
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add exec action for keys
users can now exec command on specifics keys. For example:
match class Something
on "C-<F5>" do exec my-program
- Commit:
13cc0916743705e32211da7fcf5499197e36e883
- From:
- Omar Polo <op@omarpolo.com>
- Date:
improved error messages
yyerror now is a printf-like variadic function. This helps to
generate custom error message like "invalid keysym %s" or "invalid key
%s" during parsing.
- Commit:
9f53ba9bae9aee077aa72cbc3fb5af6d27d20ec2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add ``match *'' to match everything
Rationale: sometimes it can be useful to globally bind a key. For
instance, some users may like to bind
on "C-<Up>" do "<Page_Up>"
for every application.
- Commit:
fe0dcf4e2d945f528e2af9cbfc9d8eadb3b571bd
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add an error handler
the default error handler violates the pledge "stdio" by trying to
read (and possibly also write after) some files. Also, I don't like
my program to be randomly killed if I try to get class hints on a
window that doesn't have any.
- Commit:
e573cb09321087dc40dc088a53a9e079a31ecfe5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
initial commit