Logs: liberachat/#xmonad
| 2022-10-21 14:20:13 | <xmonadtrack> | xmonad-contrib L. S. Leary https://github.com/xmonad/xmonad-contrib/pull/766 * v0.17.1-48-gfb721375: Write new module: X.U.History (69 minutes ago, 3 files, 77+ 0-) https://github.com/xmonad/xmonad-contrib/commit/fb72137537ce |
| 2022-10-21 14:20:22 | <xmonadtrack> | xmonad-contrib L. S. Leary https://github.com/xmonad/xmonad-contrib/pull/766 * v0.17.1-49-g64af74b0: Write new module: X.A.MostRecentlyUsed (49 minutes ago, 3 files, 170+ 0-) https://github.com/xmonad/xmonad-contrib/commit/64af74b0acaa |
| 2022-10-21 14:20:31 | <xmonadtrack> | xmonad-contrib L. S. Leary https://github.com/xmonad/xmonad-contrib/pull/766 * v0.17.1-50-gc8be1737: Adjust X.A.Repeatable docs to mention X.A.MRU (46 minutes ago, 1 file, 2+ 1-) https://github.com/xmonad/xmonad-contrib/commit/c8be1737f94b |
| 2022-10-21 14:34:01 | <[Leary]> | "Unsupported extension: GeneralisedNewtypeDeriving; Perhaps you meant 'GeneralizedNewtypeDeriving' or [...]" |
| 2022-10-21 14:34:10 | <[Leary]> | I forgot ancient GHC was american |
| 2022-10-21 14:36:07 | <geekosaur> | https://github.com/xmonad/xmonad-contrib/issues/767 |
| 2022-10-21 14:36:23 | <geekosaur> | `onCurrentScreen` really needs docs |
| 2022-10-21 14:57:54 | → | ^[ joins (~user@user//x-8473491) |
| 2022-10-21 15:04:05 | <thyriaen> | geekosaur, i found an issue with my configs |
| 2022-10-21 15:04:38 | <thyriaen> | when i move to my 2nd screen and what to give that screen focus but there is no window on it it does not receive focus - is there a way to do it ? |
| 2022-10-21 15:04:47 | <thyriaen> | ( i am using focus follows mouse ) |
| 2022-10-21 15:06:56 | <geekosaur[m]> | I have no idea. Focus follows. Mouse has a number of problems which are basically caused. By the way, x11 manages screens and it can't always tell that you've actually switched focus to a different screen |
| 2022-10-21 15:07:21 | <thyriaen> | i had to click on the background |
| 2022-10-21 15:07:24 | <geekosaur[m]> | Wow voice typing mangled that a bit |
| 2022-10-21 15:07:24 | <thyriaen> | that gave me focus |
| 2022-10-21 15:10:37 | <thyriaen> | could someone explain me this: https://hastebin.com/ewimawiwic.yaml |
| 2022-10-21 15:11:28 | <thyriaen> | i want to unbind mod-shift-w and mod-shift-r and just use mod-w and mod-r instead |
| 2022-10-21 15:12:41 | <thyriaen> | but i don't really understand most of it, for example .|. or this whole (f,m) i do know what the zip does but what is >>== or <- |
| 2022-10-21 15:17:09 | <geekosaur> | that's a list comprehension |
| 2022-10-21 15:18:10 | <geekosaur> | .|. is logical OR, combining your modMask with a separate modifier mask generated by the list comprehension. <- here can be read as `for` (Python-style) or as `taken from` |
| 2022-10-21 15:19:16 | <thyriaen> | .|. like || in other programming languages ? |
| 2022-10-21 15:19:50 | <geekosaur> | not quite. it'd be | in C or Java, as opposed to || which is Boolean OR |
| 2022-10-21 15:20:03 | <geekosaur> | maybe I should say bitwise OR instead of logical OR |
| 2022-10-21 15:20:03 | <thyriaen> | ah ok |
| 2022-10-21 15:20:20 | <thyriaen> | ( what is boolean or in haskell ? ) |
| 2022-10-21 15:20:36 | <geekosaur> | || and && do what you would expect for Boolean OR |
| 2022-10-21 15:20:42 | <thyriaen> | ok |
| 2022-10-21 15:20:53 | <geekosaur> | .&. and .|. are the bitwise versions, becausse | is taken |
| 2022-10-21 15:21:03 | <thyriaen> | what does | do in haskell ? |
| 2022-10-21 15:21:15 | <thyriaen> | because 2nd line in that expression it is needed for example |
| 2022-10-21 15:21:26 | <geekosaur> | you can read it as "where" or "such that". you can see it in the list comprehensions |
| 2022-10-21 15:22:01 | <thyriaen> | ah i use where sometimes |
| 2022-10-21 15:22:07 | <geekosaur> | a list comprehension in Haskell is [ expression | pattern <- list [, pattern <- list ...] [, condition] ] |
| 2022-10-21 15:22:11 | <thyriaen> | is it interchangable with where ? |
| 2022-10-21 15:22:17 | <geekosaur> | this is not the same as the keyword "where" though |
| 2022-10-21 15:22:21 | <thyriaen> | it is kinda like a mathematical | ? |
| 2022-10-21 15:22:28 | <geekosaur> | which is why I use "such that" instead |
| 2022-10-21 15:22:59 | <thyriaen> | { a ∈ R | a > 3 } |
| 2022-10-21 15:23:16 | <geekosaur> | actually I misspoke earlier,m "<-" is pythion "in", "|" is python "for" |
| 2022-10-21 15:23:19 | <geekosaur> | yes |
| 2022-10-21 15:23:25 | <thyriaen> | nice ! |
| 2022-10-21 15:23:40 | <[Leary]> | Isn't it more like "given"? "Such that" is kinda the wrong direction. |
| 2022-10-21 15:24:20 | <[Leary]> | Though I guess we write most of our programs backwards anyway. |
| 2022-10-21 15:24:24 | <thyriaen> | so (key, sc) <- zip [xK_w, xK_r] [0..] just takes a tuple and assigns stuff to it so it will be a list of tupples |
| 2022-10-21 15:25:13 | <geekosaur> | and >>= , hm, in this case you can think of it as something like a unix pipe. it runs the IO expression "screenWorkspace sc" and sends the result to "flip whenJust (windows . f)" which might be better understood as "\x -> whenJust x (windows . f)" |
| 2022-10-21 15:25:17 | <thyriaen> | [ (xK_w, 0), (xK_r,1) ] will be the result i guess ? |
| 2022-10-21 15:25:20 | <geekosaur> | @src flip |
| 2022-10-21 15:25:20 | <lambdabot> | flip f x y = f y x |
| 2022-10-21 15:25:55 | <geekosaur> | right, that just maps keys to screen numbers |
| 2022-10-21 15:26:43 | <thyriaen> | ok i guess i also understand the last line then |
| 2022-10-21 15:27:01 | <geekosaur> | then the other one actually does something with the screen number: looks up what workspace is on that screen, if it exists then perform a window transformation (windows . f) |
| 2022-10-21 15:27:23 | <geekosaur> | X.O.windows is what manipulates the window set and updates the screen |
| 2022-10-21 15:27:45 | <thyriaen> | i am sorry but i don't get it :. |
| 2022-10-21 15:27:48 | <thyriaen> | :/ |
| 2022-10-21 15:28:51 | <thyriaen> | where is the button defined ? |
| 2022-10-21 15:29:12 | <thyriaen> | ahhhhh |
| 2022-10-21 15:29:13 | <geekosaur> | f here comes from the second line. `W.view` (show workspace) is paired with a modifier of 0 (no modifier), `W.shift` (move window to workspace) is paired with `shiftMask` |
| 2022-10-21 15:29:17 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.7) |
| 2022-10-21 15:29:42 | <geekosaur> | and the button comes from the mapping of buttons to workspaces on the first line of the list comprehension |
| 2022-10-21 15:29:58 | <geekosaur> | this is somewhat tricky the way they interact |
| 2022-10-21 15:30:02 | <thyriaen> | i understand - we are creating 2-tuples with the first element of it being a tuple of buttons |
| 2022-10-21 15:30:14 | <thyriaen> | and the 2nd element is what should be done |
| 2022-10-21 15:30:16 | <geekosaur> | we are creating multiple 2-tuples |
| 2022-10-21 15:30:22 | <thyriaen> | yea |
| 2022-10-21 15:30:29 | <thyriaen> | but each element is a 2-tuple |
| 2022-10-21 15:30:52 | <thyriaen> | with the format ((button),todo) |
| 2022-10-21 15:31:03 | <geekosaur> | first 2-tuple is button and workspace, second is operation and modifier mask, then the list comprehension makes a Cartesian product of them |
| 2022-10-21 15:31:06 | <thyriaen> | and with ++ we append that list to all my other keys |
| 2022-10-21 15:31:25 | <geekosaur> | so every possible combination of 2-tuples is created |
| 2022-10-21 15:31:42 | <thyriaen> | ah |
| 2022-10-21 15:32:02 | <thyriaen> | i think i need to understand where the list comprehension is made |
| 2022-10-21 15:32:05 | <thyriaen> | and what it does |
| 2022-10-21 15:32:10 | <geekosaur> | and the expression at the start of the list comprehension combines them all together into an opreration |
| 2022-10-21 15:33:04 | <geekosaur> | the first (outdented) line of the list comp is the operation. it uses variables bound by each of the 2-tuples (i, k, f, m) |
| 2022-10-21 15:33:27 | <geekosaur> | second line gives you a tuple (i, k), third line gives you a tuple (f, m) |
| 2022-10-21 15:33:42 | <thyriaen> | that makes sense |
| 2022-10-21 15:33:51 | <thyriaen> | so |
| 2022-10-21 15:34:02 | <thyriaen> | i could also give a 4-tuple |
| 2022-10-21 15:34:06 | <thyriaen> | and it would do the same ? |
| 2022-10-21 15:34:16 | <geekosaur> | which is deconstructed because the tuple is a pattern "assigned to" by <- |
| 2022-10-21 15:34:20 | <thyriaen> | the last 2 lines just define key, sc, f andm |
| 2022-10-21 15:34:40 | <geekosaur> | you could but it'd not do what you want; they're done this way because they're related values |
| 2022-10-21 15:34:54 | <thyriaen> | i think i get it |
| 2022-10-21 15:35:10 | <geekosaur> | so i and k come from associating a key with a workspace, and f and m come from associating a modifier mask with a function |
| 2022-10-21 15:35:25 | <geekosaur> | that "associating" is why we use tuples |
| 2022-10-21 15:35:50 | <thyriaen> | what does worksapces' conf do ? |
| 2022-10-21 15:36:37 | <geekosaur> | `workspaces conf` looks up the list of workspaces from your config. `workspaces'` is similar but using virtual workspace names |
| 2022-10-21 15:36:58 | <thyriaen> | okay |
| 2022-10-21 15:37:03 | <geekosaur> | instead of the physical workspace names (0_1 etc.) that are in your config |
| 2022-10-21 15:37:11 | <thyriaen> | so one element would be |
| 2022-10-21 15:38:14 | <thyriaen> | ( shiftMask .|. modm, xK_1 ), windows $ onCurrentScreen W.greedyView "1" |
| 2022-10-21 15:38:48 | <geekosaur> | actually it'll be 0 instead of shiftMask |
| 2022-10-21 15:39:03 | <geekosaur> | shiftMask goes with W.shift, not W.greedyView |
| 2022-10-21 15:39:42 | <thyriaen> | ahhhh cartesian product |
| 2022-10-21 15:39:43 | <thyriaen> | ok |
| 2022-10-21 15:40:14 | <geekosaur> | that's not producted, that;s why those are tupled together so they'll be fixed. |
| 2022-10-21 15:40:27 | <thyriaen> | yea but later they are going to be |
| 2022-10-21 15:40:29 | <thyriaen> | it is what i ment |
| 2022-10-21 15:40:35 | <thyriaen> | so you will have all combinations |
| 2022-10-21 15:40:57 | <thyriaen> | the last has just two elemnts namely W.greedyView,0 and W.shift shiftmask |
All times are in UTC.