Home liberachat/#xmonad: Logs Calendar

Logs on 2022-03-24 (liberachat/#xmonad)

00:08:25 × steve__ quits (~steve@ool-182c2b80.dyn.optonline.net) (Ping timeout: 250 seconds)
00:29:17 iqubic joins (~iqubic@2601:602:9502:c70:3fd6:e10b:8510:80f0)
00:30:28 <iqubic> What's the best way to get xmonad and xmobar up and running on NixOS?
00:30:42 liskin[m] joins (~liskinmat@2001:470:69fc:105::768)
00:31:38 <iqubic> And what's the best way to get my config working on NixOS. I've decided that Arch+Haskell is too much of a pain, so I'm going back to NixOS.
00:32:26 mvk joins (~mvk@2607:fea8:5cc3:7e00::7980)
00:43:51 thunderrd joins (~thunderrd@183.182.111.150)
01:22:03 × thunderrd quits (~thunderrd@183.182.111.150) (Remote host closed the connection)
01:26:33 × Benzi-Junior quits (~BenziJuni@88-149-64-179.du.xdsl.is) (Quit: ZNC 1.8.2 - https://znc.in)
01:42:15 × iqubic quits (~iqubic@2601:602:9502:c70:3fd6:e10b:8510:80f0) (Ping timeout: 256 seconds)
02:05:48 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
02:07:38 geekosaur joins (~geekosaur@xmonad/geekosaur)
02:15:58 × noex quits (~null@user/noex) (Quit: :q!)
02:20:11 noex joins (~null@user/noex)
03:02:47 × banc quits (~banc@217.138.195.27) (Ping timeout: 252 seconds)
03:15:56 × abradabara quits (~abradabar@185.183.97.187) (Quit: Lost terminal)
03:21:34 banc joins (~banc@217.138.195.27)
03:42:57 × terrorjack quits (~terrorjac@static.3.200.12.49.clients.your-server.de) (Quit: The Lounge - https://thelounge.chat)
03:45:24 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
03:57:18 iqubic joins (~iqubic@2601:602:9502:c70:4972:31d7:97ba:4e3e)
04:44:53 × iqubic quits (~iqubic@2601:602:9502:c70:4972:31d7:97ba:4e3e) (Quit: Client closed)
05:19:03 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 256 seconds)
05:40:05 × benin quits (~benin@183.82.207.30) (Quit: The Lounge - https://thelounge.chat)
05:43:45 benin joins (~benin@183.82.207.30)
06:25:17 × Hash quits (~Hash@hey.howstoned.ru) (Ping timeout: 240 seconds)
06:50:49 bfrk joins (~Thunderbi@i59F7ABBC.versanet.de)
06:59:14 Hash joins (~Hash@hey.howstoned.ru)
07:13:19 × mvk quits (~mvk@2607:fea8:5cc3:7e00::7980) (Ping timeout: 260 seconds)
07:32:47 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
07:38:19 × Natch quits (~natch@c-67bae255.014-297-73746f25.bbcust.telenor.se) (Remote host closed the connection)
07:43:41 Natch joins (~natch@c-67bae255.014-297-73746f25.bbcust.telenor.se)
07:58:14 cfricke joins (~cfricke@user/cfricke)
08:22:09 <CodeBitCookie[m]> <lyiriyah[m]> "In what way doesn't X.A...." <- > It spawns all programs on the current workspace.
08:22:53 <lyiriyah[m]> CodeBitCookie[m]: How were you using it?
08:27:22 mc47 joins (~mc47@xmonad/TheMC47)
09:12:35 <CodeBitCookie[m]> lyiriyah: I just replaced SpawnToWorkspace with SpawnOn
09:12:46 <CodeBitCookie[m]> so like:
09:13:13 <CodeBitCookie[m]> ``spawnOn "2:2" "nyxt &"``
09:13:49 <CodeBitCookie[m]> sorry for the late replies
10:01:00 × Natch quits (~natch@c-67bae255.014-297-73746f25.bbcust.telenor.se) (Ping timeout: 272 seconds)
10:12:51 × haskl quits (~haskl@user/haskl) (Ping timeout: 245 seconds)
10:13:26 Natch joins (~natch@c-67bae255.014-297-73746f25.bbcust.telenor.se)
10:21:32 lb9di is now known as MrElendig
10:23:18 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
10:23:37 geekosaur joins (~geekosaur@xmonad/geekosaur)
10:26:31 <Solid> CodeBitCookie[m]: that & is probably confusing spawnOn
10:26:39 <Solid> try removing it
10:36:12 haskl joins (~haskl@user/haskl)
10:39:16 <fizzie> If that's a browser (as it seems), and it does the usual browser thing (of having a process unrelated to the executed command-line tool be the one that "owns" the windows, at least when there's already one running), it's inherently SpawnOn-incompatible.
10:41:33 <fizzie> Of course the easier problem would be that if you literally only changed `spawnToWorkspace` to `spawnOn`, that means you didn't add the `manageSpawn` manageHook that it needs to work (too).
10:43:08 <Solid> I think they already have that added
10:43:42 <Solid> (I remember looking for that a few days ago when hastily looking through the config)
10:43:46 <CodeBitCookie[m]> yup I already added that.
10:48:25 <fizzie> For the other problem, a test for that would be to do something like ` sh -c 'echo $$; exec nyxt' ` in a terminal, and compare the PID it printed out with what running `xprop _NET_WM_PID` and clicking the newly opened window says. If those are two different numbers, it's never going to work with spawnOn.
10:50:09 <fizzie> Likewise for `emacs --daemon && emacsclient -c` which definitely will have a different process for the daemon than the shell started by spawn.
10:52:29 × Natch quits (~natch@c-67bae255.014-297-73746f25.bbcust.telenor.se) (Ping timeout: 256 seconds)
10:55:03 Natch joins (~natch@c-67bae255.014-297-73746f25.bbcust.telenor.se)
10:55:40 <fizzie> (For those kinds of windows, XMonad.Hooks.ToggleHook's `hookNext` is one possible solution, though it's got its own race condition in that it will apply the given operation to the next window spawned, whatever it is. So spawnOn's definitely nicer for "regular" programs.)
10:57:48 <lyiriyah[m]> Could probably filter by class to decide whether to use `hookNext` or `spawnOn`
11:17:27 <CodeBitCookie[m]> <fizzie> "Likewise for `emacs --daemon..." <- no it still shows 1 number
11:17:32 <CodeBitCookie[m]> all applications show one number
11:17:51 <CodeBitCookie[m]> <lyiriyah[m]> "Could probably filter by class..." <- Show what am I supposed to do"
11:17:55 <CodeBitCookie[m]> s/"/?/
11:18:18 <lyiriyah[m]> Give me a sec.
11:19:07 <geekosaur> CodeBitCookie[m], the problem is it's showing the wrong number
11:19:37 <geekosaur> we get a number back from spawnOn. It has to maytch the _NET_WM_PID property of the resulting window for spawnOn to work
11:20:15 <geekosaur> putting stuff inb the background, launching emacsclient,etc., will guaranteed get you the wrong number
11:21:28 <geekosaur> in the case of emacsclient, it's because we get the number from emacsclient but the window is opened by and has the _NET_WM_PID of the emacs --server process
11:23:26 <CodeBitCookie[m]> <Solid> "CodeBitCookie: that & is..." <- Apparently not. I removed everything to startup and put this line: ``spawnOn "2" myBrowser`` Still didn't work.
11:23:48 <CodeBitCookie[m]> > <@Solid:libera.chat> CodeBitCookie: that & is probably confusing spawnOn
11:23:48 <CodeBitCookie[m]> * Apparently not. I replaced everything to startup with this line: `spawnOn "2" myBrowser` Still didn't work.
11:23:49 <lambdabot> <hint>:1:1: error: parse error on input ‘<@’
11:24:02 <CodeBitCookie[m]> * Apparently not. I replaced everything to startup with this line: `spawnOn "2" myBrowser` Which still didn't work.
11:25:18 <CodeBitCookie[m]> geekosaur: So should I seperate emacs into two lines?
11:25:23 <CodeBitCookie[m]> s/seperate/separate/
11:25:44 <CodeBitCookie[m]> Also, even if that's the problem, why doesn't it work with just my browser.
11:25:45 <fizzie> In case of spawnOn "emacs --daemon && emacsclient -c", I imagine what spawnOn gets back is the PID of the shell launched to handle the command line, not even the emacsclient process. But still, it's different from that of the window, is the point.
11:25:50 <CodeBitCookie[m]> lambdabot: Huh?
11:25:53 <geekosaur> you've been told multiple times that browsers don't work at all
11:27:01 <geekosaur> you have to use hookNext with a browser; the number we get is for a background process that spawns foreground processes that open windows, for security reasons
11:33:20 <geekosaur> also,why are you trying to talk to a bot?
11:33:21 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.4.1)
11:33:38 <geekosaur> "> " line prefix evaluates an expression
12:08:28 <CodeBitCookie[m]> <geekosaur> "also,why are you trying to..." <- geekosaur: Oh, Whoops. Didn'
12:08:31 <CodeBitCookie[m]> * Whoops. Didn't really think about that.
12:09:00 <CodeBitCookie[m]> <geekosaur> "you have to use hookNext with..." <- sooooo, replace SpawnOn with HookNext?
12:09:01 <geekosaur> > foldr (*) z [a,b,c]
12:09:03 <lambdabot> a * (b * (c * z))
12:09:36 <geekosaur> you also have to import XMonad.Hooks.ToggleHook, as fizzie said
12:10:06 <geekosaur> browsers are just annoying, although sadly they have good reason to be annoying
12:15:46 <abastro[m]> Hm what could I do with a single wine window showing as multiple windows?
12:16:00 <abastro[m]> It causes stutter in tiling
12:19:44 <CodeBitCookie[m]> <geekosaur> "> foldr (*) z [a,b,c]" <- What do you mean/
12:19:46 <CodeBitCookie[m]> > <@geekosaur:libera.chat> > foldr (*) z [a,b,c]
12:19:46 <CodeBitCookie[m]> * What do you mean?
12:19:47 <lambdabot> <hint>:1:1: error: parse error on input ‘<@’
12:21:48 allbery_b joins (~geekosaur@xmonad/geekosaur)
12:21:48 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
12:21:52 allbery_b is now known as geekosaur
12:21:54 <abastro[m]> A supposedly single window by wine app occupying multiple slots.
12:22:29 <abastro[m]> Only rendered on one slot, not rendered on other slots.
12:43:02 × lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection)
12:45:57 lambdabot joins (~lambdabot@haskell/bot/lambdabot)
12:48:53 × noex quits (~null@user/noex) (Ping timeout: 268 seconds)
12:48:57 <Solid> ...what?
12:49:39 noex joins (~null@user/noex)
12:50:40 <geekosaur> that sounds like a failed copyWindow or something
12:53:17 <geekosaur> mm, don't know how to fix offhand but you could use XMonad.Hooks.DebugStack to verify it
12:53:36 <geekosaur> actually, if that'sthe actual problem thenkillAllOtherCopies should fix
12:53:49 <geekosaur> * then killAllOtherCopies
12:56:21 <abastro[m]> Interesting, let me try that
13:23:45 × bfrk quits (~Thunderbi@i59F7ABBC.versanet.de) (Ping timeout: 252 seconds)
13:25:43 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 260 seconds)
14:25:06 × benin quits (~benin@183.82.207.30) (Quit: Ping timeout (120 seconds))
14:30:07 benin joins (~benin@183.82.207.30)
14:33:54 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
14:33:54 allbery_b joins (~geekosaur@xmonad/geekosaur)
14:33:57 allbery_b is now known as geekosaur
14:56:24 × benin quits (~benin@183.82.207.30) (Quit: Ping timeout (120 seconds))
15:01:17 benin joins (~benin@183.82.207.30)
15:14:03 × benin quits (~benin@183.82.207.30) (Quit: Ping timeout (120 seconds))
15:14:22 benin joins (~benin@183.82.207.30)
15:33:09 bfrk joins (~Thunderbi@2001:9e8:35a:5100:856a:b99d:e3e6:3974)
15:33:51 cfricke joins (~cfricke@user/cfricke)
16:00:50 × liskin[m] quits (~liskinmat@2001:470:69fc:105::768) (Quit: You have been kicked for being idle)
16:17:10 banc- joins (banc@gateway/vpn/airvpn/banc)
16:17:11 × twiclo quits (~twiclo@mail.twil.cx) (Ping timeout: 256 seconds)
16:18:06 × banc quits (~banc@217.138.195.27) (Ping timeout: 252 seconds)
16:18:59 twiclo joins (~twiclo@204.14.20.66.static.utbb.net)
16:21:33 × bfrk quits (~Thunderbi@2001:9e8:35a:5100:856a:b99d:e3e6:3974) (Quit: bfrk)
16:30:59 dsnix[m] joins (~dsnixmatr@2001:470:69fc:105::1:e475)
16:48:29 benin0 joins (~benin@183.82.207.30)
16:50:03 × benin quits (~benin@183.82.207.30) (Ping timeout: 256 seconds)
16:50:03 benin0 is now known as benin
16:51:31 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.4.1)
17:03:25 seschwar joins (~seschwar@user/seschwar)
17:21:08 iqubic joins (~iqubic@2601:602:9502:c70:742a:b30a:543c:2639)
17:21:34 erts joins (~erts@user/erts)
17:21:35 <iqubic> So, Arch + Haskell sucks major time!
17:21:42 <iqubic> I'm back to NixOS.
17:21:48 liskin[m] joins (~liskinmat@2001:470:69fc:105::768)
17:22:10 <iqubic> How can I get xmonad 0.17 installed and running on my NixOS box.
17:22:34 <geekosaur> saw that earlier. no clue about configuration though, nixos has its own way of configuring xmonad (and apparently everything else)
17:22:53 <iqubic> What OS do you use?
17:23:00 <geekosaur> ubuntu
17:23:15 <iqubic> Also, I'm asking in the NixOS matrix space for advice now too.
17:25:41 <Solid> iqubic: you either install via stack (as on other OSes), build with the flake (no idea about that one) or wait until NixOS has finished upgrading to stackage lts-19 (not sure how far along that is, but we're in there)
17:29:41 Benzi-Junior joins (~BenziJuni@dsl-149-64-179.hive.is)
17:40:58 <CodeBitCookie[m]> geekosaur: I am still confused, sorry. I do not understand Haskell that much and I did import XMonad.Hooks.ToggleHook, however, I do not understand what to do next.
17:41:21 nomadxx3 joins (~lanomadx@69.167.36.244)
17:41:37 × nomadxxxx3 quits (~lanomadx@69.167.36.76) (Ping timeout: 256 seconds)
17:42:00 <CodeBitCookie[m]> you sent me a Foldr thing, was that message for me? If so, what does that have to do with the problem?
17:43:09 <geekosaur> no, that was showing what the bot you were trying to talk to does
17:43:25 <geekosaur> and I think you want to talk to fizzie as they suggested toggleHook
17:47:27 <fizzie> You'd use ToggleHook a little differently. The way it works is, you define "named" operations in advance, and then can use hookNext to execute one of them on the next newly opened window.
17:47:31 <fizzie> So for your use case, you'd add something like `toggleHook "toX" (doShift "X")` to make an action to send a window to workspace X, and then for your key binding, something like `hookNext "toX" True >> spawn "a_thing"`.
17:47:48 <fizzie> Also that's all entirely hypothetical, I haven't tried it.
17:48:30 <fizzie> The toggleHook would be part of your configuration's manageHook, that is.
17:49:20 <abastro[m]> The foldr & abc thing was quite a magic to begin with
17:49:43 <CodeBitCookie[m]> Ohhhh, yeah that was nice.
17:50:57 <CodeBitCookie[m]> fizzie: I don't know Haskell much, can you kindly tell me what to do after Importing ToggleHook? I did not understand. If I change my ManageHook, it moves the window to a specific workspace EVERY TIME I spawn that program. I only want it once on startup.
17:52:10 <CodeBitCookie[m]> Ooooh, let me try that, thanks.
17:54:05 <CodeBitCookie[m]> I get an error:
17:54:19 <CodeBitCookie[m]> Couldn't match type `Query (Endo WindowSet)` with `Bool`
17:54:19 <CodeBitCookie[m]> Expected type: Bool
17:54:19 <CodeBitCookie[m]> Actual type: ManageHook
17:54:58 chomwitt joins (~chomwitt@2a02:587:dc0d:b200:f874:1c07:de06:7cf8)
17:55:51 <CodeBitCookie[m]> where I put: ``hookNext myBrowser (doShift "6")`` in my StartupHook
17:55:59 <CodeBitCookie[m]> fizzie: ^
17:56:04 × iqubic quits (~iqubic@2601:602:9502:c70:742a:b30a:543c:2639) (Quit: Client closed)
17:56:26 <CodeBitCookie[m]> oh wait nvm
17:56:26 <fizzie> Like I said: "-- you define 'named' operations in advance --".
17:56:27 <CodeBitCookie[m]> sorry
17:56:38 <CodeBitCookie[m]> let me try that again.
17:56:40 <fizzie> But I think I missed the context of doing it on *startup*. I don't think the approach will really work for that, sadly.
17:56:46 iqubic joins (~iqubic@2601:602:9502:c70:742a:b30a:543c:2639)
17:56:51 <fizzie> Because the ordering in which the windows appear is pretty unpredictable.
17:59:18 <geekosaur> you just need to do it the way I said the other day
17:59:44 <geekosaur> use threadDelay after spawn/spawnOnce
18:00:50 <geekosaur> https://github.com/geekosaur/xmonad.hs/blob/skkukuk/xmonad.hs#L135-L146 note line 139
18:01:22 <geekosaur> import Control.Concurrent for threadDelay and remember that itworks in microseconds (that bites even experts occasionally)
18:01:52 <CodeBitCookie[m]> fizzie: OH, It worked! Yayyy. Although, my Manage Hook is now looking something like:
18:02:11 <CodeBitCookie[m]> <+> toggleHook "shiftTo1" (doShift "1")
18:02:11 <CodeBitCookie[m]> <+> toggleHook "shiftTo2" (doShift "2")
18:02:11 <CodeBitCookie[m]> <+> toggleHook "shiftTo3" (doShift "3")
18:02:11 <CodeBitCookie[m]> ...
18:02:32 <CodeBitCookie[m]> Is there a more elegant way?
18:03:04 <fizzie> `composeAll` + a list comprehension, perhaps.
18:04:21 <fizzie> composeAll [toggleHook ("shiftTo" ++ (show i)) (doShift (show i)) | i <- [1..9]] -- or something along those lines. If it does actually work for you. Slightly surprised though that the order would be so predictable.
18:05:24 <CodeBitCookie[m]> Actually, with more than one call on
18:05:34 <CodeBitCookie[m]> * call on startup, it goes back to the old behaviour.
18:05:57 <CodeBitCookie[m]> so with something like:
18:06:14 <CodeBitCookie[m]> hookNext "shiftTo2" True >> spawn myBrowser
18:06:14 <CodeBitCookie[m]> hookNext "shiftTo9" True >> spawn "gtk-pipe-viewer"
18:06:14 <CodeBitCookie[m]> hookNext "shiftTo1" True >> spawn "emacs --daemon && emacsclient -c"
18:06:25 <CodeBitCookie[m]> It spawns everything on the current workspace.
18:06:57 <fizzie> Yeah, that's more what I was expecting, because all those `hookNext` operations run well before any of the windows come up, so you'll just get the behavior of the last one.
18:08:23 <fizzie> One possible workaround might be to put all those "shift window type X to workspace Y" rules into a *single* named toggleHook (call it "startup" for example), turn it on in the startupHook (with hookAllNew "startup" True), and then after the windows have spawned (that's the tricky bit; maybe with that threadDelay, or some kind of a timer) turn it off (with hookAllNew "startup" False).
18:08:47 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
18:11:17 <geekosaur> I'd just stuff a threadDelay 250000 between each of them, then adjust as needed
18:31:13 mvk joins (~mvk@2607:fea8:5cc3:7e00::7980)
18:41:43 steve_ joins (~steve@ool-182c2b80.dyn.optonline.net)
19:24:35 × iqubic quits (~iqubic@2601:602:9502:c70:742a:b30a:543c:2639) (Quit: Client closed)
19:41:03 benin3 joins (~benin@183.82.207.30)
19:43:17 × benin quits (~benin@183.82.207.30) (Ping timeout: 268 seconds)
19:43:17 benin3 is now known as benin
20:16:28 × steve_ quits (~steve@ool-182c2b80.dyn.optonline.net) (Ping timeout: 260 seconds)
20:16:42 steve_ joins (~steve@ool-182c2b80.dyn.optonline.net)
20:26:57 pentagrade[m] joins (~pentagrad@2001:470:69fc:105::1:e4ae)
21:50:21 iqubic joins (~iqubic@2601:602:9502:c70:418b:3a0d:9b68:d50c)
21:54:47 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
22:40:21 × iqubic quits (~iqubic@2601:602:9502:c70:418b:3a0d:9b68:d50c) (Quit: Client closed)
23:12:55 × seschwar quits (~seschwar@user/seschwar) (Quit: :wq)
23:40:35 × benin quits (~benin@183.82.207.30) (Quit: The Lounge - https://thelounge.chat)
23:48:10 benin joins (~benin@183.82.207.30)

All times are in UTC on 2022-03-24.