Make it work under xmonad and Docker#32
Conversation
Under xmonad, `xdotool getactivewindow` fails with
Your windowmanager claims not to support _NET_ACTIVE_WINDOW, so the attempt to query the active window aborted.
xdo_get_active_window reported an error
despite claiming to be 'reliable than getwindowfocus'.
|
Looks good! Related to #34. |
|
Hi i want to merge this but I'm worried about the sleep times: sleep $windowLength
sleep .5 #make sure that all `xinput test` finishedsince |
|
@karpathy I guess you are right. I think it would be safe to drop the |
|
It's not clear to me what two sleeps in a row accomplish. Alternatively the first one could be set to 8.5? I don't think I fully understand the intent here. |
|
I did not actually test whether I need the two sleep, but the reasoning:
There could be some race condition, so I sleep a little bit more (.5s) to wait for the files. I just wanted to make this explicit with the 2 consecutive sleeps. BTW, yes with this 1/17th of the keystrokes are lost :) |
This change removes the sudo dependency. Note: inside a Docker container showkey does not work.
|
Updated (learned some bash). My original intention was this, but did not know about |
|
|
|
Your PR has additional features (and I'm lazy to check/test them), so would leave the credit :). You can take these ideas (or fork my branch), if you would like. |
First, thanks for the great project!
To use it with my window manager (xmonad) and under Docker (so I can remove the network access, check also (In)Security) I needed some changes (in sort: using only X11-tools).
I have some strong feelings against this pull request, as I wanted something more elegant.
It comes with the 'works for me (TM)' warranty; in particular I don't have any lock screen/screensaver.
Whether you merge it or no, I hope someone can profit form this PR.