Logs: liberachat/#xmonad
| 2022-09-23 20:02:16 | <[Leary]> | You could define, say: prop `oneOf` ss = prop >>= (`elem` ss) |
| 2022-09-23 20:02:46 | <[Leary]> | Then you'd write: className `oneOf` ["mpv", "obs", "vlc"] --> ... |
| 2022-09-23 20:04:39 | <QNX> | Where would I define the prop? |
| 2022-09-23 20:07:32 | <[Leary]> | Top level is fine, or in a local where decl. Also, I don't think you should use `W.shift` in a ManageHook; that moves the focus rather than the window coming under management, and they're not always the same. |
| 2022-09-23 20:08:40 | <[Leary]> | It should be better to use something like `(doF . W.view <> doShift) "4"`; not sure what geekosaur has against it. |
| 2022-09-23 20:09:20 | <QNX> | https://bpa.st/VSOA#1L130 |
| 2022-09-23 20:09:24 | <QNX> | I did something like this |
| 2022-09-23 20:09:48 | <QNX> | I'm sorry I don't know haskell language at all well |
| 2022-09-23 20:12:24 | <floweynt[m]> | <geekosaur> "(they're `Maybe String`s)" <- they are X (Maybe String).. |
| 2022-09-23 20:12:25 | <floweynt[m]> | s/../.../ |
| 2022-09-23 20:12:51 | <geekosaur> | ok, that means lifting twice, sorrt |
| 2022-09-23 20:12:54 | <geekosaur> | *sorry |
| 2022-09-23 20:16:21 | <floweynt[m]> | could i get an example? I'm not actually that familiar with haskell |
| 2022-09-23 20:22:10 | <geekosaur> | I'm still trying to work it out myself π |
| 2022-09-23 20:22:22 | <[Leary]> | (liftA2 . liftA2) (++)? |
| 2022-09-23 20:22:34 | <[Leary]> | Or maybe just (<>). |
| 2022-09-23 20:22:38 | <[Leary]> | I don't know loggers. |
| 2022-09-23 20:23:30 | <geekosaur> | β’ Couldn't match expected type βX (Maybe [Char])β |
| 2022-09-23 20:23:30 | <geekosaur> | with actual type β(String -> String) |
| 2022-09-23 20:23:30 | <geekosaur> | -> (String -> String) -> Loggerβ |
| 2022-09-23 20:23:47 | <geekosaur> | (Logger is `X (Maybe String)`) |
| 2022-09-23 20:24:28 | <geekosaur> | (<>) same error |
| 2022-09-23 20:24:45 | <geekosaur> | trying to figure out how to apply it past X and Maybe |
| 2022-09-23 20:25:34 | <[Leary]> | :t (liftA2 . liftA2) (++) |
| 2022-09-23 20:25:35 | <lambdabot> | (Applicative f1, Applicative f2) => f1 (f2 [a]) -> f1 (f2 [a]) -> f1 (f2 [a]) |
| 2022-09-23 20:25:36 | <geekosaur> | oh wait, I'm using the wrong etst logger |
| 2022-09-23 20:25:58 | <floweynt[m]> | I think liftM2 $ liftM2 works |
| 2022-09-23 20:26:27 | <geekosaur> | *Main XMonad.Hooks.StatusBar XMonad.Util.Loggers Control.Applicative> :t (liftA2 . liftA2) (<>) logLayout XMonad.Util.Loggers.logTitle(liftA2 . liftA2) (<>) logLayout XMonad.Util.Loggers.logTitle |
| 2022-09-23 20:26:27 | <geekosaur> | :: X (Maybe String) |
| 2022-09-23 20:26:49 | <geekosaur> | complicated by the fact that I defined a `logTitle` in my own config that is unrelated to the one in X.U.Loggers |
| 2022-09-23 20:26:59 | <geekosaur> | but didn't think to import that qualified π |
| 2022-09-23 20:27:40 | <geekosaur> | hm, wonder where the first line split went |
| 2022-09-23 20:28:11 | <geekosaur> | anyway looks like (liftA2 . liftA2) (++) should work (import Control.Applicative if necessary for liftA2) |
| 2022-09-23 20:28:35 | <geekosaur> | was the first thing I tried but I chose the wrong logger and didn't read the error right, sigh |
| 2022-09-23 20:32:25 | <[Leary]> | QNX: Oh, looks like I gave you a type error; that should be: prop `oneOf` ss = prop <&> (`elem` ss) |
| 2022-09-23 20:32:35 | β | sogens joins (sogens@gateway/vpn/protonvpn/sogens) |
| 2022-09-23 20:33:38 | <QNX> | [Leary]: https://bpa.st/Y3TQ |
| 2022-09-23 20:34:12 | <[Leary]> | it's from Data.Functor |
| 2022-09-23 20:34:22 | <QNX> | Ok |
| 2022-09-23 20:34:41 | <QNX> | Ty |
| 2022-09-23 20:55:52 | β | dmrz joins (~dmr@c-71-202-36-200.hsd1.ca.comcast.net) |
| 2022-09-23 20:59:32 | <dmrz> | did xmonad ever add support for manual tiling as in the notion wm or similar? |
| 2022-09-23 21:03:08 | <geekosaur> | not currently |
| 2022-09-23 21:03:14 | <geekosaur> | pity, I have a use for it |
| 2022-09-23 21:03:39 | <dmrz> | i didn't think so |
| 2022-09-23 21:03:46 | <dmrz> | oh well |
| 2022-09-23 21:04:55 | <dmrz> | it's too bad b/c xmonad & related things (e.g. waymonad) have much more active development, and i'd switch if i could |
| 2022-09-23 21:05:21 | <dmrz> | it's weird how few tiling wm projects see the value in supporting manual tiling |
| 2022-09-23 21:06:52 | <dmrz> | like i don't think wayland is going to start being the standard to the exclusion of x any time soon (if ever), but if it did i'd be SOL |
| 2022-09-23 21:14:16 | <[Leary]> | The layout I use is kinda similar; it's written to avoid resizing windows except in ways I tell it to. |
| 2022-09-23 21:15:29 | <[Leary]> | I only support four "frames" though, and they move. I don't think the approach would generalise very well. |
| 2022-09-23 21:15:50 | <QNX> | https://bpa.st/MJDQ refactored file, in case you guys wanna look at it. |
| 2022-09-23 21:16:05 | <dmrz> | but it doesn't actually reify layouts, right? you just tell it not to update the layout |
| 2022-09-23 21:16:42 | <geekosaur> | I was trying to play with using BSP for that kind of thing but I managed to crash xmonad instead. apparently it doesn't like 30 `display`s running at once |
| 2022-09-23 21:17:01 | <geekosaur> | haven't tried it since, would prefer not to crash my session again π |
| 2022-09-23 21:18:55 | <[Leary]> | dmrz: I'm not sure I understand the question. I just implemented the logic in the layouting algorithm in such a way that window sizes are stable across certain changes like new/lost windows. |
| 2022-09-23 21:19:26 | <dmrz> | in notion, layouts exist whether they have windows in them or not |
| 2022-09-23 21:19:51 | <[Leary]> | They do in xmonad too. |
| 2022-09-23 21:20:04 | <geekosaur> | well, they do but they dont get run |
| 2022-09-23 21:20:22 | <geekosaur> | because runLayout takes a list of windows |
| 2022-09-23 21:20:55 | <geekosaur> | and X.O.windows zips the resulting list of Rectangles against the window list |
| 2022-09-23 21:21:10 | <[Leary]> | That's doLayout, right? runLayout always runs iirc. |
| 2022-09-23 21:21:22 | <geekosaur> | I may have them swapped |
| 2022-09-23 21:21:57 | <[Leary]> | The names aren't exactly helpful. |
| 2022-09-23 21:22:40 | <[Leary]> | Anyway, in my particular layout, it really does hold onto four sublayouts, each of which reserves a portion of the screen regardless of whether it's given windows. |
| 2022-09-23 21:22:44 | <geekosaur> | and I forgot about emptyLayout, but that at least proves that runLayout always happens |
| 2022-09-23 21:23:39 | <dmrz> | [Leary]: can you modify the sublayouts regardless of whether they have windows in them? |
| 2022-09-23 21:23:49 | <[Leary]> | But I have fancy expanding/centering logic that I can toggle dynamically, so it's not always wasted when empty. |
| 2022-09-23 21:23:49 | <geekosaur> | it just calls emptyLayout instead of doLayout if it's Nothing instead of Just |
| 2022-09-23 21:23:59 | <[Leary]> | dmrz: Yeah, I can send them any messages I want. |
| 2022-09-23 21:24:06 | <[Leary]> | That's not difficult. |
| 2022-09-23 21:24:49 | <dmrz> | but this is something you personally hacked together, not like a contrib-grade layout or similar? |
| 2022-09-23 21:25:19 | <geekosaur> | most of contrib is personally hacked together stuff π |
| 2022-09-23 21:25:37 | <[Leary]> | Yeah, a fair bit of it by me, too. |
| 2022-09-23 21:25:39 | <dmrz> | sure, i know code is written by humans tooo |
| 2022-09-23 21:26:02 | <[Leary]> | Well, the layout could go in contrib, but I'd need to clean it up. And it's /big/. |
| 2022-09-23 21:26:34 | <dmrz> | what i'm getting at is: i'm trying to guesstimate out how much effort it will take me to verify whether xmonad & this layout actually work the way i want them too or not |
| 2022-09-23 21:26:57 | <dmrz> | and then if they do, how much extra work it would take on top of that to turn them into the window manager i actually want |
| 2022-09-23 21:28:10 | <dmrz> | so if this layout that [Leary] refers too was just one of the standard xmonad layouts, i would expect that i could start it up in something like xnest & figure out pretty quickly if it was what i was hoping for or not |
| 2022-09-23 21:28:32 | <dmrz> | since it isn't...i mean, i used to know how to write haskell, but it's been a while |
| 2022-09-23 21:28:42 | <dmrz> | does that make sense? |
| 2022-09-23 21:30:50 | <[Leary]> | I mean, if always having exactly four frames is fine with you, then I think there's a reasonable chance it approaches what you want, since it's highly optimised and over-featured for that niche. |
| 2022-09-23 21:31:00 | <[Leary]> | But honestly I figured that would be a deal breaker. |
| 2022-09-23 21:32:09 | <dmrz> | literally that would be a dealbreaker, but i sort of assumed i'd have to do some work anyway |
| 2022-09-23 21:32:31 | <dmrz> | basically my real question is: can i turn xmonad into notion? |
| 2022-09-23 21:34:01 | <[Leary]> | I'm gonna say you can, if you have the cojones to write a monster layout, estimated 2kloc. |
| 2022-09-23 21:34:05 | <dmrz> | i assume i'd have to do some work to make that happen, but it's a question of whether it means adding a bunch of hacks onto an existing custom layout, or actually redesigning how layouts in xmonad work in general |
| 2022-09-23 21:34:49 | <dmrz> | i usually write code with my fingers, since i find that faster, but i suppose i could do it other ways if necessary |
| 2022-09-23 21:35:41 | <dmrz> | i hope my keyboard doesn't get too dirty |
| 2022-09-23 21:38:10 | <dmrz> | my real concern is what geekosaur said about "runLayout takes a list of windows" which conforms to my suspicion that what i actually want to do won't really work without changing that |
| 2022-09-23 21:38:46 | <geekosaur> | as I pointed out afterward, there's also an emptyLayout method that's run if there's no list of windows |
| 2022-09-23 21:38:54 | <geekosaur> | so you can do things in there |
| 2022-09-23 21:39:17 | <[Leary]> | I don't fully understand the not-ion deal, but I'm guessing it would come down to a kind of rose tree, where you have window leaves and layout branches. You'd need to duplicate the stack, storing the windows within your structure. |
| 2022-09-23 21:39:27 | <geekosaur> | runLayout is always run and by default calls doLayout if there are windows and emptyLayout otherwise |
| 2022-09-23 21:39:47 | <[Leary]> | The most difficult thing is dealing with the fact that windows are being created and destroyed while you (the layout) aren't looking. |
| 2022-09-23 21:40:30 | <[Leary]> | You need to figure out how to insert and delete them from the structure without ruining your properties. |
| 2022-09-23 21:42:15 | <[Leary]> | But that can be simplified if you fill all the appropriate hooks and wrap all appropriate actions, forcing them to notify the layout when you kill, move or open windows. |
| 2022-09-23 21:44:25 | <geekosaur> | (or hook the handleEventHook to look for the appropriate events) |
| 2022-09-23 21:44:58 | <geekosaur> | although that won't catch move between two hidden workspaces, but how common is that? |
| 2022-09-23 21:45:04 | <dmrz> | the "notion deal" is that the fact that you have 3 panes in some particular orientation has nothing to do with how many windows you have |
All times are in UTC.