2022/05/03

2022-05-03 00:24:55 +0200 <abastro[m]> How does "rendering" in xmonad work?
2022-05-03 00:25:53 +0200 <liskin> abastro[m]: what do you mean by rendering?
2022-05-03 00:26:31 +0200 <geekosaur> we don't do rendering, that's up to the client (and the compositor if any). window managers are about window placement and focus policy
2022-05-03 00:26:38 +0200 <abastro[m]> E.g. treeselect, gridselect
2022-05-03 00:26:53 +0200 <abastro[m]> (E.g. calling GL is called rendering)
2022-05-03 00:27:16 +0200 <abastro[m]> Also tabbed layout does some rendering for the tabs
2022-05-03 00:27:37 +0200 <geekosaur> gridselect does do rendering but it uses X11 primitives. it's all pretty low level. see XMonad.Util.XUtils
2022-05-03 00:27:58 +0200 <abastro[m]> Oh, X11 primitives
2022-05-03 00:28:19 +0200 <abastro[m]> No way to render an icon then? :P
2022-05-03 00:28:25 +0200 <liskin> yep, treeselect as well, XFillRectangle and XDrawString and stuff :-)
2022-05-03 00:29:09 +0200 <geekosaur> mm, tabs can draw 2-color icons if given a list of lists of bools (ick)
2022-05-03 00:30:17 +0200 <abastro[m]> Oh, there are icons
2022-05-03 00:30:30 +0200 <abastro[m]> List of list of bools?
2022-05-03 00:30:32 +0200 <abastro[m]> Ouch
2022-05-03 00:30:44 +0200 <abastro[m]> So.. no one even bothered to depend on Array
2022-05-03 00:32:38 +0200 <abastro[m]> Eek, so it just... draws it
2022-05-03 00:32:57 +0200 <geekosaur> https://github.com/xmonad/xmonad-contrib/blob/master/XMonad/Util/Image.hs
2022-05-03 00:33:08 +0200 <geekosaur> yeh, just blasts bits
2022-05-03 00:33:26 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
2022-05-03 00:35:08 +0200 <abastro[m]> Guess I'd make a GTK application if I wanted tabs with proper icons
2022-05-03 00:36:55 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-05-03 00:40:27 +0200 <abastro[m]> Can I fork a OS thread as GTK application? XD
2022-05-03 00:42:53 +0200 <geekosaur> built into xmonad? technically yes, but you'd have to find a way for it to have its own event loop independent of the main one
2022-05-03 00:43:29 +0200 <geekosaur> the only way they could communicate is by client messages
2022-05-03 00:43:59 +0200 <abastro[m]> Does the GTK thread have to be main one?
2022-05-03 00:44:21 +0200 <geekosaur> I don't know gtk well enough to say
2022-05-03 00:44:38 +0200 <abastro[m]> Oh
2022-05-03 00:44:54 +0200 <abastro[m]> What do you mean by "own event loop independent of the main one" then?
2022-05-03 00:44:57 +0200 <geekosaur> I suspect not, as long as all work is done by one thread (you have onbe server connection, it cannot be multiplexed across threads)
2022-05-03 00:45:49 +0200 <geekosaur> xmonad has its own event loop. you cannot make use of it, you must open an independent server connection with its own event loop. they cannot communicate between each other except via client messages.
2022-05-03 00:46:13 +0200 <abastro[m]> Indeed
2022-05-03 00:46:15 +0200 <abastro[m]> Uhm wait
2022-05-03 00:46:24 +0200zawaken(~zawaken@user/zawaken) (Read error: Connection reset by peer)
2022-05-03 00:46:26 +0200 <abastro[m]> They cannot communicate with each other?
2022-05-03 00:46:58 +0200 <abastro[m]> Does MVars not work btwn the xmonad event loop and gtk event loop then?
2022-05-03 00:47:08 +0200 <geekosaur> if a gtk app is multithreaded then the other threads must post events back to the main gtk thread (whether this has to be the main app thread I don't know, but it certainly has to be the thread that owns gtk's server connection)
2022-05-03 00:47:10 +0200zawaken(~zawaken@user/zawaken)
2022-05-03 00:47:34 +0200 <geekosaur> do you plan to rewrite the core to handle MVars?
2022-05-03 00:47:52 +0200 <geekosaur> it only processes X events currently
2022-05-03 00:48:48 +0200 <abastro[m]> Ehhh
2022-05-03 00:49:19 +0200 <abastro[m]> I was planning to let the local GTK app communicate with Xmonad through MVars.
2022-05-03 00:49:59 +0200 <abastro[m]> Idk about the X events handling and all, separate threads deserve treatment as separate threads
2022-05-03 00:50:02 +0200 <geekosaur> you cannot block the main loop on an MVar unless you can guarantee it will unblock in a timely manner
2022-05-03 00:50:50 +0200 <geekosaur> else you can block the entire UI because a window is not being placed while it's waiting on your MVar. and that much worse if the window in question was created by your GTk app
2022-05-03 00:51:44 +0200 <abastro[m]> Oh wait, right. Duh, I missed that part
2022-05-03 00:55:31 +0200 <abastro[m]> Can I periodically run a job in xmonad? geekosaur
2022-05-03 00:56:46 +0200 <geekosaur> not reliably
2022-05-03 00:57:14 +0200 <abastro[m]> Oh. :<
2022-05-03 00:57:24 +0200 <abastro[m]> How unreliable is it
2022-05-03 00:57:33 +0200 <geekosaur> xmonad only wakes up when it receives an X event, and since it only does window management that only happens when you open a new window, change focus, change workspaces, or similar
2022-05-03 00:58:33 +0200 <geekosaur> various things in contrib work around this by spawning a thread which sleeps a bit and sends a client message to the main loop, but this is somewhat unstable across restarts
2022-05-03 00:58:56 +0200 <abastro[m]> How about, close a new window
2022-05-03 00:59:17 +0200 <geekosaur> that also creates an event, yes
2022-05-03 01:04:27 +0200 <abastro[m]> geekosaur: How does treeselect works then?
2022-05-03 01:05:20 +0200 <abastro[m]> It at least needs to redraw couple of times
2022-05-03 01:06:44 +0200werneta(~werneta@137.79.197.49) (Ping timeout: 248 seconds)
2022-05-03 01:13:02 +0200 <geekosaur> most of those run their own private event loops on the hopeful assumption that nothing will require the main loop
2022-05-03 01:13:17 +0200 <geekosaur> most of them *should* hook handleEventHook instead
2022-05-03 01:20:13 +0200 <abastro[m]> I cannot find private event loop running on them
2022-05-03 01:20:17 +0200 <abastro[m]> For treeselect
2022-05-03 01:27:07 +0200 <abastro[m]> Actually I might be able to interrupt main loop for a dialog to ask for quitting!
2022-05-03 01:30:16 +0200 <abastro[m]> Yea it must be, since keys stopped being passed to xmonsd
2022-05-03 01:31:48 +0200 <geekosaur> https://github.com/xmonad/xmonad-contrib/blob/master/XMonad/Actions/TreeSelect.hs#L529-L545
2022-05-03 01:32:09 +0200werneta(~werneta@137.79.197.49)
2022-05-03 01:33:11 +0200 <geekosaur> with the loop being at https://github.com/xmonad/xmonad-contrib/blob/master/XMonad/Actions/TreeSelect.hs#L348-L358
2022-05-03 01:37:09 +0200werneta(~werneta@137.79.197.49) (Ping timeout: 246 seconds)
2022-05-03 01:37:12 +0200 <abastro[m]> Oh, that's it
2022-05-03 01:40:03 +0200 <abastro[m]> Uhm
2022-05-03 01:40:35 +0200 <abastro[m]> `treeselectAt` doesn't seem to fork tho
2022-05-03 01:40:57 +0200 <geekosaur> it doesn't
2022-05-03 01:41:09 +0200 <geekosaur> [02 23:13:02] <geekosaur> most of those run their own private event loops on the hopeful assumption that nothing will require the main loop
2022-05-03 01:41:12 +0200 <abastro[m]> It does seem like it would put xmonad event loop into halt...
2022-05-03 01:41:41 +0200 <geekosaur> at least it uses maskEvent so any wm events that come in will be held until the main loop next runs
2022-05-03 01:41:50 +0200 <abastro[m]> It immediately returns with the Maybe result
2022-05-03 01:41:56 +0200 <abastro[m]> Oh
2022-05-03 01:41:57 +0200 <geekosaur> instead of just discarding them
2022-05-03 01:42:04 +0200 <abastro[m]> So it does stop the main loop.
2022-05-03 01:42:27 +0200stackdroid18(14094@user/stackdroid)
2022-05-03 01:42:49 +0200 <abastro[m]> I guessthe right way to do it would be using `handleEventHook`
2022-05-03 01:50:18 +0200 <abastro[m]> Actually I could use X event to specify time, and send the actual payload through STM or sth
2022-05-03 01:52:38 +0200 <abastro[m]> Yea that might work
2022-05-03 01:54:07 +0200werneta(~werneta@137.79.215.173)
2022-05-03 01:54:16 +0200mvk(~mvk@2607:fea8:5ce3:8500::aa1d) (Ping timeout: 250 seconds)
2022-05-03 01:55:38 +0200 <abastro[m]> geekosaur: How do I send X message from a client?
2022-05-03 01:58:15 +0200 <abastro[m]> s/X message/X event
2022-05-03 02:06:47 +0200 <geekosaur> you have to build it yourself. see https://github.com/xmonad/xmonad/blob/master/src/XMonad/Main.hs#L131-L140 for an example
2022-05-03 02:07:09 +0200 <geekosaur> (I had to dig for that, but knew I was in trouble when I found setClientMessageEvent)
2022-05-03 02:08:30 +0200 <abastro[m]> `setClientMessageEvent' e rw xmonad_restart 32 []`
2022-05-03 02:08:30 +0200 <abastro[m]> What is this?
2022-05-03 02:09:07 +0200 <geekosaur> https://hackage.haskell.org/package/X11-1.10.2/docs/Graphics-X11-Xlib-Extras.html#v:setClientMessa…
2022-05-03 02:09:44 +0200 <geekosaur> it takes an unpopulated X event and turns it into a ClientMessage event
2022-05-03 02:10:44 +0200werneta(~werneta@137.79.215.173) (Ping timeout: 248 seconds)
2022-05-03 02:12:32 +0200 <abastro[m]> Oh, I can make my own ClientMessage?
2022-05-03 02:12:48 +0200 <abastro[m]> Maybe I don't need mvars after all
2022-05-03 02:13:17 +0200 <geekosaur> with some limits, since you could go low level and use a C struct or something as the payload, but we don't support that currently
2022-05-03 02:14:19 +0200 <geekosaur> the problem with doing this, again, is there are some problems if there's one outstanding after a restart (I think if you get just the wrong timing with ShowWName you can still crash xmonad)
2022-05-03 02:21:04 +0200 <abastro[m]> Can I use a String?
2022-05-03 02:25:25 +0200 <geekosaur> hm. probably but you'd want to use the utf8_string package to encode it and set the format to UTF8_STRING, length 8, then the encoded characters as a packed (C) array
2022-05-03 02:26:13 +0200 <geekosaur> alternately if you don't care about anything but xmonad seeing it, output the codepoints with some user-chosen format and length 32
2022-05-03 02:26:41 +0200 <geekosaur> a literal String won'[t work since it's a linked list and messages have no provision for that
2022-05-03 02:35:14 +0200 <abastro[m]> Indeed literal string does not work
2022-05-03 02:35:30 +0200 <abastro[m]> How about making an Atom?
2022-05-03 02:36:28 +0200 <geekosaur> an atom is a number registered with the X server; you should not use them for arbitrary strings
2022-05-03 02:36:44 +0200 <geekosaur> things like the formats for events and properties are atoms
2022-05-03 02:37:55 +0200 <abastro[m]> Hmmm
2022-05-03 02:38:16 +0200 <abastro[m]> I am wondering how to implement tabs through gtk, then.
2022-05-03 02:43:31 +0200 <abastro[m]> I guess STM is less hassle
2022-05-03 02:45:04 +0200benin(~benin@183.82.178.195)
2022-05-03 02:51:16 +0200benin(~benin@183.82.178.195) (Ping timeout: 248 seconds)
2022-05-03 03:11:35 +0200benin(~benin@183.82.204.110)
2022-05-03 03:12:27 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2022-05-03 04:04:30 +0200banc(banc@gateway/vpn/airvpn/banc) (Ping timeout: 246 seconds)
2022-05-03 04:05:43 +0200Xioulious(~yourname@193.32.249.137) (Quit: leaving)
2022-05-03 04:22:57 +0200banc(banc@gateway/vpn/airvpn/banc)
2022-05-03 04:28:16 +0200abastro(~abab9579@192.249.26.68)
2022-05-03 04:55:01 +0200mvk(~mvk@2607:fea8:5ce3:8500::aa1d)
2022-05-03 04:56:22 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
2022-05-03 04:57:19 +0200td_(~td@94.134.91.43) (Ping timeout: 240 seconds)
2022-05-03 04:59:27 +0200td_(~td@94.134.91.227)
2022-05-03 05:46:58 +0200stackdroid18(14094@user/stackdroid) (Quit: Lost terminal)
2022-05-03 05:54:01 +0200abastro(~abab9579@192.249.26.68) (Remote host closed the connection)
2022-05-03 05:55:35 +0200abastro(~abab9579@192.249.26.68)
2022-05-03 06:32:36 +0200abastro(~abab9579@192.249.26.68) (Ping timeout: 248 seconds)
2022-05-03 06:51:27 +0200benin(~benin@183.82.204.110) (Ping timeout: 246 seconds)
2022-05-03 06:52:26 +0200benin(~benin@183.82.204.110)
2022-05-03 07:00:35 +0200abastro(~abab9579@192.249.26.68)
2022-05-03 07:32:22 +0200abastro(~abab9579@192.249.26.68) (Remote host closed the connection)
2022-05-03 07:33:35 +0200abastro(~abab9579@192.249.26.68)
2022-05-03 07:37:02 +0200mvk(~mvk@2607:fea8:5ce3:8500::aa1d) (Ping timeout: 250 seconds)
2022-05-03 07:42:06 +0200abastro(~abab9579@192.249.26.68) (Remote host closed the connection)
2022-05-03 07:52:07 +0200abastro(~abab9579@192.249.26.68)
2022-05-03 07:52:46 +0200abastro(~abab9579@192.249.26.68) (Remote host closed the connection)
2022-05-03 07:53:54 +0200 <abastro[m]> Meh, xmonad always crash when I refresh.. :/
2022-05-03 08:17:28 +0200globe_deebo
2022-05-03 08:41:00 +0200benin(~benin@183.82.204.110) (Ping timeout: 260 seconds)
2022-05-03 08:55:44 +0200 <abastro[m]> Is there a way for gridselect to exclude windows from NSP workspace?
2022-05-03 08:57:57 +0200abastro(~abab9579@192.249.26.68)
2022-05-03 09:30:57 +0200 <lyiriyah[m]> Probably want to rewrite the windowMap (https://hackage.haskell.org/package/xmonad-contrib-0.17.0/docs/src/XMonad.Actions.GridSelect.html#…) function to exclude windows from the NSP workspace. Not sure how you'd go about it.
2022-05-03 10:08:48 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 276 seconds)
2022-05-03 11:00:22 +0200liskin[m](~liskinmat@2001:470:69fc:105::768) (Quit: You have been kicked for being idle)
2022-05-03 11:37:17 +0200 <abastro[m]> Hm that might be quite a hassle
2022-05-03 11:39:42 +0200abastro(~abab9579@192.249.26.68) (Ping timeout: 250 seconds)
2022-05-03 13:50:54 +0200hp77(~hp77@157.119.207.150)
2022-05-03 13:52:02 +0200 <hp77> My System is not displaying some fonts, I am trying to see some downloaded fonts in font-manager
2022-05-03 13:52:13 +0200 <hp77> anyone know how can I overcome this?
2022-05-03 13:52:15 +0200liskin[m](~liskinmat@2001:470:69fc:105::768)
2022-05-03 14:25:54 +0200sagax(~sagax_nb@user/sagax)
2022-05-03 14:37:05 +0200arjun(~arjun@user/arjun)
2022-05-03 14:44:29 +0200hp77(~hp77@157.119.207.150) (Quit: Client closed)
2022-05-03 14:56:08 +0200arjun(~arjun@user/arjun) (Quit: Leaving)
2022-05-03 15:06:24 +0200srk-(~sorki@user/srk)
2022-05-03 15:09:45 +0200srk(~sorki@user/srk) (Ping timeout: 276 seconds)
2022-05-03 15:09:45 +0200srk-srk
2022-05-03 15:12:35 +0200srk-(~sorki@user/srk)
2022-05-03 15:13:09 +0200srk|(~sorki@user/srk)
2022-05-03 15:16:17 +0200srk^(~sorki@user/srk)
2022-05-03 15:16:20 +0200srk(~sorki@user/srk) (Ping timeout: 248 seconds)
2022-05-03 15:17:33 +0200srk-(~sorki@user/srk) (Ping timeout: 276 seconds)
2022-05-03 15:18:12 +0200srk|(~sorki@user/srk) (Ping timeout: 276 seconds)
2022-05-03 15:19:12 +0200srk^srk
2022-05-03 17:46:47 +0200nomadxxxx3(~lanomadx@69.167.38.68) (Ping timeout: 240 seconds)
2022-05-03 17:47:06 +0200nomadxx3(~lanomadx@69.167.38.62)
2022-05-03 17:50:01 +0200nomadxx3(~lanomadx@69.167.38.62) (Client Quit)
2022-05-03 17:50:17 +0200nomadxx3(~lanomadx@208.91.65.93)
2022-05-03 18:00:54 +0200liskin[m](~liskinmat@2001:470:69fc:105::768) (Quit: You have been kicked for being idle)
2022-05-03 18:34:54 +0200joshproehl(~quassel@user/joshproehl) (Quit: Disappearing act!)
2022-05-03 18:35:09 +0200joshproehl(~quassel@user/joshproehl)
2022-05-03 18:35:50 +0200joshproehl(~quassel@user/joshproehl) (Client Quit)
2022-05-03 18:36:03 +0200joshproehl(~quassel@user/joshproehl)
2022-05-03 18:36:14 +0200joshproehl(~quassel@user/joshproehl) (Client Quit)
2022-05-03 18:37:50 +0200joshproehl(~quassel@user/joshproehl)
2022-05-03 18:40:55 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2022-05-03 19:24:15 +0200jao(~jao@211.68.17.95.dynamic.jazztel.es)
2022-05-03 19:36:24 +0200jao(~jao@211.68.17.95.dynamic.jazztel.es) (Remote host closed the connection)
2022-05-03 19:37:40 +0200jao(~jao@211.68.17.95.dynamic.jazztel.es)
2022-05-03 20:02:36 +0200stackdroid18(14094@user/stackdroid)
2022-05-03 20:18:47 +0200doppo(~doppo@2604:180::e0fc:a07f) (Ping timeout: 240 seconds)
2022-05-03 20:26:52 +0200doppo(~doppo@2604:180::e0fc:a07f)
2022-05-03 20:32:57 +0200stackdroid18(14094@user/stackdroid) (Quit: Lost terminal)
2022-05-03 20:47:14 +0200stackdroid18(~stackdroi@user/stackdroid)
2022-05-03 23:25:14 +0200geekosaurwonders if hp77 ever found an answer to their problem (this not being the best place to ask about it)
2022-05-03 23:25:26 +0200liskin[m](~liskinmat@2001:470:69fc:105::768)