Home liberachat/#xmonad: Logs Calendar

Logs on 2024-12-18 (liberachat/#xmonad)

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

All times are in UTC on 2024-12-18.