Home liberachat/#xmonad: Logs Calendar

Logs on 2021-10-16 (liberachat/#xmonad)

00:23:43 × ectospasm quits (~ectospasm@user/ectospasm) (Quit: WeeChat 3.3)
00:36:57 ectospasm joins (~ectospasm@user/ectospasm)
00:37:29 × ectospasm quits (~ectospasm@user/ectospasm) (Client Quit)
00:39:57 ectospasm joins (~ectospasm@user/ectospasm)
02:03:30 × banc quits (banc@gateway/vpn/airvpn/banc) (Ping timeout: 265 seconds)
02:08:08 × pl quits (sid98063@id-98063.helmsley.irccloud.com) (Ping timeout: 246 seconds)
02:09:28 pl joins (sid98063@helmsley.irccloud.com)
02:21:23 × rundown quits (~eb0t@90.197.81.245) (Ping timeout: 264 seconds)
02:23:00 rundown joins (~eb0t@90.194.34.18)
02:24:22 banc joins (banc@gateway/vpn/airvpn/banc)
02:45:09 × eyenx quits (~m-5paiux@eyenx.ch) (Remote host closed the connection)
02:45:26 eyenx joins (~m-5paiux@eyenx.ch)
02:47:49 × td_ quits (~td@muedsl-82-207-238-175.citykom.de) (Ping timeout: 252 seconds)
03:21:32 × rundown quits (~eb0t@90.194.34.18) (Ping timeout: 268 seconds)
03:23:17 rundown joins (~eb0t@90.194.37.187)
03:32:48 Hash is now known as OpenSores
05:26:22 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
05:43:39 OpenSores is now known as Hash
06:00:01 × rundown quits (~eb0t@90.194.37.187) (Ping timeout: 268 seconds)
07:39:13 wonko joins (~wjc@62.115.229.50)
07:46:21 cfricke joins (~cfricke@user/cfricke)
08:04:34 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds)
08:36:57 Solid wonders if it's worth defining "proper" versions of <&&> and <||> at this point
08:37:16 <liskin> proper as in short-circuiting?
08:37:26 <Solid> I've seen them used more and more lately (maybe that's just my impression) and I really don't like that they're strict on both arguments
08:37:28 <Solid> yes
08:37:59 <Solid> s/ on / in /
08:38:08 <liskin> it'd be a breaking change but I'd say it might be worth it
08:43:35 × wonko quits (~wjc@62.115.229.50) (Ping timeout: 264 seconds)
09:12:17 ranmacar joins (~ranmacar@2001:16b8:5c51:6500:2a39:26ff:fe02:85bb)
09:13:07 <ranmacar> Hello! What could be the problem if mod+q doesn't work?
09:14:20 <Solid> does `xmonad --recompile' in a terminal work?
09:15:18 <ranmacar> yes, but doesn't apply the changes
09:16:14 <ranmacar> just prints "XMonad will use ghc to recompile, because "/home/ranmacar/.xmonad/build" does not exist.
09:16:15 <ranmacar> XMonad recompilation process exited with success!"
09:18:56 <Solid> `xmonad --recompile && xmonad --restart' will apply the changes
09:19:03 <Solid> (M-q does not actually do much more than that)
09:19:16 <Solid> do you have xmessage installed? it should print an error in case anything goes wrong
09:21:13 <ranmacar> i have, and it does show an error when there is a typo in the config on --recompile
09:21:30 <ranmacar> but mod+q doesn't do anything
09:22:18 <ranmacar> with --restart it worked, thanks
09:23:22 <ranmacar> any idea what would break the mod+q?
09:23:28 <ranmacar> my config is just
09:23:30 <ranmacar> import XMonad
09:23:30 <ranmacar> main = xmonad defaultConfig
09:23:31 <ranmacar> { modMask = mod4Mask -- Use Super instead of Alt
09:23:31 <ranmacar> , terminal = "alacritty"
09:23:32 <ranmacar> }
09:23:40 <Solid> are you pressing the right mod key?
09:23:59 <Solid> are you on an exotic system like nixos where there could be path problems with finding both xmonad and xmessage?
09:24:32 <ranmacar> i am on arch, installed xmonad with ghcup / cabal
09:26:14 <ranmacar> where does mod+q source the path from?
09:28:12 <ranmacar> i am starting it with a .desktop in xsessions, with just exec xmonad
09:30:50 <ranmacar> s+mod+q, and other default bindings do work
09:31:00 <Solid> it just looks in $PATH
09:31:13 <Solid> What M-q essentially does is `/bin/sh -c "if type xmonad; then xmonad --recompile && xmonad --restart; else xmessage xmonad not in $PATH: \"$PATH\"; fi"'
09:32:50 rundown joins (~eb0t@90.212.144.152)
09:33:17 <ranmacar> maybe /bin/sh doesnt see the path for xmonad and xmessage then?
09:33:39 <Solid> one one way to find out :)
09:34:22 seschwar joins (~seschwar@user/seschwar)
09:34:44 <ranmacar> i'm a bit lost in paths and shells atm, think this install defaults to fish :)
09:35:21 <Solid> I doubt /bin/sh is actually bound to fish
09:35:41 <Solid> but you can probably just copy that line above and see if it runs on your system
09:37:28 <ranmacar> yeah, works. if i run bin/sh it sees xmonad, but maybe mod+q gets the path before it gets set?
09:39:31 mc47 joins (~mc47@xmonad/TheMC47)
09:39:59 × rundown quits (~eb0t@90.212.144.152) (Ping timeout: 264 seconds)
09:40:40 <Solid> Oo
09:40:57 <Solid> well I'm out of ideas :) is there anything in ~/.xsession-erros (or an equivalent file)?
09:41:07 rundown joins (~eb0t@90.210.94.119)
09:42:34 <ranmacar> dont see anything like that
09:42:45 <Solid> how are you starting X?
09:43:49 <ranmacar> not sure, the session starts from /xsessions
09:45:51 <tomsmeding> where are you putting the path to where xmonad lives in your PATH? Perhaps in your shell config?
09:46:12 <Solid> I mean something along the line of are you using a login manager/startx/something else?
09:46:24 <FOSSHuman[m]> How would I combine two spawn functions??
09:46:52 <ranmacar> yeah, login manager, with xmonad.desktop that starts with exec=xmonad
09:48:52 <ranmacar> tomsmeding i've tried various places to set the path, /etc/profile /xinitrc fish config
09:48:57 <Solid> FOSSHuman[m]: spawn "..." >> spawn "..."
09:49:13 <ranmacar> where would be best to set it?
09:49:21 <tomsmeding> ranmacar: fish config probably doesn't work because the login manager only gets the global profile; I would've expected /etc/profile to work (after a reboot)
09:49:31 <Solid> indeed
09:49:45 <FOSSHuman[m]> Solid: Nice! Thanks..
09:53:08 <ranmacar> didnt seem to work in /etc/profile. any tips where it could?
09:54:43 <ranmacar> or would setting the binding mod+q to --recompile && --restart manually work? :)
09:54:49 <tomsmeding> get xmonad to print the shell environment somehow (i.e. the output of `env`)
09:55:10 <tomsmeding> ranmacar: yes, but you probably have to add an absolute path to xmonad
09:56:08 <ranmacar> i have it in ~/.cabal/bin/xmonad
09:57:50 <ranmacar> how can i print the env?
09:58:24 <tomsmeding> execute the 'env' executable somehow and make sure you get the output; perhaps run 'env >/home/ranmacar/envstuff.txt' in a binding
09:58:28 tomsmeding doesn't actually know xmonad
10:00:04 <ranmacar> it probably is a more general linux issue :)
10:00:59 × rundown quits (~eb0t@90.210.94.119) (Ping timeout: 264 seconds)
10:01:19 <tomsmeding> feels like it, but I wouldn't know how to make xmonad run something :p
10:02:05 <Solid> you can just do `spawn "env"' as a keybinding (this will print to stdout, so make sure you know where that goes :))
10:02:23 rundown joins (~eb0t@90.196.142.168)
10:14:32 <ranmacar> where does it go? :)
10:16:37 <mc47> depends
10:16:41 <Solid> that entirely depends on your login manager, so I can't help you there, sorry
10:17:05 <Solid> (I start X with `exec launchx >& ~/.xsession.log' and so goes to ~/.xsession.log for me, though ~/.xsession-errors is somewhat more common for a lot of distros)
10:17:40 <mc47> for me, it goes to ~/.local/share/sddm/xorg-session.log
10:17:55 <FOSSHuman[m]> <Solid> "you can just do `spawn "env"' as..." <- Maybe `spawn "env >> example.txt"`??
10:18:59 <Solid> oh right, POSIX shell is an actual language :)
10:19:15 <Solid> probably need to make that an absolute path though
10:21:12 <liskin> ranmacar: xargs -0 -n1 </proc/$(pidof xmonad-x86_64-linux)/environ | grep ^PATH
10:21:24 <liskin> prints the env of the running xmonad instance
10:22:10 <ranmacar> import XMonad
10:22:10 <ranmacar> import XMonad.Util.EZConfig
10:22:11 <ranmacar> main :: IO ()
10:22:11 <ranmacar> main = xmonad $ def
10:22:12 <ranmacar> { modMask = mod4Mask -- Rebind Mod to the Super key
10:22:12 <ranmacar> , terminal = "alacritty"
10:22:13 <ranmacar> }
10:22:13 <ranmacar> `additionalKeysP`
10:22:14 <ranmacar> [ ("M-a", spawn "env >> /home/ranmacar/xmonad.env")]
10:22:54 <ranmacar> this worked, and printed the env, but the path seems to be ok
10:23:06 <ranmacar> PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:~/.cabal/bin:~/.local/bin:/home/ranmacar/.cabal/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
10:26:50 <liskin> what display manager do you use?
10:27:14 <liskin> we need to see logs. if you have gdm, it'll probably be in the systemd journal, if not, then maybe .xsession-errors or something
10:27:18 <liskin> but it has to be somewhere
10:27:35 <liskin> ls -la /proc/$(pidof xmonad-x86_64-linux)/fd
10:27:41 <liskin> that will tell us where
10:28:21 <liskin> ls -la /proc/$(pidof xmonad-x86_64-linux)/fd/{1,2}
10:31:50 <ranmacar> sddm :)
10:31:53 <ranmacar> xmonad: ghc: runProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
10:32:43 <liskin> where's your ghc binary?
10:33:28 <ranmacar> in ghcup, not in path :)
10:33:32 <tomsmeding> yay
10:33:39 <liskin> but why
10:33:57 <liskin> how do you build xmonad then?
10:34:14 <tomsmeding> liskin: people add stuff to their path in their shell profiles
10:34:30 <tomsmeding> login managers don't care about that and only read /etc/profile
10:34:34 <ranmacar> i installed ghcup from the website, then xmonad with cabal
10:34:58 <liskin> ranmacar: you just said there's no ghc on your path
10:35:05 <liskin> does ghcup only put cabal on path?
10:35:11 <liskin> that seems rather hard to believe tbh
10:35:37 <tomsmeding> liskin: ghcup definitely puts ghc in your path, but it does that by modifying your shell rc file
10:35:45 <tomsmeding> login managers don't care about shell rc files :p
10:36:18 <ranmacar> it gets added somewhere, but the env printed from xmonad doesnt have it
10:36:27 <liskin> okay let me try to put it another way
10:36:30 <liskin> $ which ghc
10:36:34 <liskin> what does this give?
10:36:43 <Solid> ghcup seems to create ~/.ghcup/bin and put executables there
10:36:52 <tomsmeding> liskin: in their normal shell, that will give a ghc
10:37:07 <tomsmeding> because their .bashrc or their .config/fish/config.fish or whatever adds that
10:37:12 <Solid> and I can't see that in the above $PATH
10:37:28 <liskin> tomsmeding: I don't want to be rude, man, but what I want is specific stuff, not some vague "something does something"
10:37:40 <liskin> I want to see their specific ghc location
10:37:47 <liskin> I want to see their specific $PATH in a shell
10:37:57 <liskin> and I want to see their specific $PATH in the xmonad process
10:38:06 <liskin> specific shit.
10:38:12 <liskin> only then can we do something about the problem.
10:38:46 <ranmacar> ~/.ghcup/bin
10:38:54 <tomsmeding> you're right I was being the rude person here, kind of, because you clearly know your shit. It's just that I think I already know what the problem is (which ghc gives ~/.ghcup/bin/ghc which is in .bashrc but not in /etc/profile etc., but I shouldn't presume and that's exactly what I was doing!)
10:38:58 <liskin> (and, I believe, only by actually seeing specific shit can one get some understanding)
10:39:22 <liskin> 12:23 <ranmacar> PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:~/.cabal/bin:~/.local/bin:/home/ranmacar/.cabal/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
10:39:28 <liskin> ranmacar: ^^ see, no ~/.ghcup/bin in there
10:40:04 <ranmacar> yeah, i noticed :)
10:40:23 <ranmacar> thanks, adding that to /etc/profile
10:42:27 × ranmacar quits (~ranmacar@2001:16b8:5c51:6500:2a39:26ff:fe02:85bb) (Quit: Client closed)
10:43:02 <Solid> why would login managers not read shell rc files
10:43:18 <Solid> that seems insane
10:43:46 <liskin> some of them read .xsessionrc (it's probably more complicated than that, some may read that, some may invoke Xsession which sources that)
10:44:26 ranmacar joins (~ranmacar@88.130.159.133)
10:44:43 <tomsmeding> Solid: how would a login manager like gdm know how to read my fish config file?
10:45:21 <liskin> but .bashrc really is meant for interactive shell (actually just bash, as tomsmeding correctly says) sessions only, so dms don't read that
10:46:26 <liskin> I just tried googling for how to set env vars with sddm and didn't really get an answer
10:46:37 <liskin> how the hell are less experienced people supposed to do that :-/
10:48:13 <liskin> (oh and there's also ~/.pam_environment which should just work for all sessions, but I bet that thing doesn't expand tildes and $vars)
10:49:24 <liskin> and for added fun, every distro does it differently, so arch seems to have ~/.xprofile instead of ~/.xsessionrc: https://wiki.archlinux.org/title/xprofile
10:49:26 <liskin> :-D
10:49:33 <ranmacar> etc/profile didnt help :(
10:49:54 <ranmacar> maybe xprofile :D
10:50:01 <liskin> yeah, try xprofile and xsessionrc
10:50:12 <ranmacar> yay linuxes :)
10:50:28 <liskin> maybe add XXX=xprofile and XXX=xsessionrc respectively so that you can then check which one actually worked :-)
10:51:35 <ranmacar> should .xprofile be there already?
10:52:31 <liskin> probably not
10:52:39 <liskin> but it would be nice wouldn't it? :-)
10:53:10 <liskin> instead of randomly googling shit, distros could actually put these files in /etc/skel so a new user just looks around for a bit and knows where goes what
10:54:00 <ranmacar> along with the particular brand of outdated syntax they chose to expect there :D
10:59:53 × ranmacar quits (~ranmacar@88.130.159.133) (Quit: Client closed)
11:00:27 ranmacar joins (~ranmacar@2001:16b8:5c51:6500:2a39:26ff:fe02:85bb)
11:11:37 benin joins (~benin@183.82.25.86)
11:18:20 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3)
11:53:33 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
12:18:23 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 264 seconds)
12:27:42 × ranmacar quits (~ranmacar@2001:16b8:5c51:6500:2a39:26ff:fe02:85bb) (Quit: Client closed)
12:30:56 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
12:32:18 mestre joins (~mestre@191.177.175.57)
12:40:16 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
12:44:57 × mestre quits (~mestre@191.177.175.57) (Quit: leaving)
12:45:28 cyr4x3 joins (~cyr4x3@139.47.115.87)
12:47:15 eqw joins (~eqw@31.134.178.99)
12:58:58 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
13:00:56 geekosaur joins (~geekosaur@xmonad/geekosaur)
15:46:18 × cyr4x3 quits (~cyr4x3@139.47.115.87) (Quit: WeeChat 2.3)
16:29:35 wonko joins (~wjc@62.115.229.50)
16:29:58 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
16:31:48 geekosaur joins (~geekosaur@xmonad/geekosaur)
16:54:42 alternateved joins (~user@194.177.28.164)
17:14:24 mestre joins (~mestre@191.177.175.57)
17:38:47 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
18:14:16 × benin quits (~benin@183.82.25.86) (Ping timeout: 245 seconds)
18:48:55 × AndrewYu quits (~andrew@user/andrewyu) (Remote host closed the connection)
18:49:39 AndrewYu joins (~andrew@user/andrewyu)
18:50:07 × humky quits (~humky@user/humky) (Quit: Leaving)
19:12:34 <alternateved> Hello! It may be a silly question, but what are different kinds of comments in Haskell?
19:12:57 <alternateved> I know about block comments and single line comments
19:13:24 <geekosaur> those are it
19:13:26 <alternateved> But what is the difference in meaning of comments between simple `--` and `-- |`
19:13:40 <geekosaur> oh. that's a comment with haddock markup in it
19:13:56 <geekosaur> you can read the haddock manual to see the kinds of markup it supports
19:14:23 <alternateved> Oh, I should do so. Thank you for pointing me in correct direction
19:14:53 <geekosaur> (sorry, I rarely use haddock in my own stuff so I never remember what all the kinds of markup mean)
19:15:31 <alternateved> It's okay. I can easily check now what is the meaning of those
21:36:30 Guest68 joins (~Guest68@103.151.184.198)
21:36:49 × Guest68 quits (~Guest68@103.151.184.198) (Client Quit)
21:38:28 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
22:14:21 × wonko quits (~wjc@62.115.229.50) (Ping timeout: 268 seconds)
22:33:04 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
22:33:13 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit)
22:44:30 × alternateved quits (~user@194.177.28.164) (Ping timeout: 260 seconds)
22:50:54 × seschwar quits (~seschwar@user/seschwar) (Quit: :wq)
23:24:30 rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com)
23:44:12 <davve> hey, this is my layout hook https://paste.ofcode.org/wNDqTY4q8S3EsrCgVJcZS3 it works as i want except for that i dont want to avoid struts for Full, how would someone haskell savvy do it differently?
23:44:33 <davve> s/differently//
23:46:42 <davve> s/savvy/knowledgable/
23:47:19 <geekosaur> thi is slightly weird since you have spacing in there twice
23:47:33 <davve> oh
23:47:41 <davve> i didnt realize that :)
23:47:46 <geekosaur> but that actually shows you how to do it, since you use tiled on both the cases you also want avoidStruts on
23:48:16 <geekosaur> then noBorders Full becomes (noBorders . avoidStrutsOn []) Full
23:48:52 <geekosaur> and you also want smartBorders in the definition of tiled rather than outside, since you want the noBorders instead on the Full
23:49:56 <davve> thank you, just taking a few minutes to digest
23:57:47 <davve> think i misspoke. i actually want to Not avoid struts
23:58:48 <davve> -_-
23:59:55 <davve> which is what makes it more difficult, since i have (what i thought was nicely defined!) general definition of the layout
23:59:59 <geekosaur> that's why it's avoidStrutsOnb []

All times are in UTC on 2021-10-16.