2025/03/07

2025-03-07 00:50:03 +0100ft(~ft@p3e9bc68d.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
2025-03-07 00:56:30 +0100ft(~ft@p508db291.dip0.t-ipconnect.de) ft
2025-03-07 01:32:56 +0100deepy(deepy@user/deepy) (Ping timeout: 244 seconds)
2025-03-07 02:03:22 +0100haskellbridge(~hackager@syn-024-093-192-219.res.spectrum.com) (Remote host closed the connection)
2025-03-07 02:07:24 +0100haskellbridge(~hackager@syn-024-093-192-219.res.spectrum.com) hackager
2025-03-07 02:14:57 +0100 <haskellbridge> <leana8959> Are there some elegant way to write a "ManageHook" that inserts a new window conditionally above or below, similar to "insertPosition" in xmonad-contrib?
2025-03-07 02:14:59 +0100 <haskellbridge> ... long message truncated: https://kf8nh.com/_heisenbridge/media/kf8nh.com/KlQYuThTveAIxAhkPPwEMITb/BLhzykEpiY8 (6 lines)
2025-03-07 02:16:18 +0100 <haskellbridge> <leana8959> * 2.
2025-03-07 02:18:47 +0100 <geekosaur> correct, if you inspect the StackSet from the manageHook (use liftX) you won't see the new window, because the manageHook is run as part of building an updated StackSet
2025-03-07 02:20:18 +0100 <geekosaur> but everything in the manageHook is a function which is passed the StackSet that's being built and returns a modified version (in the type, this is `Endo WindowSet`)
2025-03-07 02:24:41 +0100 <haskellbridge> <leana8959> Yeah, so I suppose I have do to the decision (whether above or below) and the shifting in one go, meaning that I can't reuse the code of "insertPosition" ?
2025-03-07 02:24:56 +0100 <haskellbridge> <leana8959> I'll figure that out tomorrow, it's kinda late. Thank you :)
2025-03-07 02:31:24 +0100 <Leary> leana8959: `Query` is a `Monad`; you can write e.g. `do { n <- numWindows; insertPosition Newer (if n <= 1 then Above else Below) }`.
2025-03-07 02:57:58 +0100Leary(~Leary@user/Leary/x-0910699) (Remote host closed the connection)
2025-03-07 03:11:52 +0100Leary(~Leary@user/Leary/x-0910699) Leary