Logs: liberachat/#xmonad
| 2022-08-05 09:48:22 | <xmonadgooood> | which redirected me to: |
| 2022-08-05 09:48:28 | <xmonadgooood> | https://github.com/samhh/dotfiles/commit/d9e28572c7a413b83d09e21e54ec653f5dfba251 |
| 2022-08-05 09:48:37 | <xmonadgooood> | do i try this fix? |
| 2022-08-05 09:50:44 | <[Leary]> | I don't know what that's trying to fix, you'd have to show me the reddit post for me to figure it out. It's probably not relevant. |
| 2022-08-05 09:51:33 | <xmonadgooood> | https://www.reddit.com/r/xmonad/comments/ky5yzp/popup_window_changes_underlying_focus/ |
| 2022-08-05 09:53:32 | <[Leary]> | It sounds like they're just applying the config in a slightly abnormal way, most likely just because their config was a bit abnormal already. |
| 2022-08-05 09:54:10 | <[Leary]> | Anyway, if there's a simple way to write the action modifier with what's exposed by RefocusLast then I'll write it, just give me a while. |
| 2022-08-05 09:54:24 | <xmonadgooood> | umm okay |
| 2022-08-05 09:54:36 | <xmonadgooood> | ill create a libera chat account till then |
| 2022-08-05 09:54:42 | <xmonadgooood> | i don't want to miss texts |
| 2022-08-05 09:56:25 | → | zim0369 joins (~zim0369@42.107.88.1) |
| 2022-08-05 10:04:50 | × | zim0369 quits (~zim0369@42.107.88.1) (Quit: Client closed) |
| 2022-08-05 10:05:14 | → | zim0369 joins (~zim0369@42.107.88.1) |
| 2022-08-05 10:05:53 | <zim0369> | This is my new acc. [Leary] |
| 2022-08-05 10:06:05 | <zim0369> | ping me whenever you have the fix |
| 2022-08-05 10:06:25 | <zim0369> | I don't know if libera saves texts after logging out and logging back in |
| 2022-08-05 10:06:35 | × | xmonadgooood quits (~xmonadgoo@42.107.88.1) (Quit: Client closed) |
| 2022-08-05 10:09:15 | <[Leary]> | zim0369: Try this: https://gist.github.com/LSLeary/399475bd7c5b063a5ff623730db64adb |
| 2022-08-05 10:09:36 | <[Leary]> | Note that it's completely untested; it might not even compile. |
| 2022-08-05 10:11:21 | <zim0369> | where does the "thenrefocus.." line go? |
| 2022-08-05 10:12:07 | <zim0369> | also, is this part at the end of the main function correct? |
| 2022-08-05 10:12:08 | <zim0369> | keys = refocusLastKeys <> keys def |
| 2022-08-05 10:12:08 | <zim0369> | } |
| 2022-08-05 10:12:09 | <zim0369> | `additionalKeysP` myKeys |
| 2022-08-05 10:12:09 | <zim0369> | where -- refocusLast stuff |
| 2022-08-05 10:12:10 | <zim0369> | myPred = refocusingIsActive <||> isFloat |
| 2022-08-05 10:12:47 | <zim0369> | I have `keys` part inside the def override block as well as at the end infront of `additionalKeysP`. |
| 2022-08-05 10:12:50 | <zim0369> | is that correct? |
| 2022-08-05 10:14:13 | <[Leary]> | It goes at the top level. |
| 2022-08-05 10:15:05 | <[Leary]> | And I don't see anything wrong there, you're just using two different ways to add new keybindings to the defaults. |
| 2022-08-05 10:15:36 | <[Leary]> | You could simplify it by merging `refocusLastKeys` into `myKeys` using the emacs syntax, but let's not fix what isn't broken. |
| 2022-08-05 10:16:59 | <zim0369> | okay |
| 2022-08-05 10:17:24 | <zim0369> | i prolly placed 'thenrefocus...' line in the wrong place |
| 2022-08-05 10:17:28 | <zim0369> | where exactly? |
| 2022-08-05 10:18:04 | <zim0369> | https://paste.tomsmeding.com/w8S42c1v |
| 2022-08-05 10:20:25 | <[Leary]> | That looks correct, but `rlPred` isn't a predefined value, it's a predicate like `myPred` which you define in the where block of `main`. Perhaps just raise that to the top level and use that. |
| 2022-08-05 10:22:08 | <zim0369> | ugh.. still nope |
| 2022-08-05 10:22:27 | <zim0369> | } |
| 2022-08-05 10:22:27 | <zim0369> | `additionalKeysP` myKeys |
| 2022-08-05 10:22:28 | <zim0369> | where -- refocusLast stuff |
| 2022-08-05 10:22:28 | <zim0369> | thenRefocusAfter :: Query Bool -> X a -> X a |
| 2022-08-05 10:22:29 | <zim0369> | p `thenRefocusAfter` act = do |
| 2022-08-05 10:22:29 | <zim0369> | tag <- gets (W.currentTag . windows) |
| 2022-08-05 10:22:30 | <zim0369> | refocus <- refocusWhen p tag |
| 2022-08-05 10:22:30 | <zim0369> | act <* windows refocus |
| 2022-08-05 10:22:31 | <zim0369> | myPred = refocusingIsActive <||> isFloat |
| 2022-08-05 10:22:32 | <zim0369> | like this? |
| 2022-08-05 10:24:46 | <[Leary]> | No, that was fine at the top level. Move `myPred` there instead, so they're both in the global scope. |
| 2022-08-05 10:25:03 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::d5f2) |
| 2022-08-05 10:25:21 | <[Leary]> | And then use `myPred` instead of `rlPred`. |
| 2022-08-05 10:25:29 | <[Leary]> | In `myKeys`. |
| 2022-08-05 10:28:59 | <zim0369> | Current state: https://paste.tomsmeding.com/6azhXE3K |
| 2022-08-05 10:29:00 | <zim0369> | compilation error: https://imgur.com/a/Hxr6vLi |
| 2022-08-05 10:30:49 | <[Leary]> | Oops. `windows` there on line 31 should be `windowset`. |
| 2022-08-05 10:32:27 | <zim0369> | compiled successfully but that fix isn't working |
| 2022-08-05 10:33:54 | <[Leary]> | Are you testing it with M-o? I notice you didn't apply the modifier to M-i. |
| 2022-08-05 10:36:26 | <zim0369> | oh |
| 2022-08-05 10:36:28 | <zim0369> | im so sorry |
| 2022-08-05 10:36:31 | <zim0369> | im so dumb |
| 2022-08-05 10:36:33 | <zim0369> | it works |
| 2022-08-05 10:36:36 | <zim0369> | absolutely well |
| 2022-08-05 10:36:51 | <[Leary]> | :) |
| 2022-08-05 10:37:08 | <zim0369> | let me check it out my checklist now |
| 2022-08-05 10:37:12 | <zim0369> | great!!! |
| 2022-08-05 10:37:31 | <zim0369> | wait |
| 2022-08-05 10:37:39 | <zim0369> | umm |
| 2022-08-05 10:37:46 | <zim0369> | the focus doesn't follow the scratchpad |
| 2022-08-05 10:38:22 | <zim0369> | m-o brings up the scratchpad but it's not in focus |
| 2022-08-05 10:40:26 | <[Leary]> | I guess the scratchpad actions are toggles? That complicates things a bit; the refocusing action is running both when you summon and when you dismiss, which I guess is messing up the former. |
| 2022-08-05 10:41:07 | <[Leary]> | The predicate should be able to distinguish the two cases... Ugh. |
| 2022-08-05 10:41:22 | <[Leary]> | It really is a bit of a mess. |
| 2022-08-05 10:43:04 | <zim0369> | i was thinking this would work: |
| 2022-08-05 10:43:06 | <zim0369> | ("M-o", sequence_ [myPred `thenRefocusAfter` namedScratchpadAction scratchpads "scratch", toggleFocus]), |
| 2022-08-05 10:43:21 | <zim0369> | but it also works while sinking the scratchpad lol |
| 2022-08-05 11:00:33 | <[Leary]> | zim0369: I updated the gist, have another look. |
| 2022-08-05 11:02:24 | <zim0369> | this line correct? |
| 2022-08-05 11:02:25 | <zim0369> | isScratchPad :: NamesScratchPads -> Query Bool |
| 2022-08-05 11:02:33 | <zim0369> | NamesScratchPads |
| 2022-08-05 11:02:46 | <[Leary]> | Named* I suppose. |
| 2022-08-05 11:03:03 | <zim0369> | yea |
| 2022-08-05 11:03:25 | <zim0369> | It could be either one of NamedScratchPads or NamedScratchPad |
| 2022-08-05 11:03:29 | <zim0369> | but using any of em |
| 2022-08-05 11:03:37 | <zim0369> | gives compilation error |
| 2022-08-05 11:03:55 | <zim0369> | not in scope: type constructor or class 'NamedScratchPads' |
| 2022-08-05 11:04:04 | <zim0369> | perhaps you meant one of these: |
| 2022-08-05 11:04:11 | <zim0369> | 'NamedScratchpads |
| 2022-08-05 11:04:22 | <zim0369> | okay wait |
| 2022-08-05 11:04:28 | <zim0369> | corrected and compiled successfully |
| 2022-08-05 11:05:44 | <zim0369> | umm |
| 2022-08-05 11:05:46 | <zim0369> | nope |
| 2022-08-05 11:06:00 | <zim0369> | the scratchpad is still unfocused |
| 2022-08-05 11:07:52 | <[Leary]> | Can you show me the state of your config? |
| 2022-08-05 11:08:28 | <zim0369> | https://paste.tomsmeding.com/IIfydNs9 |
| 2022-08-05 11:09:56 | <[Leary]> | Yes, you need to switch out `myPred` on line 141 to use the new predicate like in the example. |
| 2022-08-05 11:10:30 | <[Leary]> | Binding something at the top level never affects anything else, it just makes that value available for use. |
| 2022-08-05 11:17:09 | <zim0369> | ` ("M-o", myPred `thenRefocusAfter` namedScratchpadAction scratchpads "scratch"), |
| 2022-08-05 11:17:10 | <zim0369> | ` |
| 2022-08-05 11:17:21 | <zim0369> | so this line is incorrect? |
| 2022-08-05 11:17:32 | <zim0369> | what do i have to replace myPred with? |
| 2022-08-05 11:17:48 | <zim0369> | oh okay |
All times are in UTC.