Home liberachat/#xmonad: Logs Calendar

Logs on 2022-09-23 (liberachat/#xmonad)

00:04:29 <floweynt[m]> It seems like xmonad isn't setting the properties for xmobar stuff
00:15:47 <geekosaur> I think you'll need Solid; I don't know enough about that part of xmonad
00:16:42 <floweynt[m]> Solid?
00:17:21 <geekosaur> the dev who overhauled the statusbar stuff including dynamicSBs
01:01:45 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
01:17:03 × c209e6dc-4d76-47 quits (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Quit: Konversation terminated!)
01:36:28 benin06 joins (~benin@183.82.204.58)
01:37:36 × benin0 quits (~benin@183.82.204.58) (Ping timeout: 265 seconds)
01:37:36 benin06 is now known as benin0
01:39:50 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
02:03:42 × banc quits (banc@gateway/vpn/airvpn/banc) (Ping timeout: 265 seconds)
02:04:19 × benin0 quits (~benin@183.82.204.58) (Ping timeout: 246 seconds)
02:07:22 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
02:11:17 <floweynt[m]> I seem to have fixed the issue, now i am trying to figure out how to make xmonad treat a specific screen as the primary
02:21:34 × td_ quits (~td@94.134.91.59) (Ping timeout: 265 seconds)
02:22:57 td_ joins (~td@muedsl-82-207-238-210.citykom.de)
02:23:46 banc joins (banc@gateway/vpn/airvpn/banc)
02:26:57 benin0 joins (~benin@183.82.24.8)
02:43:08 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
02:45:20 <QNX> How many workspaces can you have in xmonad?
02:45:26 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
02:45:50 <QNX> I have currentoly 12, 0-9, and -,=, so 12
02:46:05 <floweynt[m]> i dont think xmonad cares
02:46:10 <QNX> Or I never tried dynamic workspaces
02:46:13 <QNX> you ever tried that
02:46:30 <floweynt[m]> nope
02:46:34 <QNX> https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/XMonad-Actions-DynamicWorkspaces.html
02:53:55 <floweynt[m]> any sentient haskell people want to tell me how to turn a `A -> X ( B -> C )` into a `X (A -> B -> C`
02:53:59 <floweynt[m]> * -> C)`
03:02:04 <Lears> floweynt[m]: The former is stronger; you can only go the other direction. What are you actually trying to do?
03:03:31 <floweynt[m]> when doing xmobar pretty-print stuff, i would like to do something that depends on the state but `ppCurrent` does not take X (WorkspaceId -> String)
03:09:34 <Lears> Doesn't look to be possible; `ppCurrent :: WorkspaceId -> String` is a pure function. You can produce that function dynamically utilising IO (or perhaps X), but once produced it's state-independent.
03:09:48 <Lears> But there might be another way to do what you want, I don't know.
03:26:55 <QNX> https://bpa.st/GAOA I can't get scratchpad to show up
03:27:08 <QNX> https://bpa.st/GAOA#1L164 added pad here
03:27:20 <QNX> https://bpa.st/GAOA#1L252 add manage hook here
03:27:28 <QNX> https://bpa.st/GAOA#1L376 add keybind here
03:27:40 <QNX> No errors at all, but when I do my key shortcut, pad doesn't open.
03:27:45 <QNX> What am I doing wrong?
03:27:49 <QNX> geekosaur: if you're around
03:29:29 <Lears> Based on the keybind directly above, you probably want "C-F1" to be "C-<F1>".
03:34:33 <QNX> Oh
03:35:03 <QNX> That did it
03:35:05 <QNX> Thanks
03:36:00 <QNX> Now xterm opens, but when it's visible, I do the same key again, and it doesn't go back to hidden workspace
03:38:12 steve_ joins (~steve@ool-182c2b80.dyn.optonline.net)
03:39:38 <QNX> it just opens another one instead of sending this back.
03:39:43 <QNX> Also if I use: NS "term" "xterm" (className =? "xterm") (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3))
03:40:01 <QNX> It still takes up full screen. DefuaultFloating also takes up full screen.
03:41:32 <Lears> I don't really know scratchpads, but it sounds like yours is malformed: it knows how to launch a window, but can't recognise it once open. Most likely `className =? "xterm"` isn't right.
03:43:06 <QNX> Allows to have several floating scratchpads running different applications. Bind a key to namedScratchpadSpawnAction. Pressing it will spawn configured application, or bring it to the current workspace if it already exists. Pressing the key with the application on the current workspace will send it to a hidden workspace called NSP.
03:43:18 <QNX> So I tried that
03:43:24 <QNX> , ("C-<F1>", namedScratchpadSpawnAction scratchpads "term")
03:43:29 <QNX> I get error that not a variable in scope
03:44:21 <QNX> spawnHereNamedScratchpadAction seems like this
03:44:40 <Lears> Looks like a documentation bug.
03:44:53 <QNX> ("C-<F1>", spawnHereNamedScratchpadAction scratchpads "term")
03:44:55 <Lears> Maybe a holdover from an earlier version.
03:44:57 <QNX> same thing, not ins cope.
03:45:07 <QNX> Maybe I'm doing something wrong
03:46:14 <Lears> You might not be using the same version of xmonad-contrib as the docs you're looking at; that one should exist.
03:46:21 <QNX> Oh
03:46:23 <QNX> I'm on .15
03:46:37 <Lears> In any case, `namedScratchpadAction` was probably fine.
03:46:57 <Lears> The issue, as I said, is probably in the ManageHook it uses to recognise the window.
03:47:11 <Lears> You have to check the xprops of your xterm and see what it actually shows.
03:47:54 <QNX> it's correct prop
03:48:09 <QNX> xterm
03:48:12 sagax joins (~sagax_nb@user/sagax)
03:48:35 <QNX> It just opens a new window each time, of xterm, on C-<F1>
03:48:42 <QNX> It doesn't send the opened xterm window to hidden WS
03:48:53 <QNX> It does spawn xterm though.
03:48:58 <QNX> Not sure what exactly is happening
03:49:12 <Lears> That only makes sense if the hook doesn't catch the window.
03:49:28 <QNX> I see
03:49:38 <Lears> You might need "XTerm"
03:49:43 <QNX> WM_CLASS(STRING) = "xterm", "XTerm"
03:49:48 <QNX> Ok
03:50:11 <QNX> there it does.
03:50:14 <QNX> there it goes.
03:50:21 <QNX> So peculiar why classname is case sensitive?
03:50:23 <QNX> Or what
03:50:55 <QNX> Means my doShifts won't work either, on lower case classnames. I should have copied the case sensitive one?
03:51:49 <Lears> It's a bit unfortunate, but that's just how `(=?)` is defined; it needs an exact match. There might be a case insensitive version floating around in contrib somewhere, or you can define your own.
03:52:35 <Lears> Something like `prop =?? s = prop <&> \p -> toLower p == toLower s`.
03:55:26 <QNX> No I mean why does xprop report two diff class names
03:55:36 <QNX> I expected either of them to work
03:55:45 <QNX> since both were reported by xprop
03:56:14 <Lears> I can't recall the details, but technically they're different properties or something, not just case variants.
03:56:35 <QNX> I see.
03:56:43 <QNX> Thanks man dude homie bro
03:57:04 <Lears> Only one of them (the second, apparently) is correct with `className`.
03:57:15 <QNX> I see.
04:12:46 × mvk quits (~mvk@2607:fea8:5ce3:8500::778c) (Ping timeout: 244 seconds)
04:24:42 × ft quits (~ft@p3e9bc57b.dip0.t-ipconnect.de) (Quit: Lost terminal)
04:27:44 × sogens quits (~sogens@pa49-197-130-227.pa.qld.optusnet.com.au) (Ping timeout: 265 seconds)
04:47:47 × steve_ quits (~steve@ool-182c2b80.dyn.optonline.net) (Ping timeout: 252 seconds)
04:57:05 sogens joins (sogens@gateway/vpn/protonvpn/sogens)
05:02:49 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 246 seconds)
05:09:29 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving)
05:42:17 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
06:15:27 <QNX> addScreenCorners [ (SCUpperLeft, namedScratchpadAction scratchpads "term") ]
06:15:43 <QNX> I added this to screen corners, and when I hit it with the mouse, nothing happens.
06:16:11 <QNX> https://bpa.st/44CQ here's the current xmonad.hs
06:16:37 <QNX> I don't get any errors, but I don't get the desired functionality
06:18:37 <Lears> Looks like you're not using the event hook.
06:19:27 <QNX> Oh
06:20:16 <QNX> I'm not sure how to add that
06:20:48 <QNX> XMonad.Hooks.EventHook I need this?
06:21:04 <Lears> The module should probably expose a config combinator, and it looks like it's also using XS where it should be XC... Must be pretty old.
06:21:47 <Lears> No, you just need to add `screenCornerEventHook` to your `handleEventHook` with (<>) AKA (<+>).
06:22:44 <QNX> Brilliant.
06:22:47 <QNX> Thank you!
06:22:55 <QNX> I don't understand any of this stuff at all!
06:23:13 steve_ joins (~steve@ool-182c2b80.dyn.optonline.net)
06:23:14 <QNX> I have no idea how I'm making do. No idea. Well, with you guys help! :)
07:33:59 <xmonadtrack> xmonad-contrib L. S. Leary * v0.17.1-19-gb9794e6a: Fix documentation bug in X.U.NSP (12 minutes ago, 1 file, 1+ 1-) https://github.com/xmonad/xmonad-contrib/commit/b9794e6a1384
07:54:33 <QNX> I have used stack to build Xmoand .17 and updated my PATH to include ~/.local/bin
07:54:47 <QNX> Should I now remove the distro packages of xmonad .15?
07:59:38 <QNX> I try to reload xmonad and it complains that xmonad is not in my path. hmm
07:59:49 <QNX> updated path on terminal, but i guess that's for that bash session and not global.
08:01:33 <QNX> stoned@stoned-desktop - ~/.config/xmonad - -
08:01:35 <QNX> $ xmonad --recompile
08:01:37 <QNX> XMonad will use ghc to recompile, because neither "/home/stoned/.xmonad/build" nor "/home/stoned/.xmonad/stack.yaml" exists.
08:01:39 <QNX> XMonad recompiling (forced).
08:01:41 <QNX> xmonad: ghc: runProc: exec: does not exist (No such file or directory)y
08:01:47 <QNX> They exist in ~/.config/xmoand though
08:01:50 <QNX> I'm confused.
08:04:37 <Lears> Some of the stuff that xmonad logs on recompile is of questionable accuracy, iirc. The issue there looks to be that it doesn't find `ghc` in your path.
08:05:41 <QNX> https://xmonad.org/INSTALL.html i folloowd this, then removed distro packages
08:05:49 <QNX> I did using stack
08:08:40 <QNX> The ~/.cache prefix is the $XDG_CACHE_HOME directory. Note that if your xmonad configuration resides within ~/.xmonad, then the executable will also be within that directory and not in $XDG_CACHE_HOME.
08:08:48 <QNX> maybe I should mv that
08:10:26 <QNX> after I mv ~/.xmonad to ~/.xmonad-back, I launch new xmoand and I get this https://bpa.st/S6DQ
08:10:34 × hrberg quits (~quassel@171.79-160-161.customer.lyse.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
08:10:48 hrberg joins (~quassel@171.79-160-161.customer.lyse.net)
08:13:41 <QNX> Could not find module ‘Data.Default’
08:13:51 <QNX> It complains about the import Data.Default line
08:15:32 <Lears> You probably don't need to import that.
08:18:01 <QNX> Ok
08:18:04 <QNX> I took out that line
08:18:10 <QNX> Now I get this https://bpa.st/BZSA
08:18:40 <QNX> https://bpa.st/GDTQ <- xmonad.hs current
08:19:11 <QNX> GridSelect
08:19:58 <Lears> You're updating two versions, it might pay to look over the changelog.
08:20:11 <QNX> What do you mean two versions?
08:20:15 <QNX> From .15 to .17?
08:20:21 <QNX> I see.
08:20:22 <Lears> Yes. But my best bet is, replace `defaut*` with `def`.
08:20:27 <QNX> I'm looking at the
08:20:31 <QNX> https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/XMonad-Actions-GridSelect.html
08:21:35 <QNX> Yeah, it changed things up
08:21:46 <QNX> compared .15 doc and .17 doc pages side by side
08:21:59 <QNX> binding thing is changed from GSConfig soemthing to def
08:26:32 <QNX> https://bpa.st/WVGA now these errors
08:26:48 <QNX> One by one heh
08:28:23 <QNX> Yay. I got it.
08:29:32 <QNX> Lears: thank you
08:33:00 <Lears> np
08:33:53 <QNX> https://bpa.st/WVGA#1L30 I get an error after making this recommended change: https://bpa.st/4PAA
08:35:26 <QNX> I fixed the rest of the errors
08:35:59 chomwitt joins (~chomwitt@2a02:587:dc14:f500:a8f6:62e0:a0fa:7808)
08:37:36 <Lears> Line 30 is complaining about the deprecated fullscreen evhook, not the other one.
08:40:28 <Lears> Luckily, deprecations all come with handy recommendations, though not necessarily drop-in replacements. I would see what the module has to say about the suggested replacement.
08:43:54 <QNX> ok thanks fixed
08:44:07 <QNX> , handleEventHook = focusOnMouseMove <+> screenCornerEventHook <- took it out of here
08:44:16 <QNX> xmonad $ docks $ ewmhFullscreen . ewmh $ def <- put it into here
08:44:31 <QNX> Updated to .17 and no more errors in config file.
08:44:34 <QNX> Brilliant.
09:00:15 × liskin[m] quits (~liskinmat@2001:470:69fc:105::768) (Quit: You have been kicked for being idle)
09:03:49 thyriaen joins (~thyriaen@2a02:8109:8340:686c:7383:e0e2:ad95:9fce)
09:18:53 realsun[m] parts (~realsunma@2001:470:69fc:105::2:7b7a) ()
09:57:36 <QNX> I would like to display/overlay an [x] button on corner of all windows, (not extra title bar space) so when clicked with mouse, just kills the window.
09:57:52 liskin[m] joins (~liskinmat@2001:470:69fc:105::768)
10:03:03 <Lears> If you mean to say that the solution via window decorations is no good, then I imagine you'd have to implement it yourself.
10:05:11 <QNX> https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/XMonad-Layout-ButtonDecoration.html
10:05:16 <QNX> I'm trying this
10:05:35 <QNX> Trying to figure out how to put this in the layouthook
10:12:34 <QNX> Oh yeah I see some screenshots
10:12:36 <QNX> No this is not what I'
10:12:40 <QNX> I'd like.
10:12:59 <QNX> Reason, it seems to create a whole new titlebar for each window, taking up prescious screen space.
10:13:18 <QNX> I just want to kind of overlay a [x] in the corner of every window, not as a title bar button
10:25:31 × sogens quits (sogens@gateway/vpn/protonvpn/sogens) (Ping timeout: 246 seconds)
10:42:49 <geekosaur> you would have to write something like that yourself. XMonad.Layout.DwmStyle might help, although it doesn't do what you want right now
10:46:27 <QNX> It's probably easier to put a button on my panel for xkill
10:57:57 <geekosaur> but where's the fun in thsat? 🙂
11:04:59 <QNX> looks like I'll have to learn me a haskell for great good
11:37:19 × fjMSX quits (~hypni2p@2.92.213.55) (Read error: Connection reset by peer)
11:58:45 fjMSX joins (~hypni2p@2.92.213.55)
12:25:13 ft joins (~ft@p3e9bc57b.dip0.t-ipconnect.de)
12:28:34 × coin_ex_exchange quits (~coinexexc@2001:470:69fc:105::2:87c8) (Quit: User was banned)
13:07:01 × benin0 quits (~benin@183.82.24.8) (Quit: The Lounge - https://thelounge.chat)
13:43:08 mesaoptimizer joins (apotheosis@user/PapuaHardyNet)
13:43:25 <mesaoptimizer> how do I map a keybind to either switch to or open an instance of a program?
13:46:27 <QNX> mesaoptimizer: I recently did this using NamedScratchPads, you don't have to float the window
13:46:54 <QNX> Then you can bind a key to show the scratchpad workspace
13:46:57 <QNX> If that's what you want
13:47:06 <geekosaur> https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/XMonad-Actions-WindowGo.html#v:runOrRaise
13:47:47 <QNX> Run or raise isn't a key shortcut to the actual app though
13:48:13 <QNX> But it does give you a little prompt where youcan type an app name, if it's already launched, it will switch to it, else it will run it.
13:48:13 × fjMSX quits (~hypni2p@2.92.213.55) (Read error: Connection reset by peer)
13:48:35 <QNX> But if you want a keyboard shortcut, that's probably with NamedScratchpads
13:48:52 <QNX> I'm also noob. :)
13:49:41 <geekosaur> no, because it can't auto-derive a Query Bool from a typed app name (see discussion of Firefox's name earlier in the file)
13:49:45 <QNX> Wait, this run or raise isn't the same
13:50:08 <geekosaur> first parameter is an app to run, second is a Query to identify a running instance window
13:50:23 <QNX> There is run/raise in prompts. I mistkenly thought that
13:50:36 <QNX> This is in Actions. I see.
13:53:52 fjMSX joins (~hypni2p@2.92.213.55)
14:00:12 <mesaoptimizer> beautiful, thank you
14:01:06 <mesaoptimizer> xmonad is probably the best experience I've had working with a software, even better than emacs. With emacs debugging configs is a pain that xmonad doesn't have.
14:05:14 <Lears> I should hope so, or all our static types and purity would be in vain. Emacs config is a great terrible monster of hooks in hooks in hooks and they're all dynamic and there are no types. Just remembering it makes me shiver.
14:06:31 <mesaoptimizer> Lears: you don't use emacs anymore? if so, what do you use instead?
14:07:23 <Lears> I retreated to vim.
14:09:06 <Lears> I gather vim-script isn't actually any better, but luckily, I find a more-or-less plain vim does everything I need.
14:09:34 <Lears> (and evil-mode really doesn't)
14:11:30 <mesaoptimizer> I consider vimscript strictly worse than elisp. I once spent a few months maintaining and upgrading a vim-taskwarrior fork and that convinced me I couldn't stick with vim and vimscript any longer
14:12:51 <floweynt[m]> why is xmobar failing to parse <action> tags
14:13:10 <QNX> Then we need an emacs and vim like editor with sane types in haskell
14:13:25 <geekosaur> yi exists but is currently not maintained
14:15:03 <geekosaur> floweynt[m], did you use the unsafe version of the xmobar operation (https://codeberg.org/xmobar/xmobar/src/branch/master/doc/plugins.org#headline-64)
14:15:33 <geekosaur> by default xmobar rejects most tags for safety, you have to explicitly request that it honor them
14:16:34 <Lears> QNX: People have tried, but it's not that easy. I tried to get into yi way back, but the design was poor and the functionality it offered was too lacking. rasa is a more likely replacement; haven't looked at that in a few years...
14:17:03 <floweynt[m]> geekosaur: yeah, i think that fixed it
14:28:41 × thunderrd quits (~thunderrd@183.182.111.127) (Remote host closed the connection)
14:35:32 uj[m] joins (~ujmatrixo@2001:470:69fc:105::2:888f)
14:36:39 thunderrd joins (~thunderrd@183.182.111.127)
15:26:50 <floweynt[m]> time to figure out "why the fuck won't xmonad float touhou project"
15:27:51 <geekosaur> https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/XMonad-Hooks-ManageDebug.html
15:46:38 <floweynt[m]> for some reason adding logLayout to ppExtras doesnt work
15:46:41 <floweynt[m]> this is very strange
15:47:35 <floweynt[m]> it prevents the entire status bar from updating
15:48:03 <geekosaur> when I get that ot usually means there's a bug in the markup and it confuses the status bar
15:48:15 <geekosaur> but in my case that's xmonad-log-applet
15:48:24 <geekosaur> *it
16:19:05 × Natch quits (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Remote host closed the connection)
16:31:28 Natch joins (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se)
16:42:44 berberman joins (~berberman@user/berberman)
16:55:25 × berberman quits (~berberman@user/berberman) (Quit: ZNC 1.8.2 - https://znc.in)
16:56:12 berberman joins (~berberman@user/berberman)
17:28:13 × Lears quits (~Leary]@user/Leary/x-0910699) (Remote host closed the connection)
17:29:04 [Leary] joins (~Leary]@user/Leary/x-0910699)
17:35:56 × mesaoptimizer quits (apotheosis@user/PapuaHardyNet) (Quit: mesaoptimizer)
17:36:07 mesaoptimizer joins (apotheosis@user/PapuaHardyNet)
18:09:48 × gauge_ quits (~gauge@user/gauge) (Quit: Quitting)
18:10:42 gauge joins (~gauge@user/gauge)
18:21:29 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
18:27:19 × gauge quits (~gauge@user/gauge) (Quit: Quitting)
18:28:04 gauge joins (~gauge@user/gauge)
19:20:31 <QNX> Hello. I have a need to do the following, but I can't remember how
19:20:48 <QNX> I want to switch to a workspace after a doShift
19:21:20 <QNX> If I doShift a window to for example, workspace 3:, then I would also like to switch to that workspace automtically
19:22:15 <geekosaur> doShift "3" <> view "3"
19:22:24 <geekosaur> hm, might need to reverse them
19:25:52 <QNX> I got error both ways: , className =? "dolphin" --> doShift "4:FileManager" <> W.view "4:FileManager"
19:26:07 <QNX> I tried W.view and also just view by itself
19:26:12 <QNX> I also tried both orders
19:26:48 <QNX> Variable view not in scope, perhaps I meant W. ?
19:26:55 <QNX> Is the error.
19:27:54 <QNX> https://hackage.haskell.org/package/xmonad-0.17.1/docs/XMonad-ManageHook.html I don't see a view function here
19:30:00 <QNX> https://bbs.archlinux.org/viewtopic.php?id=66854 trying to understand this
19:30:01 <geekosaur> it's in XMonad.StackSet which is what's normally imported as W
19:30:17 <QNX> Yes I ahve it imported as W
19:31:04 <geekosaur> oh, right, need the doF so you can't use doShift
19:31:37 <geekosaur> doF (W.shift "4" <> W.view "4") -- (or W.greedyView if you prefer)
19:32:56 <QNX> , className =? "dolphin" --> doF (W.shift "4:FileManager") <+> doF (W.greedyview "4:FileManager")
19:33:09 <QNX> I trid this too, without luck, I got error on W.view or W.greedyview not in scope
19:33:49 <QNX> import qualified XMonad.StackSet as W < I have this in there too
19:34:17 <geekosaur> don't combine the doF's like that, for one; I showed it the way I did for a reason
19:34:18 <QNX> I tried greedyView and I didn't get error
19:34:24 <QNX> Oh sorry ok
19:34:27 <QNX> I copied from the site I pasted
19:34:48 <geekosaur> but it sounds like you have some other problem as view and greedyView are both definitely in XMonad.StackSet and have been since xmonad 0.1
19:34:59 <QNX> I will paste my entire file
19:35:20 <floweynt[m]> can you compose loggers?
19:35:48 <QNX> https://bpa.st/RCRA xmonad.hs
19:35:53 <geekosaur> conmpose in what sense?
19:37:19 <QNX> I don't get error with W.greedyView (but I do if view is lower ase, with or without greedy)
19:38:45 <geekosaur> "W.greedyView" is correct, "W.greedyview" is not. "W.view" is correct. https://hackage.haskell.org/package/xmonad-0.17.1/docs/XMonad-StackSet.html#v:view
19:39:48 <QNX> I no longer have error with view or with greedyView
19:39:51 <QNX> Thank you
19:43:11 <floweynt[m]> <geekosaur> "conmpose in what sense?" <- concatenation
19:44:34 <geekosaur> liftA2 (++) logger1 logger2
19:44:53 <geekosaur> (they're `Maybe String`s)
19:45:28 <QNX> So you were correct in saying that view first, then shift, and it works.
19:54:36 × berberman quits (~berberman@user/berberman) (Ping timeout: 260 seconds)
19:57:41 <QNX> https://bpa.st/SO4A In this bit of code, how can I consolidate these all into one line using regex type stuff like ...
19:58:07 <QNX> like ("mpv" | "obs" | "vlc")
19:58:19 <QNX> Instead of having to do them on each line separately
19:58:40 <QNX> (or not regex) but how can I combine them into one
20:02:16 <[Leary]> You could define, say: prop `oneOf` ss = prop >>= (`elem` ss)
20:02:46 <[Leary]> Then you'd write: className `oneOf` ["mpv", "obs", "vlc"] --> ...
20:04:39 <QNX> Where would I define the prop?
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.
20:08:40 <[Leary]> It should be better to use something like `(doF . W.view <> doShift) "4"`; not sure what geekosaur has against it.
20:09:20 <QNX> https://bpa.st/VSOA#1L130
20:09:24 <QNX> I did something like this
20:09:48 <QNX> I'm sorry I don't know haskell language at all well
20:12:24 <floweynt[m]> <geekosaur> "(they're `Maybe String`s)" <- they are X (Maybe String)..
20:12:25 <floweynt[m]> s/../.../
20:12:51 <geekosaur> ok, that means lifting twice, sorrt
20:12:54 <geekosaur> *sorry
20:16:21 <floweynt[m]> could i get an example? I'm not actually that familiar with haskell
20:22:10 <geekosaur> I'm still trying to work it out myself 😕
20:22:22 <[Leary]> (liftA2 . liftA2) (++)?
20:22:34 <[Leary]> Or maybe just (<>).
20:22:38 <[Leary]> I don't know loggers.
20:23:30 <geekosaur> • Couldn't match expected type ‘X (Maybe [Char])’
20:23:30 <geekosaur> with actual type ‘(String -> String)
20:23:30 <geekosaur> -> (String -> String) -> Logger’
20:23:47 <geekosaur> (Logger is `X (Maybe String)`)
20:24:28 <geekosaur> (<>) same error
20:24:45 <geekosaur> trying to figure out how to apply it past X and Maybe
20:25:34 <[Leary]> :t (liftA2 . liftA2) (++)
20:25:35 <lambdabot> (Applicative f1, Applicative f2) => f1 (f2 [a]) -> f1 (f2 [a]) -> f1 (f2 [a])
20:25:36 <geekosaur> oh wait, I'm using the wrong etst logger
20:25:58 <floweynt[m]> I think liftM2 $ liftM2 works
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
20:26:27 <geekosaur> :: X (Maybe String)
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
20:26:59 <geekosaur> but didn't think to import that qualified 🙂
20:27:40 <geekosaur> hm, wonder where the first line split went
20:28:11 <geekosaur> anyway looks like (liftA2 . liftA2) (++) should work (import Control.Applicative if necessary for liftA2)
20:28:35 <geekosaur> was the first thing I tried but I chose the wrong logger and didn't read the error right, sigh
20:32:25 <[Leary]> QNX: Oh, looks like I gave you a type error; that should be: prop `oneOf` ss = prop <&> (`elem` ss)
20:32:35 sogens joins (sogens@gateway/vpn/protonvpn/sogens)
20:33:38 <QNX> [Leary]: https://bpa.st/Y3TQ
20:34:12 <[Leary]> it's from Data.Functor
20:34:22 <QNX> Ok
20:34:41 <QNX> Ty
20:55:52 dmrz joins (~dmr@c-71-202-36-200.hsd1.ca.comcast.net)
20:59:32 <dmrz> did xmonad ever add support for manual tiling as in the notion wm or similar?
21:03:08 <geekosaur> not currently
21:03:14 <geekosaur> pity, I have a use for it
21:03:39 <dmrz> i didn't think so
21:03:46 <dmrz> oh well
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
21:05:21 <dmrz> it's weird how few tiling wm projects see the value in supporting manual tiling
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
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.
21:15:29 <[Leary]> I only support four "frames" though, and they move. I don't think the approach would generalise very well.
21:15:50 <QNX> https://bpa.st/MJDQ refactored file, in case you guys wanna look at it.
21:16:05 <dmrz> but it doesn't actually reify layouts, right? you just tell it not to update the layout
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
21:17:01 <geekosaur> haven't tried it since, would prefer not to crash my session again 🙂
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.
21:19:26 <dmrz> in notion, layouts exist whether they have windows in them or not
21:19:51 <[Leary]> They do in xmonad too.
21:20:04 <geekosaur> well, they do but they dont get run
21:20:22 <geekosaur> because runLayout takes a list of windows
21:20:55 <geekosaur> and X.O.windows zips the resulting list of Rectangles against the window list
21:21:10 <[Leary]> That's doLayout, right? runLayout always runs iirc.
21:21:22 <geekosaur> I may have them swapped
21:21:57 <[Leary]> The names aren't exactly helpful.
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.
21:22:44 <geekosaur> and I forgot about emptyLayout, but that at least proves that runLayout always happens
21:23:39 <dmrz> [Leary]: can you modify the sublayouts regardless of whether they have windows in them?
21:23:49 <[Leary]> But I have fancy expanding/centering logic that I can toggle dynamically, so it's not always wasted when empty.
21:23:49 <geekosaur> it just calls emptyLayout instead of doLayout if it's Nothing instead of Just
21:23:59 <[Leary]> dmrz: Yeah, I can send them any messages I want.
21:24:06 <[Leary]> That's not difficult.
21:24:49 <dmrz> but this is something you personally hacked together, not like a contrib-grade layout or similar?
21:25:19 <geekosaur> most of contrib is personally hacked together stuff 🙂
21:25:37 <[Leary]> Yeah, a fair bit of it by me, too.
21:25:39 <dmrz> sure, i know code is written by humans tooo
21:26:02 <[Leary]> Well, the layout could go in contrib, but I'd need to clean it up. And it's /big/.
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
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
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
21:28:32 <dmrz> since it isn't...i mean, i used to know how to write haskell, but it's been a while
21:28:42 <dmrz> does that make sense?
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.
21:31:00 <[Leary]> But honestly I figured that would be a deal breaker.
21:32:09 <dmrz> literally that would be a dealbreaker, but i sort of assumed i'd have to do some work anyway
21:32:31 <dmrz> basically my real question is: can i turn xmonad into notion?
21:34:01 <[Leary]> I'm gonna say you can, if you have the cojones to write a monster layout, estimated 2kloc.
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
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
21:35:41 <dmrz> i hope my keyboard doesn't get too dirty
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
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
21:38:54 <geekosaur> so you can do things in there
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.
21:39:27 <geekosaur> runLayout is always run and by default calls doLayout if there are windows and emptyLayout otherwise
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.
21:40:30 <[Leary]> You need to figure out how to insert and delete them from the structure without ruining your properties.
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.
21:44:25 <geekosaur> (or hook the handleEventHook to look for the appropriate events)
21:44:58 <geekosaur> although that won't catch move between two hidden workspaces, but how common is that?
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
21:45:59 <dmrz> you can put windows into those panes or take them out, and putting multiple windows into a pane causes them to follow a tabbed layout
21:47:09 <dmrz> so the tabbed sublayouts should probably work exactly how they normally do in xmonad
21:47:56 <dmrz> but the primary layout should not have anything to do with the number of windows
21:49:22 <dmrz> and of course you can take one of those primary layout panes and split it in half, and then the two child panes are now both tabbed sublayouts
21:50:49 <[Leary]> Rose tree with tabbed leaves and BSP branches ... wait, can't you already do that with sublayouts? <.<
21:52:16 <dmrz> i'm not totally sure
21:52:40 <dmrz> you definitely couldn't many years ago when i switched to notion, but i have no idea what xmonad has done since then
21:58:28 berberman joins (~berberman@user/berberman)
22:06:01 <[Leary]> Well I guess you'd have to extend BSP with an option to preserve its internal structure even when it doesn't have "windows" (tab groups) to fill it. After that, I think you'd be pretty close. Either way I'm done for the day; good luck.
22:08:02 <dmrz> [Leary]: real quick: is your custom layout on github or anything? it's ok if it's not very clean, won't ask you about it today
22:12:32 <geekosaur> sublayouts was what I was wondering
22:13:01 <geekosaur> (but I'm making dinner now so will only be spottily available)
22:53:15 <dmrz> so if it was just a question of the primary layout, it looks like i could create an ExtensionClass inst which stored the set of panes, their coordinates, and which windows were assigned to them, and then this layout would implement doLayout to just read the pane coordinates from XConfig.extensibleConf and return [cs, w] for all windows w in the pane with coordinates cs
22:54:01 <dmrz> on the theory that sublayouts just kinda picks that return value up and overrides it with some other set of [cs, w] return vals based on the sublayout, that would work
22:55:09 <dmrz> but that depends on how sublayouts actually works, which i'm not sure of
22:55:17 <dmrz> but something in that vague neighborhood would work
22:56:59 <dmrz> it definitely wouldn't be 2K LOC, although when you added all the keybind defs necessary to invoke the management fns it wouldn't be tiny either
22:57:58 <dmrz> if anyone who really knows how sublayouts works & how it interacts with the top-level layout happens to stumble by & see this, @ me or something; i'll be around
23:03:28 berberman_ joins (~berberman@user/berberman)
23:04:19 × berberman quits (~berberman@user/berberman) (Ping timeout: 246 seconds)
23:29:25 × noex quits (~null@user/noex) (Quit: :q!)
23:41:59 × thyriaen quits (~thyriaen@2a02:8109:8340:686c:7383:e0e2:ad95:9fce) (Quit: Leaving)
23:49:22 mvk joins (~mvk@2607:fea8:5ce3:8500::778c)

All times are in UTC on 2022-09-23.