Should arbtt still be working with i3 window manager?
Joachim Breitner
mail at joachim-breitner.de
Mon Apr 23 14:50:34 CEST 2012
Dear JOKer,
Am Montag, den 23.04.2012, 01:01 +0200 schrieb JOKer:
> I've read in the release notes of 0.4.1, that arbtt should be/has been
> usable with i3:
> > In the absence of _NET_CLIENT_LIST, look for application windows as
> > children of the root windows. This should work for users of window
> > managers like i3 without EWHM support.
>
> If this should still be the case, I'd like to know what I'm doing wrong.
> I'm only getting output like this from arbtt-dump:
> TimeLogEntry {tlTime = 2012-04-22 22:30:16.254658 UTC, tlRate = 60000,
> tlData = CaptureData {cWindows = [], cLastActivity = 581}}
> TimeLogEntry {tlTime = 2012-04-22 22:31:16.265074 UTC, tlRate = 60000,
> tlData = CaptureData {cWindows = [], cLastActivity = 47}}
>
> If not, is there a way to make it work again (other than hacking EWHM
> support into i3)? I'd really like to try this program.
Hmm, looking at the code I don’t think this works any more. I’m happy to
add working support for i3, as long as someone provides me with a
patch :-)
The patch that should have added this functionality is
[Be smarter when figuring out what window is active
Joachim Breitner <mail at joachim-breitner.de>**20090928181800
Ignore-this: 83d2e4798327b65d9678d8dc64c071f7
Thanks to CJ van den Berg for the investigation.
] hunk ./src/Capture.hs 22
- (fwin,_) <- getInputFocus dpy
+ (fsubwin,_) <- getInputFocus dpy
+ fwin <- followTreeUntil dpy (`elem` cwins) fsubwin
+
hunk ./src/Capture.hs 38
+-- | Follows the tree of windows up until the condition is met or the window is
+-- a direct child of the root.
+followTreeUntil :: Display -> (Window -> Bool) -> Window -> IO Window [_$_]
+followTreeUntil dpy cond = go
+ where go w | cond w = return w
+ | otherwise = do (r,p,_) <- queryTree dpy w
+ if r == p then return w
+ else go p [_$_]
+
And this probably broke it:
[Fix possible cause for crashes
Joachim Breitner <mail at joachim-breitner.de>**20091008173228
Ignore-this: f051cdb62c622e441b69946343ab8aab
] hunk ./src/Capture.hs 38
--- | Follows the tree of windows up until the condition is met or the window is
--- a direct child of the root.
+-- | Follows the tree of windows up until the condition is met or the root
+-- window is reached.
hunk ./src/Capture.hs 44
- if r == p then return w
+ if p == 0 then return w
But I don’t recall why the original code crashed...
Greetings,
Joachim
--
Joachim "nomeata" Breitner
mail at joachim-breitner.de | nomeata at debian.org | GPG: 0x4743206C
xmpp: nomeata at joachim-breitner.de | http://www.joachim-breitner.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.nomeata.de/pipermail/arbtt/attachments/20120423/9c3579a7/attachment.asc>
More information about the arbtt
mailing list