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