Home liberachat/#xmonad: Logs Calendar

Logs on 2024-06-22 (liberachat/#xmonad)

00:13:24 × mekeor quits (~user@2001:a61:24d2:9401:96ac:ce90:6d78:efe3) (Quit: towards emacs as interface to cybernetic council communism)
01:15:48 dysthesis joins (~dysthesis@user/dysthesis)
02:43:16 <haskellbridge> <iqubic (she/her)> Is there a place I can go to see all the atoms that X.H.ExwhDesktops supports and handles?
02:43:58 <haskellbridge> <iqubic (she/her)> I'm trying to see if that set all the right atoms for me to just be able to use polybar's xwindow and xworkspaces modules out of the box.
02:44:16 <haskellbridge> <iqubic (she/her)> xwindow says: "NOTE: Requires a WM that supports the EWMH atom _NET_ACTIVE_WINDOW."
02:45:24 <haskellbridge> <iqubic (she/her)> Wait... I think I can just use "xprop -root _NET_SUPPORTED"
02:51:25 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> iqubic (she/her): https://github.com/xmonad/xmonad-contrib/blob/master/XMonad/Hooks/EwmhDesktops.hs
02:52:03 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> iqubic (she/her): you mean, displaying the actual active window title in polybar?
02:52:13 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> if you meant that, i already do this with polybar and xmonad
02:52:30 <geekosaur> yeh, _NET_SUPPORTED is the easiest place to find them
02:53:12 <haskellbridge> <iqubic (she/her)> 柱間: This is what I mean.
02:53:17 × td_ quits (~td@i53870921.versanet.de) (Ping timeout: 240 seconds)
02:53:22 <geekosaur> you can get them from the source but I think they're scatted all over plus with extensible EWMH some may be defined in other modules
02:53:28 <haskellbridge> <iqubic (she/her)> I'm also wondering if you have a good way to get polybar to show the layout.
02:53:32 <geekosaur> and registered with EWMH
02:54:26 <geekosaur> I think the only way to get the layout is to send it one way or another, since EWMH doesn't have the concept
02:54:46 <geekosaur> you could use dbus, or write it to a file and use a polybar module to read the file when it changes
02:55:03 <haskellbridge> <iqubic (she/her)> Cool... I'll stick to using the dbus and a PP.
02:55:11 td_ joins (~td@i5387090B.versanet.de)
02:55:41 <haskellbridge> <iqubic (she/her)> https://github.com/troydm/xmonad-dbus?tab=readme-ov-file#configuring-polybar
02:56:14 <haskellbridge> <iqubic (she/her)> Looks like this has a neat little guide on how to set up xmonad and polybar to play nicely.
02:56:46 <haskellbridge> <iqubic (she/her)> And that Go package for reading from dbus is in the Nix repos so I can just get it there.
02:57:13 <haskellbridge> <iqubic (she/her)> geekosaur: I know you do a similar thing in your config.
02:58:00 <geekosaur> yes, but with a dbus receiver that's a panel applet that can be built for gnome 2, mate, or xfce
02:59:26 <geekosaur> (I think Nix has derivations for all three variants)
03:01:08 <haskellbridge> <iqubic (she/her)> It does. But I'm planning on using polybar and not some DE like that, so I'm gonna use the small Go program and tell polybar to run that to get info. I'll have to wrap the data I send to have proper formatting and stuff, but that's more a polybar issue than an xmonad one.
03:01:09 <geekosaur> xmonad-log-applet-{gnome,mate,xfce}
03:01:59 <geekosaur> yeh, xmonad-log-applet speaks Pango markup, I have some utility functions for it in my config
03:03:53 <haskellbridge> <iqubic (she/her)> Yeah... polybar has its own special text formatting stuff. https://github.com/polybar/polybar/wiki/Formatting#format-tags
03:07:38 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> iqubic (she/her): quite easy to do
03:08:21 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> https://codeberg.org/hashirama/modern_lisp-machine/src/commit/491183a723ce7d7decc1961deef2266d524aa0c9/.config/polybar/config.ini
03:08:59 <haskellbridge> <iqubic (she/her)> But does that show your current XMonad layout?
03:09:16 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> you mean the name of the layout?
03:09:32 <haskellbridge> <柱間 (@hashirama:hashi.sbs)> i think that would be very hard to do
03:09:43 <haskellbridge> <iqubic (she/her)> Yeah... It's fine.
03:10:49 <geekosaur> you can't get it from EWMH, as I said earlier, but with a custom PP it's easy
03:11:00 <geekosaur> in fact most of the standard PPs include it
03:11:07 <geekosaur> as does my custom one
03:12:47 <geekosaur> https://github.com/geekosaur/xmonad.hs/blob/hilfy-2023/xmonad.hs#L347-L365
03:13:25 <geekosaur> current screen's workspace is bright, other visible workspaces dim, then layout name and focused window title
03:14:26 <geekosaur> https://imgur.com/F1Wg9qB.png
03:27:15 × dysthesis quits (~dysthesis@user/dysthesis) (Quit: dysthesis)
07:14:19 × mightyby1e quits (~mightybyt@ec2-52-201-220-249.compute-1.amazonaws.com) (Ping timeout: 256 seconds)
07:14:34 mightybyte joins (~mightybyt@ec2-52-201-220-249.compute-1.amazonaws.com)
07:41:33 <haskellbridge> <iqubic (she/her)> Is there a hook that runs every time I change layout, that I can use to write the new layout to a file or otherwise do something with the new layout name?
07:48:06 <Leary> iqubic: Sounds like a job for the `logHook`. You'll have to track the `description` of the current layout/s yourself, though. A bit of extensible state will do it.
07:49:46 <haskellbridge> <iqubic (she/her)> Oh, yeah, that might work really well.
07:50:03 <haskellbridge> <iqubic (she/her)> Why would I need to track the descriptions myself?
08:02:23 <Leary> `logHook` runs every refresh; it's not layoutDescriptionChangedHook, so you need to be the one to decide whether or not it's changed. If you really wanted that hook you'd need to put a modifier over the Choose layout to watch for relevant messages, which is another approach.
08:03:18 <haskellbridge> <iqubic (she/her)> I see. That makes sense actually...
08:11:26 <haskellbridge> <iqubic (she/her)> Is there a guide to using ExtensibleState stuff?
08:37:46 <Leary> iqubic: https://hackage.haskell.org/package/xmonad-contrib-0.18.0/docs/XMonad-Util-ExtensibleState.html
09:18:28 <haskellbridge> <iqubic (she/her)> What's the difference between "StateExtension" and "PersistentExtension"?
09:25:57 <liskin> iqubic: one survives restart and the other doesn't
09:26:36 <liskin> the one that doesn't is useful for caching stuff (e.g. ManageDocks uses it)
09:26:45 <liskin> EwmhDesktops possibly as well
09:27:13 <haskellbridge> <iqubic (she/her)> Is the WindowSet part of the state, and it is Persistant?
09:27:50 <liskin> WindowSet isn't stored using ExtensibleState, but it is preserved across restarts
09:27:57 <liskin> otherwise you'd lose your layouts on reload
09:28:55 <liskin> (train about to reach its destination, afk soon)
09:29:56 <haskellbridge> <iqubic (she/her)> Makes sense. I'll think about this more myself.
11:34:45 × down200 quits (~down200@shell.lug.mtu.edu) (Ping timeout: 268 seconds)
11:37:20 down200 joins (~down200@shell.lug.mtu.edu)
12:01:53 × down200 quits (~down200@shell.lug.mtu.edu) (Ping timeout: 268 seconds)
12:05:48 down200 joins (~down200@shell.lug.mtu.edu)
12:33:21 × down200 quits (~down200@shell.lug.mtu.edu) (Ping timeout: 256 seconds)
12:35:30 down200 joins (~down200@shell.lug.mtu.edu)
12:45:10 × down200 quits (~down200@shell.lug.mtu.edu) (Ping timeout: 256 seconds)
12:47:31 down200 joins (~down200@shell.lug.mtu.edu)
15:58:32 Enrico63 joins (~Enrico63@81.109.143.226)
18:23:18 × Enrico63 quits (~Enrico63@81.109.143.226) (Quit: Client closed)
19:15:19 × wlhn quits (~wlhn@dl46fx8hbfttwvhb-h1ly-3.rev.dnainternet.fi) (Quit: Leaving)
19:35:38 tremon joins (~tremon@83.80.159.219)
20:11:47 × catman quits (~catman@user/catman) (Ping timeout: 256 seconds)
20:14:33 catman joins (~catman@user/catman)
21:06:21 <haskellbridge> <iqubic (she/her)> Why does X.Util.ExtensibleState use XLike, and is the titular X Monad an instance of XLike?
21:08:54 <geekosaur> https://hackage.haskell.org/package/xmonad-contrib-0.18.0/docs/XMonad-Util-PureX.html#g:1
21:09:19 <geekosaur> the ideas is you can write pure actions and later apply them to X
21:09:51 <geekosaur> the instances of XLike are X and PureX
21:10:41 <haskellbridge> <iqubic (she/her)> What is PureX used for?
21:12:09 <geekosaur> avoiding changes when they're unsafe (most notably, in a logHook where it could cause an infinite refresh loop)
21:12:50 <haskellbridge> <iqubic (she/her)> I see.
21:13:33 <geekosaur> basically you can queue up changes in a PureX and apply them later with toX or defile
21:14:02 <geekosaur> toX produces an X action without applying it, defile applies it
21:28:57 <haskellbridge> <iqubic (she/her)> Right. Makes sense. Can I run arbitrary IO actions in X?
21:29:52 <haskellbridge> <iqubic (she/her)> Specifically the thing I want to is create a custom logHook that emits DBus stuff for me using my own custom logger.
21:30:28 <haskellbridge> <iqubic (she/her)> It's an instance of MonadIO, so I should be able to do it.
21:33:30 <geekosaur> yes, liftIO works and XMonad.Prelude has a convenience alias `io`
21:33:57 <geekosaur> (I wouldn't bother importing it if that's all you're going to use from it, though)
21:35:03 dysthesis joins (~dysthesis@user/dysthesis)
21:46:59 × dysthesis quits (~dysthesis@user/dysthesis) (Quit: dysthesis)
22:23:05 wlhn joins (~wlhn@dl46fx8hbfttwvhb-h1ly-3.rev.dnainternet.fi)
23:23:41 × tremon quits (~tremon@83.80.159.219) (Quit: getting boxed in)
23:35:15 wlhn_ joins (~wlhn@dl46fx8bgm9q8wl8cy4qy-3.rev.dnainternet.fi)
23:38:29 × wlhn quits (~wlhn@dl46fx8hbfttwvhb-h1ly-3.rev.dnainternet.fi) (Ping timeout: 240 seconds)

All times are in UTC on 2024-06-22.