2024/12/18

2024-12-18 00:55:09 +0000alp(~alp@2001:861:8ca0:4940:116b:e777:775e:985b) (Ping timeout: 252 seconds)
2024-12-18 01:09:51 +0000deepy(deepy@user/deepy) (Read error: Connection reset by peer)
2024-12-18 01:13:02 +0000deepy(deepy@user/deepy) deepy
2024-12-18 01:21:19 +0000yaslam_(~yaslam@user/yaslam) yaslam
2024-12-18 01:21:39 +0000yaslam(~yaslam@user/yaslam) (Ping timeout: 265 seconds)
2024-12-18 01:31:31 +0000haskellbridge(~hackager@syn-024-093-192-219.res.spectrum.com) (Remote host closed the connection)
2024-12-18 01:58:54 +0000haskellbridge(~hackager@syn-024-093-192-219.res.spectrum.com) hackager
2024-12-18 01:59:23 +0000haskellbridge(~hackager@syn-024-093-192-219.res.spectrum.com) (Remote host closed the connection)
2024-12-18 01:59:49 +0000haskellbridge(~hackager@syn-024-093-192-219.res.spectrum.com) hackager
2024-12-18 02:49:24 +0000 <beastwick> howdy again
2024-12-18 02:49:33 +0000 <geekosaur> o/
2024-12-18 02:50:28 +0000 <beastwick> I am trying to use two libraries, physicalscreens and onscreen. My goal is run a function that affects the opposite screen while focus is on the current screen.
2024-12-18 02:50:39 +0000 <beastwick> what I have is wrong, but I think I am close
2024-12-18 02:50:51 +0000 <beastwick> , ((mod4Mask .|. controlMask, xK_e), onScreen viewEmptyWorkspace FocusCurrent getNeighbor)
2024-12-18 02:51:18 +0000 <beastwick> this doesn't work, but I think I have the right idea
2024-12-18 02:51:24 +0000 <beastwick> types don't match up sadly
2024-12-18 02:55:49 +0000 <beastwick> Variable not in scope: getNeighbor :: ScreenId, not sure if more would pop up after solving that
2024-12-18 02:56:24 +0000 <geekosaur> more will, and I see no getNeighbor in xmonad or -contrib
2024-12-18 02:56:36 +0000 <beastwick> https://hackage.haskell.org/package/xmonad-contrib-0.18.1/docs/src/XMonad.Actions.PhysicalScreens.…
2024-12-18 02:56:48 +0000 <geekosaur> also you need onScreen' since viewEmptyWorkspace :: X ()
2024-12-18 02:57:30 +0000 <geekosaur> oh, I see, isn't in stackage (I'm using hoogle as a shortcut)
2024-12-18 02:58:28 +0000 <beastwick> no problem
2024-12-18 02:58:33 +0000 <geekosaur> uh, I'm looking at that page and there is no getNeighbour
2024-12-18 02:58:46 +0000 <beastwick> weird
2024-12-18 02:59:15 +0000 <geekosaur> ohhh, you're poking in the source. it's not exported
2024-12-18 02:59:19 +0000 <geekosaur> you can't use it
2024-12-18 02:59:36 +0000 <beastwick> oh derp, I was wondering why it wasn't on the non source view
2024-12-18 03:00:08 +0000 <beastwick> not sure how to get the screenId of the screen adjacent to the one I am on. In my case, I just have two screens.
2024-12-18 03:01:26 +0000 <geekosaur> cheat. (\(S n) -> S (1 - n))
2024-12-18 03:02:04 +0000 <geekosaur> the remaining problem is that onScreen must be run within XMonad.Operations.windows
2024-12-18 03:02:47 +0000 <geekosaur> so: windows (onScreen' viewEmptyWorkspace FocusCurrent (\(S n) -> S (1 - n))
2024-12-18 03:03:15 +0000 <geekosaur> only works with 2 screeens, but since that's what you have…
2024-12-18 03:03:35 +0000 <beastwick> so I guess it just ignores anything to do with windows, but its happy as long as it is runs within operations.windows
2024-12-18 03:03:56 +0000 <geekosaur> "windows" modifies the StackSet
2024-12-18 03:04:14 +0000 <beastwick> yeah, but that sounded strange to me to need since I don't think I am modifying the stackset
2024-12-18 03:04:15 +0000 <geekosaur> it is somewhat misnamed when the modification in question doesn't affect any windows, yes
2024-12-18 03:04:16 +0000 <beastwick> or am I?
2024-12-18 03:04:21 +0000 <beastwick> ah okay
2024-12-18 03:04:29 +0000 <geekosaur> look at the type of onScreen
2024-12-18 03:04:39 +0000 <geekosaur> what is the final parameter and the result type?
2024-12-18 03:05:35 +0000 <geekosaur> (WindowSet is StackSet with all the type parameters filled in correctly for xmonad)
2024-12-18 03:05:54 +0000 <geekosaur> (since it takes like 5 of them, so it can be tested with a proof checker that doesn't have any X11 types in it)
2024-12-18 03:06:28 +0000 <beastwick> https://pastebin.com/tEb0kBZ8
2024-12-18 03:07:04 +0000 <geekosaur> oh, right, you don't have one there 😕
2024-12-18 03:07:43 +0000 <beastwick> I don't have a window you mean?
2024-12-18 03:08:07 +0000 <beastwick> can I give it null windows? haha
2024-12-18 03:08:36 +0000 <geekosaur> you don't have a ScreenId to start with, so we can't turn it into the other ScreenId
2024-12-18 03:08:53 +0000 <geekosaur> except, well, you do have it but you need to dig around in the WindowSet to get it
2024-12-18 03:11:13 +0000 <geekosaur> windows (\ws -> onScreen' viewEmptyWorkspace FocusCurrent (1 - (S.screen . S.current $ ws) ws
2024-12-18 03:11:15 +0000 <geekosaur> I think
2024-12-18 03:11:50 +0000 <geekosaur> no
2024-12-18 03:11:54 +0000 <geekosaur> wrong prefix 😕
2024-12-18 03:13:50 +0000 <beastwick> wrong prefix?
2024-12-18 03:16:18 +0000 <geekosaur> it's wromnganyway
2024-12-18 03:17:02 +0000 <geekosaur> (I needed W. instead of S., but there are bigger problems; onScreen' doesn't run inside X.O.windows so getting a ScreeenID is harder)
2024-12-18 03:18:34 +0000 <geekosaur> okay, ugly but the types work
2024-12-18 03:18:38 +0000 <geekosaur> gets (W.screen . W.current . windowset) >>= \(S s) -> onScreen' viewEmptyWorkspace FocusCurrent (S (1 - s))
2024-12-18 03:18:53 +0000 <beastwick> it's beautiful
2024-12-18 03:18:55 +0000 <geekosaur> without X.O.windows, because onScreen' doesn't use it
2024-12-18 03:19:10 +0000 <geekosaur> and you can't use viewEmptyWorkspace with X.O.windows
2024-12-18 03:19:10 +0000 <beastwick> is 'gets' required?
2024-12-18 03:19:13 +0000 <geekosaur> yes
2024-12-18 03:19:20 +0000 <geekosaur> it's what extracts the current screen
2024-12-18 03:19:56 +0000 <geekosaur> "get with selector (W.screen . W.current . windowset)"
2024-12-18 03:20:45 +0000 <geekosaur> see https://hackage.haskell.org/package/transformers/docs/Control-Monad-Trans-State-Lazy.html#v:gets
2024-12-18 03:21:40 +0000 <beastwick> thanks ^, this worked!
2024-12-18 03:21:50 +0000 <beastwick> I will study the solution
2024-12-18 03:22:38 +0000 <beastwick> this was simply for focusing/hiding distractions on other screens, I am lazy and don't want to have to focus them to hide them.
2024-12-18 03:22:46 +0000 <beastwick> :D
2024-12-18 03:23:28 +0000 <geekosaur> isn't it easier to make a compositor dim non-focused screens to 0?
2024-12-18 03:24:27 +0000Leary(~Leary@user/Leary/x-0910699) (Remote host closed the connection)
2024-12-18 03:25:13 +0000 <beastwick> I didn't even know you could do that...
2024-12-18 03:25:28 +0000 <beastwick> and I am not using a compositor with my xmonad, maybe I should I suppose
2024-12-18 03:26:09 +0000 <beastwick> ohhh, that's also assuming I can programatically affect my monitor brightness also - not sure I can
2024-12-18 03:27:14 +0000 <geekosaur> on second thought, compositors don't know about xmonad's screens, they think the whole thing is a single workspace
2024-12-18 03:27:14 +0000 <beastwick> I like your solution
2024-12-18 03:27:37 +0000 <geekosaur> and no, I'm not talking about monitor brightness
2024-12-18 03:28:15 +0000 <geekosaur> it's about the compositor adjusting the brightness or the transparency of windows as it renders them to the actual screen
2024-12-18 03:28:28 +0000 <geekosaur> picom can do both
2024-12-18 03:28:55 +0000 <geekosaur> sadly it doesn't know about xmonad workspaces so it can't dial down either one properly here
2024-12-18 03:28:57 +0000 <geekosaur> oh well
2024-12-18 03:29:11 +0000 <beastwick> haha, i'll check out picom regardless
2024-12-18 03:29:23 +0000 <beastwick> but also your sln is working for me
2024-12-18 03:42:19 +0000terrorjack4(~terrorjac@2a01:4f8:c17:dc9f::) (Quit: The Lounge - https://thelounge.chat)
2024-12-18 03:45:09 +0000terrorjack4(~terrorjac@2a01:4f8:c17:dc9f::) terrorjack
2024-12-18 03:47:11 +0000Leary(~Leary@user/Leary/x-0910699) Leary
2024-12-18 03:47:51 +0000td_(~td@i5387092E.versanet.de) (Ping timeout: 252 seconds)
2024-12-18 03:49:45 +0000td_(~td@i53870921.versanet.de) td_
2024-12-18 03:50:14 +0000 <geekosaur> actually I think that can be simplified slightly because someone thought it was a good idea to give ScreenId a Num instance
2024-12-18 03:50:39 +0000 <geekosaur> gets (W.screen . W.current . windowset) >>= \s -> onScreen' viewEmptyWorkspace FocusCurrent (1 - s)
2024-12-18 04:03:13 +0000 <beastwick> I'll give it a try
2024-12-18 04:35:51 +0000rekahsoft(~rekahsoft@76.69.85.220) (Remote host closed the connection)
2024-12-18 04:41:23 +0000alp(~alp@2001:861:8ca0:4940:d739:f225:bf6f:3d8f)
2024-12-18 04:45:24 +0000ChubaDuba(~ChubaDuba@79.136.177.225) ChubaDuba
2024-12-18 06:07:37 +0000OftenFaded(~OftenFade@user/tisktisk) OftenFaded
2024-12-18 07:51:03 +0000jusa(~jusa@kraa.fi) (Quit: WeeChat 4.4.1)
2024-12-18 07:53:14 +0000jusa(~jusa@kraa.fi) jusa
2024-12-18 08:49:20 +0000ash3en(~Thunderbi@193.32.248.167) ash3en
2024-12-18 08:52:17 +0000Digitteknohippie(~user@user/digit) Digit
2024-12-18 08:53:40 +0000Digit(~user@user/digit) (Ping timeout: 260 seconds)
2024-12-18 09:01:26 +0000ash3en1(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2024-12-18 09:02:15 +0000ash3en1(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Client Quit)
2024-12-18 09:03:12 +0000ash3en(~Thunderbi@193.32.248.167) (Ping timeout: 252 seconds)
2024-12-18 09:09:54 +0000DigitteknohippieDigit
2024-12-18 09:17:51 +0000Leary(~Leary@user/Leary/x-0910699) (Remote host closed the connection)
2024-12-18 09:28:41 +0000Leary(~Leary@user/Leary/x-0910699) Leary
2024-12-18 10:20:09 +0000OftenFaded(~OftenFade@user/tisktisk) (Quit: Client closed)
2024-12-18 11:49:15 +0000alp(~alp@2001:861:8ca0:4940:d739:f225:bf6f:3d8f) (Ping timeout: 260 seconds)
2024-12-18 12:39:05 +0000ash3en(~Thunderbi@146.70.124.222) ash3en
2024-12-18 12:44:40 +0000ash3en(~Thunderbi@146.70.124.222) (Remote host closed the connection)
2024-12-18 14:39:53 +0000ChubaDuba(~ChubaDuba@79.136.177.225) (Quit: WeeChat 4.4.2)
2024-12-18 15:39:00 +0000ash3en(~Thunderbi@146.70.124.222) ash3en
2024-12-18 15:43:14 +0000ash3en(~Thunderbi@146.70.124.222) (Ping timeout: 252 seconds)
2024-12-18 15:59:47 +0000sol20(~sol@49.228.249.152)
2024-12-18 16:00:10 +0000 <sol20> Hi 👋
2024-12-18 16:00:59 +0000 <geekosaur> hello
2024-12-18 16:01:56 +0000 <sol20> I'm writing a layout. The layout should display some windows in dedicated areas.
2024-12-18 16:02:22 +0000 <sol20> What would be the most idiomatic way to do that?
2024-12-18 16:02:54 +0000 <sol20> Usually it should be some specific program or something
2024-12-18 16:03:28 +0000 <sol20> The question is, how should I tag my windows?  With x properties?
2024-12-18 16:05:26 +0000 <sol20> Think of it like that, let's say I start e.g. ghcid in some terminal, I wanna treat the windows differently in my layout.
2024-12-18 16:05:31 +0000 <geekosaur> have you looked at https://hackage.haskell.org/package/xmonad-contrib-0.18.1/docs/XMonad-Layout-IM.html and https://hackage.haskell.org/package/xmonad-contrib-0.18.1/docs/XMonad-Layout-Monitor.html
2024-12-18 16:06:21 +0000 <sol20> Let me take a look.
2024-12-18 16:06:53 +0000 <geekosaur> if you want to use window propeerties instead of what amounts to ManageHooks, there's https://hackage.haskell.org/package/xmonad-contrib-0.18.1/docs/XMonad-Actions-TagWindows.html as a starting point
2024-12-18 16:14:10 +0000 <sol20> geekosaur I think this gives me something to work with. Thanks a lot.
2024-12-18 16:17:25 +0000haskellbridge(~hackager@syn-024-093-192-219.res.spectrum.com) (Remote host closed the connection)
2024-12-18 16:18:21 +0000haskellbridge(~hackager@syn-024-093-192-219.res.spectrum.com) hackager
2024-12-18 16:23:25 +0000sol20(~sol@49.228.249.152) (Quit: Client closed)
2024-12-18 16:38:15 +0000alp(~alp@2001:861:8ca0:4940:268e:5456:127:feca)
2024-12-18 16:40:26 +0000Profpatsch(~Profpatsc@user/Profpatsch) (WeeChat 4.4.3)
2024-12-18 18:19:23 +0000OftenFaded(~OftenFade@user/tisktisk) OftenFaded
2024-12-18 19:04:38 +0000ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2024-12-18 19:41:17 +0000ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en)
2024-12-18 22:40:45 +0000OftenFaded(~OftenFade@user/tisktisk) (Quit: Client closed)
2024-12-18 22:42:13 +0000OftenFaded(~OftenFade@user/tisktisk) OftenFaded
2024-12-18 22:43:01 +0000OftenFaded(~OftenFade@user/tisktisk) (Client Quit)
2024-12-18 22:44:11 +0000OftenFaded(~OftenFade@user/tisktisk) OftenFaded
2024-12-18 22:49:34 +0000bwolf(c3bc363dd1@2a03:6000:1812:100::180) ()