Logs on 2025-10-11 (liberachat/#xmonad)
| 02:10:45 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection timed out) |
| 02:13:43 | <haskellbridge> | <iqubic (she/her)> If I have a Window, is there a way to get its name as a String? |
| 02:16:26 | <haskellbridge> | <iqubic (she/her)> Specifically, I got this Window data by starting with a XMonad.StackSet.Stack and extracting the focus. |
| 02:16:49 | <haskellbridge> | <iqubic (she/her)> Basically, I want to get the X11 name of the window. |
| 02:19:35 | <geekosaur> | withDisplay (\d -> io $ fetchName d w) -- assuming "w" is the window id |
| 02:20:12 | <geekosaur> | which is the lazy way and only gets you the simplified name; these days people tend to expect the UTF8_STRING name, which takes more work |
| 02:22:59 | <haskellbridge> | <iqubic (she/her)> I see that contrib has XMonad.Util.NamedWindows, which provides "getName :: Window -> X NamedWindow" and "getNameWMClass :: Window -> X NamedWindow" |
| 02:23:06 | <geekosaur> | also you probably need to import Graphics.X11.Xlib.Extras to get fetchName |
| 02:23:06 | <haskellbridge> | <iqubic (she/her)> https://hackage.haskell.org/package/xmonad-contrib-0.18.1/docs/XMonad-Util-NamedWindows.html#t:NamedWindow |
| 02:24:16 | <haskellbridge> | <iqubic (she/her)> Or I think I can just use that module, because it looks like someone else has already done the work. But I'm unsure of the difference between "getName" and "getNameWMClass" |
| 02:24:22 | <geekosaur> | hm, right, I keep forgetting it actually uses the proper window namew |
| 02:24:41 | <haskellbridge> | <iqubic (she/her)> Keep forgetting what does? |
| 02:25:48 | <geekosaur> | I keep forgetting that NamedWindow isn't an internal-to-xmonad name, it's actually the window title (or class if you use getNameWMClass, which you usually won't want to do since it's not very useful these days) |
| 02:26:38 | <haskellbridge> | <iqubic (she/her)> Oh? How does the normal log hook work? How doos that get the name of the window, to feed to the PP? |
| 02:28:07 | <haskellbridge> | <iqubic (she/her)> The standard PP has a "ppTitle :: String -> String" field, but I'm unsure of how the input string is gotten |
| 02:28:21 | <geekosaur> | that's part of dynamicLog |
| 02:29:19 | <haskellbridge> | <iqubic (she/her)> Looks like that's just using "getName" |
| 02:29:29 | <geekosaur> | sorry, these days it's XMonad.Hooks.StatusBar |
| 02:29:42 | <haskellbridge> | <iqubic (she/her)> https://hackage.haskell.org/package/xmonad-contrib-0.18.1/docs/src/XMonad.Hooks.StatusBar.PP.html#dynamicLogString%27 |
| 02:31:24 | <geekosaur> | right |
| 02:33:08 | <haskellbridge> | <iqubic (she/her)> Unless I'm missing something, XMonad.Hooks.StatusBar uses the "getName" from X.U.NamedWindow |
| 02:35:41 | <haskellbridge> | <iqubic (she/her)> Yeah, checking with xprop tells me that the default logger is just querying "_NET_WM_NAME" which is just what "getName" does. |
| 02:38:55 | × | td_ quits (~td@i5387093C.versanet.de) (Ping timeout: 240 seconds) |
| 02:40:54 | → | td_ joins (~td@i53870926.versanet.de) |
| 02:45:48 | → | terrorjack joins (~terrorjac@2a01:4f8:c17:9d11::) |
| 05:59:06 | → | Solid joins (~slot@xmonad/slotThe) |
| 07:27:14 | → | Solid` joins (~slot@2001:9e8:e1b4:6a00:9e90:4010:d016:86ca) |
| 07:28:51 | × | Solid quits (~slot@xmonad/slotThe) (Ping timeout: 252 seconds) |
| 07:56:55 | × | Solid` quits (~slot@2001:9e8:e1b4:6a00:9e90:4010:d016:86ca) (Ping timeout: 265 seconds) |
| 08:32:23 | → | Solid joins (~slot@xmonad/slotThe) |
| 08:38:12 | → | ximon joins (~ximon@user/ximon) |
| 08:48:25 | × | ximon quits (~ximon@user/ximon) (Ping timeout: 250 seconds) |
| 10:51:01 | → | Solid` joins (~slot@2001:9e8:e1b4:a300:352d:8fbe:6282:2b2b) |
| 10:52:51 | × | Solid quits (~slot@xmonad/slotThe) (Ping timeout: 265 seconds) |
| 10:53:02 | × | Solid` quits (~slot@2001:9e8:e1b4:a300:352d:8fbe:6282:2b2b) (Client Quit) |
| 14:10:07 | × | MrElendig quits (~Urist@archlinux/op/MrElendig) (Quit: telefrag) |
| 14:11:31 | → | MrElendig joins (~Urist@archlinux/op/MrElendig) |
| 16:04:44 | → | ximon joins (~ximon@user/ximon) |
| 16:16:03 | × | ximon quits (~ximon@user/ximon) (Ping timeout: 250 seconds) |
| 16:20:16 | → | ximon joins (~ximon@user/ximon) |
| 16:28:28 | × | ximon quits (~ximon@user/ximon) (Quit: Client closed) |
| 18:35:18 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 20:44:41 | → | Enrico63 joins (~Enrico63@2a0b:e541:10d0:0:9efc:e8ff:fe24:3213) |
| 20:53:00 | <Enrico63> | Hi there. In my xmonad configuration I have mappings like these |
| 20:53:01 | <Enrico63> | ``` |
| 20:53:01 | <Enrico63> | : ("<XF86AudioRaiseVolume>", spawn "amixer -q -D pulse set Master 1%+ unmute") |
| 20:53:02 | <Enrico63> | : ("<XF86AudioLowerVolume>", spawn "amixer -q -D pulse set Master 1%- unmute") |
| 20:53:02 | <Enrico63> | ``` |
| 20:53:03 | <Enrico63> | and I kinda remember that in the past I've used some program, possibly xev to work out what `XF86<whatever>` corresponded to a key. I'd start the program, press the key, and in the terminal I'd see some output in which I could recognize the XF86* name corresponding to the key I had pressed. Currently, that's not the case, in the sense that I don't |
| 20:53:03 | <Enrico63> | see the string XF86 in the output. |
| 20:54:22 | <Enrico63> | According to https://wiki.archlinux.org/title/Keyboard_input#Identifying_keycodes_in_Xorg, `xev` seem to be the way. However, I also read that "If you press a key and nothing appears in the terminal, it means that...". |
| 20:58:26 | <Enrico63> | Now, as far as scancodes are concerned, the key I'm pressing (actually a combo, namely Fn + F5) does have a scancode, because I can show it via `showkeys --scancodes`, which prints 0x67 0xe7 if I press that combo. Likewise, I can do `showkeys --keycodes`, which prints `keycode 144 press\nkeycode 144 release` for that combo. |
| 20:59:11 | <Enrico63> | So it must be that "some other process is capturing the keypress"? In that case, I haven't maneged to run `xinit /usr/bin/xterm -- :1` in a VT :/ |
| 20:59:13 | <Enrico63> | Any help^ |
| 20:59:15 | <Enrico63> | ? |
| 21:10:07 | <haskellbridge> | <geekosaur (@geekosaur:matrix.org)> If xev shows it, it shouldn't be grabbed by anything else |
| 21:11:15 | <haskellbridge> | <geekosaur (@geekosaur:matrix.org)> But it sounds like it may not be being handled properly, if it's sending two events/scancodes |
| 21:21:37 | <Enrico63> | Mmmm what else can I do to troubleshoot? |
| 21:23:36 | <haskellbridge> | <geekosaur (@geekosaur:matrix.org)> First off I would try to figure out what's wrong with the Fn key, since it's being sent separately |
| 21:24:18 | <haskellbridge> | <geekosaur (@geekosaur:matrix.org)> (it's the 0x67 code) |
| 21:49:44 | <geekosaur> | usually something (ACPI in older machines, EFI BIOS in newer ones) intercepts Fn+key and either handles it itself or passes on a synthetic key; the X server would then produce e.g. XF86AudioRaiseVolume. (this is what happens on both my current and old laptops) |
| 21:51:04 | <geekosaur> | very old machines may require a kerbewl module to do this, but I think most of those kernel modules were removed from Linux some years ago |
| 21:51:08 | <geekosaur> | *kernel |
| 22:31:30 | <geekosaur> | hah, it still exists. thinkpad_acpi.ko |
| 22:32:00 | <geekosaur> | (that was the one I was thinking of, I have no idea if you have that or some other model that you'd need to dig up the appropriate kernel module for) |
| 23:04:00 | × | Buliarous quits (~gypsydang@46.232.210.139) (Ping timeout: 260 seconds) |
| 23:04:01 | × | tv quits (~tv@user/tv) (Ping timeout: 260 seconds) |
| 23:04:02 | → | Buliarou1 joins (~gypsydang@46.232.210.139) |
| 23:15:43 | → | tv joins (~tv@user/tv) |
| 23:17:54 | × | Enrico63 quits (~Enrico63@2a0b:e541:10d0:0:9efc:e8ff:fe24:3213) (Quit: Client closed) |
| 23:27:04 | × | lally quits (sid388228@id-388228.uxbridge.irccloud.com) (Server closed connection) |
| 23:27:15 | → | lally joins (sid388228@id-388228.uxbridge.irccloud.com) |
All times are in UTC on 2025-10-11.