Home liberachat/#xmonad: Logs Calendar

Logs on 2024-06-14 (liberachat/#xmonad)

02:43:34 × terrorjack quits (~terrorjac@2a01:4f8:c17:87f8::) (Quit: The Lounge - https://thelounge.chat)
02:47:47 terrorjack joins (~terrorjac@2a01:4f8:c17:87f8::)
02:53:48 × td_ quits (~td@i53870929.versanet.de) (Ping timeout: 256 seconds)
02:55:32 td_ joins (~td@i53870931.versanet.de)
03:31:51 <haskellbridge> <iqubic (she/her)> geekosaur: Is there a better way to provide types for layouts than just listing out everything?!?! Or is the answer that I just need to cry?
03:31:53 <haskellbridge> ... long message truncated: https://kf8nh.com/_matrix/media/v3/download/kf8nh.com/KBZQKAtOElBBlOyBBAoZIwYd (3 lines)
03:32:16 <geekosaur> cry, or make an LSP client do it for you
03:32:40 <haskellbridge> <iqubic (she/her)> Got it... I'm not gonna specify types for this.
03:32:58 <haskellbridge> <iqubic (she/her)> Also, why did the haskell bridge react to that message?
03:33:04 <geekosaur> (sadly, while they'll happily write out the type signature, they don't add the imports needed for it to work)
03:33:38 <haskellbridge> <iqubic (she/her)> I know what you mean. I'm just not gonna add the type signature there...
03:33:47 <geekosaur> one emote means it split it into separate lines for IRC, the other means it was too long so it pastebinned it
03:34:08 <haskellbridge> <iqubic (she/her)> Oh? Is this channel bridged to IRC?
03:34:18 <geekosaur> yes
03:34:37 <geekosaur> #xmonad on libera
03:42:25 <haskellbridge> <iqubic (she/her)> Where's the default layoutHook defined?
03:43:24 <geekosaur> https://github.com/xmonad/xmonad/blob/master/src/XMonad/Config.hs#L135-L149
03:45:07 <haskellbridge> <iqubic (she/her)> I mainly just wanted to have the default values for Tall, because I like those defaults.
03:46:29 <haskellbridge> <iqubic (she/her)> Do I need to have any special imports to get the Tall, Mirrored, and Full data constructors in scope, or are those defaults?
03:46:53 <geekosaur> you should get those with `import XMonad`
03:47:36 <geekosaur> which re-exports everything exported by the core modules, except for XMonad.StackSet which collides with Prelude functions (by convention we import that qualified as W when needed)
03:48:10 <haskellbridge> <iqubic (she/her)> Why do we use W? Why is that the letter we use?
03:49:05 <geekosaur> I think you'd have to ask Spencer about that
03:49:21 <geekosaur> I think he's in #haskell:matrix.org as @SpencerJanssen
03:49:41 <haskellbridge> <iqubic (she/her)> Is it work it to use X.L.WindowNavigation ?
03:50:08 <haskellbridge> <iqubic (she/her)> s/work/worth
03:52:31 <geekosaur> depends. I don't, but I usually don't have enough visible windows in a workspace to justify it
03:57:26 <haskellbridge> <iqubic (she/her)> I'm wanting to use X.L.Combo, which advocates using X.L.WindowNavigation for some reason...
03:58:35 <geekosaur> that's so you can easily move windows between panes
03:58:50 <geekosaur> by binding keys to send Move messages
03:59:43 <geekosaur> the alternative is to use ComboP, which lets you automatically assign windows to panes using what amounts to a ManageHook
04:00:35 <geekosaur> (WindowNavigation is what defines and implements Move)
04:09:40 <haskellbridge> <iqubic (she/her)> Wait... actually, I do want ComboP.
04:10:48 <haskellbridge> <iqubic (she/her)> Why does ComboP also advocate for WindowNavigation?
04:10:57 geekosaur is heading to bed soon… past midnight and he got maybe 4 hours of sleep last night
04:12:14 <geekosaur> because you might want to move a window later
04:13:05 <haskellbridge> <iqubic (she/her)> Oh... I thought ComboP forced you to have all matching windows in the Master Pane.
04:13:40 <geekosaur> only at first
04:14:35 <haskellbridge> <iqubic (she/her)> That's the part I was missing. Thanks.
04:14:35 <geekosaur> when a new window appears, windows that match the Property will go to the master, others to the slave. if you also include WindowNavigation then you can arbitrarily move windows afterward
04:32:41 <haskellbridge> <iqubic (she/her)> If I want to send a message to just one of the sub-layouts in a ComboP layout? How can I do that? It looks like ComboP sends messages to the super layout and both sub-layouts. https://github.com/xmonad/xmonad-contrib/blob/master/XMonad/Layout/ComboP.hs#L127
06:21:16 × ft quits (~ft@p3e9bcb39.dip0.t-ipconnect.de) (Quit: leaving)
08:30:42 cfricke joins (~cfricke@user/cfricke)
08:47:24 ChubaDuba joins (~ChubaDuba@37.112.230.146)
08:52:38 rascasse joins (~rascasse@user/diep)
09:18:13 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 268 seconds)
09:31:48 cfricke joins (~cfricke@user/cfricke)
10:22:36 × rascasse quits (~rascasse@user/diep) (Ping timeout: 256 seconds)
11:22:01 rascasse joins (~rascasse@user/diep)
12:34:03 ChubaDuba_ joins (~ChubaDuba@5.166.233.249)
12:36:29 × ChubaDuba quits (~ChubaDuba@37.112.230.146) (Ping timeout: 240 seconds)
13:11:44 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2)
13:13:07 Digit joins (~user@user/digit)
13:40:32 × ChubaDuba_ quits (~ChubaDuba@5.166.233.249) (Quit: Leaving)
13:52:54 ft joins (~ft@p3e9bcb39.dip0.t-ipconnect.de)
14:21:43 × rascasse quits (~rascasse@user/diep) (Remote host closed the connection)
14:51:59 cfricke joins (~cfricke@user/cfricke)
15:24:47 <geekosaur> XMonad.Layout.MessageControl, I think
15:42:53 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 240 seconds)
15:47:11 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> any way of generating a cool keybinding list/diagram like the one available at the xmonad website?
16:01:24 <geekosaur> someone recently asked where the code for generating that diagram was and we couldn't find it
16:01:58 <geekosaur> I know it at least used to be out there, because it was used to add the mod-shift-/ binding back in 0.9
16:48:40 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> ic
16:58:52 <geekosaur> don't see it in the archived old repo either
18:15:07 <haskellbridge> <iqubic (she/her)> How does X.L.MessageControl work? How would I use that with Combo?
19:00:07 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> i wish we have a repo listing a lot of user's config, so we could look up what people have done so far
19:00:27 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> this would mitigate (partially) the problem of "how i do X or Y?"
19:51:21 <geekosaur> we had one but it's bitrotted (https://wiki.haskell.org/Xmonad/Config_archive). there's a stalled ticket on updating it (https://github.com/xmonad/xmonad-contrib/issues/160)
19:59:02 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> thanks
20:02:44 <geekosaur> the main developers (liskin, Solid, and myself) have links to our configs in the README. (if you think mine's complex, wait until you see liskin's…)
20:04:22 <geekosaur> iqubic: it wraps messages intended for sublayouts. you send a wrapped message, and modify (or wrap) the sublayout to unescape it
20:04:28 <geekosaur> it's not especially friendly
20:04:48 <geekosaur> but the interaction of layouts and messages is a somewhat tricky part of xmonad
20:08:14 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> im using a package that can limit the number of visible windows to 2 , and i thought it was hacky, lol
20:08:27 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> * module
20:11:07 <geekosaur> it's not that hacky
20:11:28 <geekosaur> it's a pretty simple thing to do in runLayout
20:12:18 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> i suck at haskell, so it was a bit hard for me
20:13:23 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> https://kf8nh.com/_matrix/media/v3/download/aria-net.org/ifjTdCcENkCmtTguQXqrMNFc/image.png
20:13:50 <geekosaur> yes
20:16:00 <haskellbridge> <iqubic (she/her)> I would like to look at liskin's config, but I can't seem to find it.
20:36:08 <geekosaur> oh, sorry, it's at the end of the tutorial, not the readme. https://github.com/liskin/dotfiles/tree/home/.xmonad
21:06:12 dysthesis joins (~dysthesis@user/dysthesis)
21:07:46 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> geekosaur: i stopped caring about red-shift after getting red glasses...
21:08:21 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> i think im okay with the actual state of my config, just wanted to see which cool things others user are using
21:08:47 <haskellbridge> <柱間 (@senju_hashirama:aria-net.org)> i changed to xmonad because stumpwm has not so hackable to me, and xmonad did an awesome job
21:33:47 <geekosaur> no, awesome's the other one 😛
22:06:16 <haskellbridge> <adamame> I was wondering, is there a function in xmonad contrib like runOrRaise but it checks for a window with a given class in the current workspace only?
22:06:47 <haskellbridge> <iqubic (she/her)> Does "additionalKeysP" let me do key chords? For example: something like "M-a s" to trigger a command. That's "Mod + a then s" to invoke a command.
22:06:53 <haskellbridge> <iqubic (she/her)> * That would be
22:09:14 <geekosaur> yes. but I wouldn't call that a chord; that would be holding down mod, a, and s all together
22:09:49 <geekosaur> (which isn't supported by the core; you'd have to do it in a handleEventHook)
22:10:40 <geekosaur> basically as you wrote it. see for example https://github.com/geekosaur/xmonad.hs/blob/hilfy-2023/xmonad.hs#L225
22:10:50 <geekosaur> (mod-control-C, u, e)
22:11:57 <haskellbridge> <iqubic (she/her)> Yeah, I'm looking at that, and wondering what exactly that's do it.
22:12:31 <haskellbridge> <iqubic (she/her)> *wondering exactly what that does
22:13:00 <geekosaur> press mod-control-c, release, press and release u, press and release e
22:13:13 <geekosaur> through the magic of XMonad.Actions.Submap
22:13:52 <haskellbridge> <iqubic (she/her)> Oh, I need XMonad.Actions.Submap? Got it. Will I need to change the call to "additionalKeysP"?
22:14:19 <geekosaur> no, you don't need it, EZConfig builds Submaps for you
22:15:06 <haskellbridge> <iqubic (she/her)> Does it import the required modules, or will I need to do that myself?
22:15:09 <geekosaur> it assigns M-C-c to a Submap, then adds entries to it for any other binding starting with M-C-c
22:15:22 <geekosaur> you don't need to import it since you don't manipulate it directly
22:15:39 <haskellbridge> <iqubic (she/her)> Thanks.
22:29:43 <haskellbridge> <iqubic (she/her)> Does "additionalKeysP" care about the order I put the modifiers? Will "M-C-a" be the same as "C-M-a"? I assume, because it just combines them into a bitmask, the answer is that order doesn't matter, but I'm not sure.
22:37:56 <geekosaur> order doesn't matter
22:38:23 <geekosaur> the only rule is that it can't combine keys defined another way, including via multiple additionalKeys / additionalKeysP calls
22:38:55 <geekosaur> because they generate code, which can't be introspected so there's no way to combine keymaps generated by separate operations
22:43:26 <haskellbridge> <iqubic (she/her)> Thanks
22:49:45 <haskellbridge> <iqubic (she/her)> Would using a list comprehension like this work? https://dpaste.com/5V3HCF6MZ
22:49:57 <haskellbridge> <iqubic (she/her)> This uses X.L.WindowNavigation
22:50:44 <haskellbridge> <iqubic (she/her)> I assume it would, because Haskell is a good language.
22:50:57 <geekosaur> looks like it
22:52:20 <haskellbridge> <iqubic (she/her)> It's creating "M-<U>", "M-S-<U>", and "M-S-C-<U>" bindings for all 4 directions that send the correct window navigation messages.
22:55:20 <geekosaur> looks like it's the right type, at least
22:57:31 <haskellbridge> <iqubic (she/her)> It is. There might be some parse errors, but at least it compiles.
23:00:24 <haskellbridge> <iqubic (she/her)> Hmm... I'm looking to get to create a keybinging that jumps to layout "Full", but also remembers what the previous layout is so I can jump back to that when I hit the same keybinding again. Would that be possible, and is that just what X.L.Maximize does already?
23:01:06 <geekosaur> Maximize isn't quite the same thing
23:01:23 <haskellbridge> <iqubic (she/her)> What does Maximize do?
23:01:37 <geekosaur> you probably want https://hackage.haskell.org/package/xmonad-contrib-0.18.0/docs/XMonad-Layout-ToggleLayouts.html
23:01:57 <geekosaur> it pops the window out of the layout and makes it _almost_ full screen
23:02:22 <haskellbridge> <iqubic (she/her)> geekosaur: That's not what I want.
23:02:42 <geekosaur> https://imgur.com/F0qNKBg.png
23:08:20 <haskellbridge> <iqubic (she/her)> What I want is something like toggle layout, but I can swap to it from any layout. Like if I'm in a Tabbed layout and I switch to a Full layout, I want to be able to switch back to the Tabbed layout. But if I'm Tall, then I want that to be remembered so that when I switch to Full and back again, I want to return to the Tall layout.
23:09:25 <geekosaur> right, that's ToggleLayouts or MultiToggle
23:10:42 <haskellbridge> <iqubic (she/her)> MultiToggle is what I want. Thanks!
23:11:10 <geekosaur> if all you want is a single toggle, ToggleLayouts is much easier
23:11:20 <geekosaur> MultiToggle makes you deal with HLists
23:12:30 <haskellbridge> <iqubic (she/her)> Oh? I just want the ability to swap to Full and back again.
23:13:20 <geekosaur> that's the example in ToggleLayouts documentation
23:13:38 <geekosaur> myLayout = toggleLayouts Full (Tall 1 (3/100) (1/2)) ||| etc..
23:14:08 <haskellbridge> <iqubic (she/her)> Yeah, but that seems to imply that you can only swap between Full and Tall.
23:14:26 <geekosaur> you did see the |||?
23:14:58 <geekosaur> toggleLayouts someLayout (a list of layouts here with |||/Choose between them, as usual)
23:15:21 <haskellbridge> <iqubic (she/her)> I think I'm getting confused by the fixity here. I kept assuming that the given example was the same as this:
23:16:03 <haskellbridge> <iqubic (she/her)> myLayout = (toggleLayouts Full (Tall nmaster delta initialWidth)) ||| etc..
23:17:30 <geekosaur> oh, hm, that is a bad example
23:18:34 <haskellbridge> <iqubic (she/her)> Do you have a better one?
23:19:48 <geekosaur> toggleLayouts Full $ Tall nmaster delta initialWidth ||| Mirror (Tall nmaster delta initialWidth) ||| Full
23:20:10 <geekosaur> I don't think \limiting it to the first layout like the parens there do is particularly useful
23:20:44 <haskellbridge> <iqubic (she/her)> No... but that's how I'm reading what the given example does.
23:21:26 <geekosaur> yes, that's' what it's doing. as an example it's pretty useless
23:21:43 <geekosaur> why would you ever want it to only apply to the first of a list of layouts?
23:22:24 <haskellbridge> <iqubic (she/her)> Does function application bind at a higher precedence than the infix Choose operator? According to all that I know about Haskell the answer should be yes.
23:22:33 <geekosaur> yes
23:22:44 <geekosaur> the only thing that binds tighter is record update syntax
23:23:38 <haskellbridge> <iqubic (she/her)> Oh. I didn't know that.
23:34:52 <haskellbridge> <iqubic (she/her)> Is it a good idea to run unGrab before spawning my screen locker?
23:35:46 <geekosaur> yes, because xmonad retains its key grab while the command is running so keys don't leak to the focused window if it's a Submap or GridSelect or etc.
23:36:13 <geekosaur> but screen lockers also grab the keyboard so they'll error out
23:37:03 <geekosaur> you could also sleep for half a second before running the locker, which is the old workaround, but unGrab is cleaner
23:37:14 <geekosaur> and doesn't suffer from race conditions
23:37:50 <haskellbridge> <iqubic (she/her)> Awesome!!!
23:41:25 <haskellbridge> <iqubic (she/her)> Wait... wrong WM

All times are in UTC on 2024-06-14.