Home liberachat/#xmonad: Logs Calendar

Logs on 2022-07-05 (liberachat/#xmonad)

00:42:57 × bla quits (~bla@79.191.253.107.ipv4.supernova.orange.pl) (Ping timeout: 268 seconds)
00:46:23 bla joins (~bla@79.191.252.153.ipv4.supernova.orange.pl)
01:26:19 sogens joins (~sogens@gateway/vpn/pia/sogens)
02:03:10 × banc quits (banc@gateway/vpn/airvpn/banc) (Ping timeout: 240 seconds)
02:23:07 banc joins (banc@gateway/vpn/airvpn/banc)
02:24:18 × noex quits (~null@user/noex) (Ping timeout: 240 seconds)
02:27:26 noex joins (~null@user/noex)
02:30:01 dartleader joins (~dartleade@S0106a84e3f794823.wp.shawcable.net)
02:36:30 × td_ quits (~td@94.134.91.91) (Ping timeout: 246 seconds)
02:38:20 td_ joins (~td@muedsl-82-207-238-243.citykom.de)
02:45:07 rekahsoft joins (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca)
03:28:13 × rekahsoft quits (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Ping timeout: 244 seconds)
04:38:51 steve__ joins (~steve@ool-182c2b80.dyn.optonline.net)
05:28:30 × sogens quits (~sogens@gateway/vpn/pia/sogens) (Ping timeout: 240 seconds)
05:29:40 sogens joins (~sogens@gateway/vpn/pia/sogens)
06:30:26 wusticality joins (~wusticali@c-67-161-204-49.hsd1.co.comcast.net)
06:31:36 <wusticality> Hey folks, I'm using XMonad.Layout.IfMax which is working well, but I'm running into an issue where my border rules are not preserved, could someone possibly point me in the right direction?
06:35:20 alternateved joins (~alternate@82.180.151.250)
06:44:52 <Lears> wusticality: I'm not sure what exactly you mean by border rules, but if it's a layout modifier then you probably want it applied to IfMax rather than its arguments.
06:45:22 <Lears> If that's not it, show us your config.
06:46:38 <wusticality> https://www.reddit.com/r/xmonad/comments/vrrnj9/issues_with_ifmax_and_noborders/
06:46:45 <wusticality> I posted the specifics on reddit
06:47:48 <wusticality> Lears I have the fullscreen layout set to use noBorders which always works perfectly, until I utilized the IfMax rule
06:48:10 <wusticality> Using that causes fullscreen layouts to _sometimes_ have borders and sometimes not, perhaps it's a bug?
06:54:07 <Lears> It looks to me like it ought to work as you intend; I'm not sure what's happening.
06:54:20 <wusticality> Yeah, that was my thinking too, I'm afraid it may be a bug
06:54:37 <wusticality> I was looking through the source a bit but I'm not a regular Haskell programmer
06:56:25 × wusticality quits (~wusticali@c-67-161-204-49.hsd1.co.comcast.net) (Quit: Client closed)
06:56:35 wusticality joins (~wusticali@c-67-161-204-49.hsd1.co.comcast.net)
06:58:17 <Lears> wusticality: The best guess I have is that regular fullscreen might be floating a window, thus exempting it from the layout.
06:58:31 <Lears> I don't use regular fullscreen so I'm not flush on the details, though.
07:00:11 <wusticality> Curiously, it works perfectly using my regular layout rules without IfMax
07:01:42 <wusticality> That is to say, having the `myFull` layout (which is just "noBorders Full") as well as tall and tall mirrored and cycling through them - no borders ever show up with that myFull layout - until, that is, I add the IfMax rule
07:02:19 mc47 joins (~mc47@xmonad/TheMC47)
07:07:43 dschrempf joins (~dominik@mobiledyn-62-240-134-178.mrsn.at)
07:17:04 <Lears> wusticality: Okay, I took a look at the X.L.NoBorders source, and I found the implementation is more stateful than I thought. The issue is most likely due to two copies of the modifier have out-of-sync state.
07:17:29 <Lears> In that case, your best bet should be to use smartBorders outside of IfMax.
07:25:50 × sogens quits (~sogens@gateway/vpn/pia/sogens) (Ping timeout: 240 seconds)
07:38:21 <mc47> So this a weird one: https://github.com/xmonad/xmonad-contrib/issues/8
07:42:48 <wusticality> Lears Apologies, could you say more about what you mean?
07:43:15 <wusticality> And / or should I log a bug on github
07:46:29 <Lears> wusticality: You use noBorders Full in more than one part of your layout hook. But each one keeps its own private state about what borders are set, assuming it's the only one changing borders. This assumption isn't really a bad one; it can be argued whether this is a bug or not. I would say it's a documentation bug: the docs ought to tell you not to duplicate the modifier.
07:47:20 <wusticality> oh interesting, I see
07:47:24 <Lears> To prevent this, use Full instead, then apply smartBorders to the whole layout hook.
07:48:09 <wusticality> Sec, I'll try it quick now
07:50:14 <wusticality> That did the trick! (and makes sense)
07:50:29 <wusticality> I actually didn't notice smartBorders - not sure if I should log a bug or not
07:50:45 <wusticality> Does seem like it could cause other problems though
07:57:13 <wusticality> I've updated the reddit post, comments welcome RE filing a bug: https://www.reddit.com/r/xmonad/comments/vrrnj9/issues_with_ifmax_and_noborders/
08:01:11 × wusticality quits (~wusticali@c-67-161-204-49.hsd1.co.comcast.net) (Quit: Client closed)
08:02:32 cfricke joins (~cfricke@user/cfricke)
08:02:49 chomwitt joins (~chomwitt@2a02:587:dc17:ef00:57f2:e4b7:eab5:9cc)
08:04:51 × thunderrd quits (~thunderrd@183.182.111.73) (Remote host closed the connection)
08:10:50 × dschrempf quits (~dominik@mobiledyn-62-240-134-178.mrsn.at) (Ping timeout: 244 seconds)
08:15:30 × dartleader quits (~dartleade@S0106a84e3f794823.wp.shawcable.net) (Ping timeout: 240 seconds)
08:17:49 dartleader joins (~dartleade@S0106a84e3f794823.wp.shawcable.net)
09:00:09 × Etxeberrialex[m] quits (~etxeberri@2001:470:69fc:105::1:5ae6) (Quit: You have been kicked for being idle)
09:42:40 dschrempf joins (~dominik@mobiledyn-62-240-134-178.mrsn.at)
10:12:06 × dschrempf quits (~dominik@mobiledyn-62-240-134-178.mrsn.at) (Quit: WeeChat 3.5)
11:07:01 Guest9 joins (~Guest9@48.red-83-55-226.dynamicip.rima-tde.net)
11:10:44 <Guest9> Hi! I was wondering if anyone could help me solve an xmonad question I havent been able to find any answer to. Is there any way to get the number of windows in the current workspace? (preferably this would be done in a pure context by passing the WorkspaceId) I have tried many routes at attempting to solve this and I cant get it to work for the
11:10:44 <Guest9> life of me. Does anyone know this how I would be able to do this?
11:21:58 <fizzie> Pretty sure that's just fundamentally not possible outside the X monad, with just the WorkspaceId, because where would the data be coming from? In X, a very DIY way should be something like `withWindowSet (return . length . W.integrate' . W.stack . W.workspace . W.current)` but I'm almost certain there's a shorter way with some convenience functions too.
11:22:53 <fizzie> (Where W is XMonad.StackSet, as is common.)
11:25:01 × Guest9 quits (~Guest9@48.red-83-55-226.dynamicip.rima-tde.net) (Quit: Client closed)
11:25:40 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
11:27:02 <Solid> `withWindowSet (pure . length . W.index)` should probably work
11:27:14 <Solid> but yes for this to be pure you'd need at least a Workspace and not just a WorkspaceId
11:28:12 <fizzie> Right, `W.index` would've been the convenience function I was looking for, I just can never find them.
11:28:37 <Solid> we have too few of those, tbh
11:28:55 <Solid> but maybe we should look more towards adding lenses to the core anyways
11:31:10 <fizzie> Looks like the questant is gone, anyway.
11:32:16 <Solid> oh, right
11:32:51 Guest9 joins (~Guest9@48.red-83-55-226.dynamicip.rima-tde.net)
11:33:15 <Guest9> sorry my firefox crashed
11:33:42 <fizzie> Guest9: In case you missed it (probably), I proposed `withWindowSet (return . length . W.integrate' . W.stack . W.workspace . W.current)` while Solid came up with a lot more neater `withWindowSet (pure . length . W.index)`.
11:34:04 <fizzie> (Both of these would have the type `X Int`.)
11:34:29 <Guest9> sorry, Im not very literate with haskell, I belive I wouldnt be able to use that in a pure context right?
11:35:07 <Guest9> myStatusBar = statusBarProp "xmobar" (pure xmobarPP {
11:35:07 <Guest9>                               ppCurrent = (\s ->
11:35:08 <Guest9>                                                 if getNumberOfWindowsInWorkpace s > 0
11:35:08 <Guest9>                                                   then ((xmobarBorder "Top" "#bbbbbb" 4 . xmobarColor "#bbbbbb" "#005577") ("  " ++ s ++ "  "))
11:35:09 <Guest9>                                                   else (xmobarColor "#bbbbbb" "#005577" ("  " ++ s ++ "  "))
11:35:09 <Guest9>                                           )
11:35:10 <Guest9>                             , ppTitle = shorten 77
11:35:10 <Guest9>                             , ppSep = " | "
11:35:11 <Guest9>                             , ppLayout = (\_ -> "")
11:35:11 <Guest9>                             , ppHidden = (\s -> xmobarBorder "Top" "#bbbbbb" 2 ("  " ++ s ++ "  ")) --probs better way to do this
11:35:12 <Guest9>                             , ppHiddenNoWindows =  wrap "  " "  "
11:35:12 <Guest9>                     })
11:35:15 <MrElendig> use a pastebin
11:35:29 <Guest9> sorry
11:35:30 <Guest9> https://pastebin.com/8QsHkQw8
11:36:05 <Guest9> the thing i would like to achieve would be to create a getNumberOfWindowsInWorkpace function which could allow me to perform different logic when setting the text for the ppCurrent workspace depending on if its empty or not
11:36:14 <Guest9> i dont know if this would be the correct approach
11:39:40 <fizzie> I don't think it's fundamentally possible to have a pure function with the type `WorkspaceId -> Int` that gives you the window count, because how could it be? The number of windows isn't "in" the WorkspaceId. You'd need the WindowSet (or at least the part you're interested in) from somewhere.
11:40:01 <fizzie> But it should still be possible to do what you're actually wanting to do, just differently.
11:40:46 <fizzie> The `(pure xmobarPP { ... })` in your example is an X PP, after all.
11:41:08 <Solid> This is probably most easily be done by customising `ppPrinters`
11:41:46 <Solid> E.g., fallbackPrinters ( https://hackage.haskell.org/package/xmonad-contrib-0.17.0/docs/src/XMonad.Hooks.StatusBar.PP.html#fallbackPrinters ) shows you the default setup
11:42:33 <Solid> you just have to append something in the case of the current workspace there, which is nice because WS ( https://hackage.haskell.org/package/xmonad-contrib-0.17.0/docs/src/XMonad.Hooks.StatusBar.PP.html#WS ) contains e.g. the entire windowset
11:43:05 Solid doesn't have a whole lot of time right now, so can't offer step-by-step assistance, sadly
11:43:13 <Guest9> Thank you so much for the tips fizzie Solid, using the function you guys gave me I was able to implement the functionality I wanted (even if its not pure). I attach the updated code in case its useful for someone in the future (https://pastebin.com/PLqHuTDg). Thank you again, ill be sure to learn a bit more about haskell and monads:)
11:44:36 <fizzie> As a person not all that fluent in Haskell, that (changing the "returned" PP) is probably what I would have landed on if I had to muddle through it myself, even if it's not as neat as the ppPrinters approach.
12:14:51 × Guest9 quits (~Guest9@48.red-83-55-226.dynamicip.rima-tde.net) (Quit: Client closed)
12:17:22 de-vri-es1 is now known as de-vri-es
12:34:29 dschrempf joins (~dominik@mobiledyn-62-240-134-178.mrsn.at)
12:50:35 Melkor333[m] joins (~melkor333@2001:470:69fc:105::2:3ef7)
12:55:00 × banc quits (banc@gateway/vpn/airvpn/banc) (Ping timeout: 276 seconds)
13:00:58 banc joins (banc@gateway/vpn/airvpn/banc)
13:03:23 × alternateved quits (~alternate@82.180.151.250) (Remote host closed the connection)
13:07:55 alternateved joins (~alternate@82.180.151.250)
13:16:11 × banc quits (banc@gateway/vpn/airvpn/banc) (Ping timeout: 244 seconds)
13:18:00 banc joins (banc@gateway/vpn/airvpn/banc)
13:25:55 × dschrempf quits (~dominik@mobiledyn-62-240-134-178.mrsn.at) (Quit: WeeChat 3.5)
13:38:12 dschrempf joins (~dominik@mobiledyn-62-240-134-178.mrsn.at)
13:41:18 × dschrempf quits (~dominik@mobiledyn-62-240-134-178.mrsn.at) (Client Quit)
13:42:38 dschrempf joins (~dominik@mobiledyn-62-240-134-178.mrsn.at)
13:43:28 × dschrempf quits (~dominik@mobiledyn-62-240-134-178.mrsn.at) (Client Quit)
13:45:24 dschrempf joins (~dominik@mobiledyn-62-240-134-178.mrsn.at)
13:46:06 × dschrempf quits (~dominik@mobiledyn-62-240-134-178.mrsn.at) (Client Quit)
13:49:03 dschrempf joins (~dominik@mobiledyn-62-240-134-178.mrsn.at)
13:49:43 × dschrempf quits (~dominik@mobiledyn-62-240-134-178.mrsn.at) (Client Quit)
13:51:05 dschrempf joins (~dominik@mobiledyn-62-240-134-178.mrsn.at)
13:51:11 × dschrempf quits (~dominik@mobiledyn-62-240-134-178.mrsn.at) (Client Quit)
14:24:23 × alternateved quits (~alternate@82.180.151.250) (Remote host closed the connection)
14:32:54 × B-J quits (~BenziJuni@88.149.64.179) (Quit: ZNC 1.8.2 - https://znc.in)
14:34:18 Benzi-Junior joins (~BenziJuni@88-149-64-179.du.xdsl.is)
14:46:27 Jade1 joins (~Jade1@ip-178-201-128-039.um46.pools.vodafone-ip.de)
14:49:45 <Jade1> Hello, I have this layout here: `tiled   = Tall 1 3/100 1/2` which is essentially a master and stack.
14:49:46 <Jade1> What I want to achieve is to have keybindings that let me select either one and only edit that. I will give an example here:
14:49:46 <Jade1> When the master window is selected, pressing `right` focuses the top window of the stack. pressing right again will not do anything as the stack is already selected. Pressing left gives focus back to the master. When the stack is selected I want Up/Down to go though the stack respectively
14:49:50 <Jade1> How can I achieve this?
14:51:14 <geekosaur> XMonad.Layout.WindowNavigation
14:52:04 <geekosaur> note that it currently has a bug that breaks window borders; I fixed it this past weekend but the PR is still awaiting review
14:53:31 <geekosaur> https://github.com/xmonad/xmonad-contrib/pull/731
14:57:11 <Jade1> thanks, this was exactly what I was looking for
14:57:48 <Jade1> The Bug that breaks window borders is that it shows them as the focused color but brighter?
14:58:12 <geekosaur> actually it turns them all black because XQueryColor doesn't know what to do with alpha channels
14:58:22 <Jade1> ah alright
14:58:35 <geekosaur> the normal behavior is it shows borders by default as focused color but dimmer
14:58:36 <Jade1> for me (focused color red) the borders turn pink when not focused
14:58:43 <Jade1> Ah ok
14:59:29 <geekosaur> also as a temporary workaround we disabled alpha support in git, which leads to some oddball border colors at times depending on what's in the backround
14:59:54 <Jade1> Thanks for all the work on xmonad, already loving it
15:00:08 <Jade1> + I'm derusting my haskell knowledge
15:37:46 × Jade1 quits (~Jade1@ip-178-201-128-039.um46.pools.vodafone-ip.de) (Quit: Client closed)
15:50:21 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.5)
15:58:16 qbt joins (~qbt@user/edun)
16:22:56 <scotabroad[m]> My .xmobarrc file is not working. I copied the template on https://xmonad.org/TUTORIAL.html, but I get the following error: Invalid configuration file: ```"Config" (line 31, column 10):
16:22:56 <scotabroad[m]> unexpected "s"
16:22:56 <scotabroad[m]> expecting space or "Run"```
16:22:56 <scotabroad[m]> I don't know what went wrong
16:24:01 <scotabroad[m]> * My .xmobarrc file is not working. I copied the template on https://xmonad.org/TUTORIAL.html, but I get the following error:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/e03e99ae8994f76f59be924ad01cbcedbaabbf70)
16:27:20 <geekosaur> that error has an annoying tendency to mean your xmobar is missing a plugin. it should have been built with "all_extensions"
16:28:14 <Solid> the xmobar parser could reaaaally use some work
16:28:53 <scotabroad[m]> geekosaur: Ah, so what should I run?
16:29:18 <geekosaur> what distro are you on and how did you install xmobar?
16:29:49 <scotabroad[m]> I am on Fedora 36 and I installed xmobar from the Fedora repos
16:30:09 <scotabroad[m]> It is xmobar 0.38
16:30:22 <geekosaur> hm. those are usually built correctly
16:35:41 <geekosaur> looks like they only turn on some of the flags for some reason
16:36:32 <scotabroad[m]> I had found an example config in my /usr/shar/docs/xmobar. It works, for now
16:36:47 <scotabroad[m]> Just need to customize it now
16:37:46 <geekosaur> you may at some point want to remove the fedora package and install via stack or cabal instead
16:43:21 <scotabroad[m]> I will keep this in mind
17:09:57 <scotabroad[m]> Haha! It was the run alsa section of the original .xmobarrc that was giving me problems
17:11:48 <geekosaur> that's what I figured, since I didn't see that plugin being activated in the fedora package
18:24:35 × MrElendig quits (~Urist@archlinux/op/MrElendig) (Quit: turning on the LHC to destroy the world, for the third time)
18:25:38 MrElendig joins (~Urist@archlinux/op/MrElendig)
18:52:53 × qbt quits (~qbt@user/edun) (Quit: WeeChat 3.5)
21:34:25 × rieper quits (~riepernet@webmirror.geo.uni-leipzig.de) (Remote host closed the connection)
21:35:34 rieper joins (~riepernet@webmirror.geo.uni-leipzig.de)
21:41:38 <liskin> geekosaur: may I revert the revert in xmonad core or are you already on it?
21:41:55 <geekosaur> already on it. also bumping version
21:42:17 <geekosaur> and making xmonad-contrib require the new version so people are guaranteed to have both fixes
21:42:17 <liskin> uh, which version, why?
21:42:28 <liskin> oh
21:42:36 <geekosaur> I suppose it's not essential but it seems right
21:44:11 <geekosaur> hm, I just did this wrong, I'm operating on my own repo not the main one 🙂
21:50:03 <geekosaur> aside, it would be nice if someone who actually understands the StatusBar stuff and xmobar addresses this list thing, except I think he decided to go private with me so I need to get him back on the list 😕
21:53:12 × chomwitt quits (~chomwitt@2a02:587:dc17:ef00:57f2:e4b7:eab5:9cc) (Ping timeout: 276 seconds)
21:56:24 <geekosaur> I figure it'll mean fewer bug reports if they go in sync with each other
21:57:36 <liskin> hm, but the dependency is actually the other way around
21:58:24 <liskin> the new core with revert of the revert (as well as the old without either revert but with the alpha fix) needs recent contrib
21:58:39 <liskin> there's no way to express that in cabal
21:59:29 <liskin> (there's no way to express that the old core needs new contrib anywhere, but the "new needs new" could be expressed using Breaks: in dpkg :-))
22:00:36 <geekosaur> it looks like I missed something, stack.yaml probably
22:01:02 <geekosaur> hm, no
22:01:32 <geekosaur> anyway it seems contrib has the new dependency but is still trying to build against the old xmonad, which means the build plan is failing
22:02:49 <geekosaur> sigh. does this require something stupid like uploading to hackage for contrib build to find the updated xmonad?
22:02:57 <geekosaur> if so I'll just revert those changes
22:04:24 <liskin> well, last time we had to bump the lower bound (and we actually had a really good reason for that), we disabled half of the testing matrix for a couple months
22:04:24 <geekosaur> means some people may get the fix but not see/know it because they didn't also update xmonad
22:04:41 <geekosaur> right, that's probably the same thing, need to update on hackage
22:04:52 <liskin> because part of the testing matrix makes sure that git xmonad-contrib builds against xmonad core release
22:05:00 <geekosaur> I had to futz around a lot locally while testing
22:05:17 <liskin> so yeah in this case I'd say just undo the bump
22:05:23 <geekosaur> so I just reverted the bump and force-pushed
22:05:31 <geekosaur> we'll get over it
22:07:50 <geekosaur> and the user who was having problems with StatusBar now says they hit a typo in TUTORIAL so I asked them to report it. let's see if they do
22:08:29 <geekosaur> (and everything is now working without the hack of doing dynamicLogString directly)
22:10:53 <liskin> you only reverted the changelog revert so I pushed the actual revert of revert
22:11:01 <geekosaur> oh, sorry
22:11:02 <liskin> which had conflicts because hlint in the meantime
22:11:17 <geekosaur> confused that with a merge commit apparently
22:11:28 <liskin> so probably best that I dealt with it because HLS makes it super easy
22:11:32 <geekosaur> here I was thinking I was starting to figure git out 🙂
22:11:42 <liskin> although not entirely because of course it has a different hlint version than our CI :-)
22:13:06 <liskin> oh and I should deal with the failing Nix pipeline :-/
22:13:13 <liskin> but I'm swamped with dayjob stuff
22:14:50 <geekosaur> it happens
22:15:15 <geekosaur> I'm fihting with a recalcitrant backup and still more SSD paperwork
23:36:51 <scotabroad[m]> <geekosaur> "that's what I figured, since I..." <- How do you see what plugins are activated? I know Fedora has the with_weather package since I have configured weather
23:37:16 <geekosaur> I dug out their package build info
23:38:26 <geekosaur> https://src.fedoraproject.org/rpms/xmobar/blob/rawhide/f/xmobar-flags.patch
23:39:11 <scotabroad[m]> Ah, thanks!
23:39:21 <geekosaur> I don't know if xmobar [provides a way to otherwise check what plugins it was built with
23:41:12 <geekosaur> mm, guess that's for rawhide, not a release fedora, but I expect they'd be pretty similar
23:43:45 <scotabroad[m]> Yeah, it's the same file as here: https://src.fedoraproject.org/rpms/xmobar/blob/f36/f/xmobar-flags.patch
23:44:40 <scotabroad[m]> Probably will compile it myself then
23:44:54 <scotabroad[m]> using cabal
23:46:53 <geekosaur> probably need to install the alsa devel package, whatever fedora calls it (it was libasound-dev on ubuntu but that may not help much)

All times are in UTC on 2022-07-05.