Home liberachat/#xmonad: Logs Calendar

Logs: liberachat/#xmonad

←Prev  Next→ 184,930 events total
2023-07-04 21:12:54 BakaOtaku[m] joins (~tanish200@2001:470:69fc:105::3:7c93)
2023-07-04 21:20:26 <BakaOtaku[m]> hello guys. I want to use `XMonad.Hooks.BorderPerWindow` to set borders just for my terminal. I've set border=0. And as per the docs I've added this to my managehook `title =? "st" --> defineBorderWidth 45`
2023-07-04 21:20:26 <BakaOtaku[m]> This works! but whenever I open a app inside terminal say like neovim it changes the window title but still the border doesn't go away.
2023-07-04 21:20:26 <BakaOtaku[m]> so basically I want dynamic per window borders.
2023-07-04 21:20:26 <BakaOtaku[m]> Help will be appreciated thanks!
2023-07-04 21:21:18 Guest30 joins (~Guest30@122.160.64.38)
2023-07-04 21:27:29 × Guest30 quits (~Guest30@122.160.64.38) (Quit: Client closed)
2023-07-04 21:32:39 <geekosaur> manageHook can't be used for dynamic stuff; you want XMonad.Hooks.DyanmicProperty
2023-07-04 21:32:57 liskin[m] joins (~liskinmat@2001:470:69fc:105::768)
2023-07-04 21:33:12 unclechu joins (~unclechu@2001:470:69fc:105::354)
2023-07-04 21:51:44 <BakaOtaku[m]> ok so I removed everything from the manageHook and added this: `dynamicPropertyChange "WM_NAME" (title =? "st" --> defineBorderWidth 45)` to eventHook but it still doesn't work and now I don't even get the initial borders that showed up with just managehook.
2023-07-04 21:56:34 <[Leary]> That says to set border width to 45 for windows newly changing their title to "st". It doesn't say what to do with windows that change their title to anything else, nor what to do with windows created with the title "st".
2023-07-04 21:58:26 <[Leary]> You can keep using the manage hook as it was, but probably want something like `title >>= \t -> defineBorderWidth (if t == "st" then 45 else 1)` in the title-change hook.
2023-07-04 22:05:11 <BakaOtaku[m]> Thanks! That seems to work. it's kinda slowish but nothing too much to worry about
2023-07-04 22:07:00 <geekosaur> there's a speedup to the dynamicPropertyChange stuff in git iirc
2023-07-04 22:07:24 <geekosaur> in released versions it triggers too often
2023-07-04 22:12:45 <[Leary]> Part of the issue could also be that `defineBorderWidth` delays action to the log hook, where it also requests a refresh that I'm not sure is necessary. The indirection is currently unavoidable in the manage hook, but could be erased from the title-change hook.
2023-07-04 22:36:07 BakaOtaku[m] uploaded a video: (784KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/HIZvdIkxeFIIiBpYVmvBlMuN/record-2023.07.05-04%3A02%3A27.mp4 >
2023-07-04 22:36:08 <BakaOtaku[m]> @[Leary]:libera.chat: I'm having a small problem. I use `XMonad.Hooks.WindowSwallowing` with my terminal and idk why but whenever I restore the terminal after it's swallowed the border resize doesn't work.
2023-07-04 22:36:08 <BakaOtaku[m]> You can see this in the screen recording I've attached thanks
2023-07-04 22:36:08 <lambdabot> Unknown command, try @list
2023-07-04 22:45:07 × m5zs7k quits (aquares@web10.mydevil.net) (Ping timeout: 246 seconds)
2023-07-04 22:45:54 m5zs7k joins (aquares@web10.mydevil.net)
2023-07-04 22:50:33 <BakaOtaku[m]> s/@[Leary]:libera.chat://
2023-07-04 23:06:39 Guest30 joins (~Guest30@122.160.64.38)
2023-07-04 23:12:47 × Guest30 quits (~Guest30@122.160.64.38) (Quit: Client closed)
2023-07-04 23:13:37 <geekosaur> restoring the window counts neither as a property change nor as a _new_ mapping of the window, so nothing happens to trigger the border resize
2023-07-04 23:19:37 <[Leary]> This is another consequence of `setInitialProperties` being in the wrong place. The parent window would just keep its proper border size, but `windows` thinks it's new and resets the properties to defaults.
2023-07-04 23:36:38 <BakaOtaku[m]> so would there be a workaround for this?🤔
2023-07-04 23:50:59 <BakaOtaku[m]> <geekosaur> "restoring the window counts..." <- Yes but the title of the window never changes the window just gets withdrawn/swallowed so the border should remain the same no?
2023-07-04 23:52:19 <[Leary]> You could declare `windowCloseHook :: ManageHook -> Event -> X All; windowCloseHook mh DestroyWindowEvent{ ev_event = w0, ev_window = w } | w0 == w = runQuery mh w $> mempty; windowCloseHook _ _ = mempty`, then in your event hook do `(dynamicTitle <> windowCloseHook) (title >>= \t -> ...)`.
2023-07-04 23:52:37 <geekosaur> that depends on your swallowEventHook; if you look for a title change…
2023-07-04 23:58:18 × jabuxas_ quits (~jabuxas@user/jabuxas) (Server closed connection)
2023-07-04 23:58:44 jabuxas_ joins (~jabuxas@user/jabuxas)
2023-07-05 00:06:24 <geekosaur> (the problem with which is the title may change back while the window is still unmapped, hence won't trigger the event hook)
2023-07-05 00:08:48 <BakaOtaku[m]> <[Leary]> "You could declare `windowCloseHo..." <- so I did this:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/f816ec905e32012512281a8cab9705ffd0422513>)
2023-07-05 00:09:42 <BakaOtaku[m]> <[Leary]> "You could declare `windowCloseHo..." <- so I did this:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/561c5087d5fa65ea719ca938ed74af48aed1eb4a>)
2023-07-05 00:11:11 <BakaOtaku[m]> sorry if these are easy errors. I have very little experience with haskell. I've hacked together a xmonad config which works nicely for me and I mainly learn all my haskell through this project :)
2023-07-05 00:12:27 <[Leary]> Mostly errors in copying. You're using `<$>` where I have `$>`, and you haven't bracketed `(dynamicTitle <> windowCloseHook)`.
2023-07-05 00:18:30 <[Leary]> Mmmm. Technically this hook should take a `Query ()` rather than a `ManageHook`, but whatever, it should work as written.
2023-07-05 00:19:08 <BakaOtaku[m]> My bad! I fixed them and it compiles fine but I still get that issue i.e after exiting the child window the parent window(terminal in this case) doesn't restore border 🤔... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/cc0ed894d7c5849e089c64d0db8f15cdc45b0295>)
2023-07-05 00:20:00 <BakaOtaku[m]> * My bad! I fixed them and it compiles fine but I still get that issue i.e after exiting the child window the parent window(terminal in this case) doesn't restore border 🤔... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/d9aada6620870614bfc78d3b03fcbacb2d453cc9>)
2023-07-05 00:20:52 geekosaur[c] joins (sid609282@id-609282.lymington.irccloud.com)
2023-07-05 00:22:26 × geekosaur[c] quits (sid609282@id-609282.lymington.irccloud.com) (Changing host)
2023-07-05 00:22:26 geekosaur[c] joins (sid609282@xmonad/geekosaur)
2023-07-05 00:23:26 <[Leary]> You might need to swap the order with the swallowing hook.
2023-07-05 00:27:31 <BakaOtaku[m]> what do you mean? just move the swallowEventHook above the dynamictitle?... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/185faa6c4e4294cb3540108e57ac94ad4c829fae>)
2023-07-05 00:28:05 <absta[m]> Does anyone have a clue about my question/problem above?
2023-07-05 00:29:13 <geekosaur> I saw your question but I have no idea why it'd be a problem
2023-07-05 00:29:35 <geekosaur> I run xmonad with mate and everything works as expected
2023-07-05 00:29:59 geekosaur[m] parts (~geekosaur@xmonad/geekosaur) ()
2023-07-05 00:30:30 <absta[m]> I applied doCenterFloat on the dialogs, but nautilus dialogs do not go afloat.
2023-07-05 00:31:01 <absta[m]> They stay tiled, even though they have .._DIALOG type.
2023-07-05 00:31:41 <[Leary]> BakaOtaku[m]: Okay, I'm not sure what's going wrong then; I'd have to take a closer look at what's actually happening.
2023-07-05 00:31:44 <absta[m]> Also I manually apply Ce terFloat on Gnome Calculator as well, and that one also stays tiled.
2023-07-05 00:32:02 <geekosaur> caja dialogs float with `isDialog --> doFloatPlace` (which uses XMonad.Hooks.Place rather than `doCenterFloat`, but that shouldn't matter)
2023-07-05 00:32:13 <geekosaur> can you pastebin your config?
2023-07-05 00:32:16 <geekosaur> @where paste
2023-07-05 00:32:16 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2023-07-05 00:32:25 <absta[m]> Yep, moment
2023-07-05 00:33:47 <BakaOtaku[m]> [Leary]: haha no problem!
2023-07-05 00:33:47 <BakaOtaku[m]> since my config is dividied up and you want to see the full config then I can maybe push a test_branch to my git repo for you to check?
2023-07-05 00:34:35 <absta[m]> geekosaur: https://paste.tomsmeding.com/8VGOj6E5
2023-07-05 00:37:14 <absta[m]> (What does Mate use for file browser? nemo?)
2023-07-05 00:38:29 <geekosaur> caja, which is more or less nautilus with the serial numbers filed off
2023-07-05 00:38:56 <geekosaur> similarly for mate-calculator vs. gnome-calculator
2023-07-05 00:39:05 <geekosaur> (mate is a maintained fork of gnome 2)
2023-07-05 00:40:13 <absta[m]> Hmm, I mean lower versions of nautilus worked as expected
2023-07-05 00:41:37 <geekosaur> did you verify they come up with all the properties in place when the window is mapped? gnome is so wayland-happy that I would not be surprised if they simply broke x11 completely, especially given that wayland doesn't use any of these things
2023-07-05 00:42:08 <geekosaur> (which is a big reason we're not trying to target wayland yet: the things people want won't work)
2023-07-05 00:43:44 <[Leary]> BakaOtaku[m]: I was mostly thinking about the code paths in xmonad and the relevant contrib modules, but the details of your config may also become relevant; go ahead and link it.
2023-07-05 00:43:54 <geekosaur> XMonad.Hooks.ManageDebug can be used to examine window state when a window opens: https://github.com/geekosaur/xmonad.hs/blob/skkukuk/xmonad.hs#L55
2023-07-05 00:44:10 <geekosaur> absta[m] ^
2023-07-05 00:44:43 <geekosaur> I should really identify people more, especially with two discussions at once and irc doesn't do threads
2023-07-05 00:44:52 <BakaOtaku[m]> [Leary]: here! https://github.com/Tanish2002/xmonad-tanish2002/blob/dynamic-border/src/Hooks/EventHook.hs
2023-07-05 00:46:17 <geekosaur> absta[m], X11 and EWMH mandate that certain properties be set before the window is mapped. wayland doesn't use most of the relevant window properties…
2023-07-05 01:07:25 <absta[m]> Let me debug it then when I am back at my computer
2023-07-05 01:08:06 <absta[m]> I also suspect they might be settingnall the properties too late
2023-07-05 02:20:17 × td_ quits (~td@i53870926.versanet.de) (Ping timeout: 246 seconds)
2023-07-05 02:22:11 td_ joins (~td@i53870923.versanet.de)
2023-07-05 03:04:02 × defjam quits (~defjam@2a02:c7e:2807:b900:60da:dd5e:157c:f21c) (Ping timeout: 246 seconds)
2023-07-05 03:17:39 defjam joins (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f)
2023-07-05 03:21:58 × defjam quits (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f) (Ping timeout: 246 seconds)
2023-07-05 03:35:07 defjam joins (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f)
2023-07-05 03:40:28 × defjam quits (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f) (Ping timeout: 240 seconds)
2023-07-05 03:54:28 defjam joins (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f)
2023-07-05 03:59:11 × defjam quits (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f) (Ping timeout: 260 seconds)
2023-07-05 04:02:48 × [Leary] quits (~Leary]@user/Leary/x-0910699) (Server closed connection)
2023-07-05 04:07:30 defjam joins (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f)
2023-07-05 04:12:35 × defjam quits (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f) (Ping timeout: 260 seconds)
2023-07-05 04:24:47 defjam joins (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f)
2023-07-05 04:29:26 × defjam quits (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f) (Ping timeout: 246 seconds)
2023-07-05 04:43:09 defjam joins (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f)
2023-07-05 04:48:18 × defjam quits (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f) (Ping timeout: 260 seconds)
2023-07-05 04:58:13 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 246 seconds)
2023-07-05 05:01:01 defjam joins (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f)
2023-07-05 05:05:32 × defjam quits (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f) (Ping timeout: 240 seconds)
2023-07-05 05:18:28 × tv1 quits (~tv@user/tv) (Ping timeout: 250 seconds)
2023-07-05 05:18:30 defjam joins (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f)
2023-07-05 05:22:49 × defjam quits (~defjam@2a02:c7e:2807:b900:79d2:eb8:1592:99f) (Ping timeout: 240 seconds)

All times are in UTC.