2024/06/14

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