Home liberachat/#xmonad: Logs Calendar

Logs: liberachat/#xmonad

←Prev  Next→ 184,991 events total
2023-01-15 14:13:11 <Solid> vifon: I believe so; now you just separate them with commas: https://codeberg.org/xmobar/xmobar/src/branch/master/doc/quick-start.org#fonts
2023-01-15 14:13:29 <Solid> (note: I'm just going by the documentation; xmobar 0.45+ doesn't build on musl so I'm still on 0.44)
2023-01-15 14:17:37 <vifon> Oh wow, this syntax really is crazy.
2023-01-15 14:17:48 <vifon> > It's also possible to specify a list of fonts, separating them by commas, so that they act as fallbacks when the preceding one is not able to display a given glyph. A bit confusingly, the styles and sizes come in reverse order after the families:
2023-01-15 14:17:50 <lambdabot> <hint>:1:38: error: parse error on input ‘of’
2023-01-15 14:17:50 <vifon> > Family 1, Family 2 Styles 2 Size 2, Styles 1 Size 1
2023-01-15 14:17:52 <lambdabot> <hint>:1:9: error: parse error on input ‘,’
2023-01-15 14:18:00 <vifon> Ouch, sorry, lambdabot.
2023-01-15 14:18:07 <Solid> It's pretty horrible yeah
2023-01-15 14:18:10 × jabuxas quits (~jabuxas@user/jabuxas) (Quit: WeeChat 2.8)
2023-01-15 14:36:17 qbt joins (~qbt@user/edun)
2023-01-15 14:51:32 wuqas joins (~user@2804:14c:8793:97d5:8230:49ff:fe14:1509)
2023-01-15 14:58:02 <wuqas> can i remap default shortcuts in 'additionalKeysP'?
2023-01-15 14:58:27 <geekosaur> yes
2023-01-15 14:58:46 <wuqas> i tried something like ("M-<Enter>", "M-x") but it throws me an error
2023-01-15 14:59:00 <geekosaur> oh, not like that, no
2023-01-15 14:59:37 <wuqas> what should i read on documentation to try to understand that?
2023-01-15 14:59:58 <wuqas> i usually rely on answers from the internet to do my things but i could not find any on remapping default shortcuts
2023-01-15 14:59:59 <geekosaur> I thought you meant replacing the definition on one of the builtin keys
2023-01-15 15:02:01 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2023-01-15 15:02:26 <geekosaur> there's no shorthand for taking the definition from one and putting it on another, especially not like that because the defaults are already converted to `(KeyMask, KeySym)` format
2023-01-15 15:04:18 <geekosaur> you could do something silly like `("M-x", (mod4Mask, xK_Enter) ! keys def def)` but that's error-prone and ugly
2023-01-15 15:04:53 <geekosaur> I may have the lookup reversed. but i8n any case I don't recommend it
2023-01-15 15:05:29 <geekosaur> easier is just to take the definition from https://github.com/xmonad/xmonad/blob/master/src/XMonad/Config.hs and respecifying it
2023-01-15 15:06:43 <geekosaur> yeh, I reversed them. `("M-x", keys def def ! (mod4Mask, xK_Enter))`
2023-01-15 15:09:53 <wuqas> hmmm
2023-01-15 15:10:22 <wuqas> thanks for that, i will try to add 'keys :: Xconfig Layout' to my script
2023-01-15 15:11:03 <geekosaur> keys :: XConfig Layout -> M.Map (KeyMask, KeySym) (X ())
2023-01-15 15:11:24 <geekosaur> it's the accessor for the `keys` field in an XConfig
2023-01-15 15:11:36 <wuqas> heheh
2023-01-15 15:11:43 <wuqas> this stuff is rocket science
2023-01-15 15:12:24 <geekosaur> nnm actually I missed a step since it's not the Map directly, it takes an XConfig parameter
2023-01-15 15:12:59 <vrs> Solid: I have essentially completely custom logging set up due to how I manage my workspaces (I create sub-workspaces as pseudogroups because X.L.Groups doesn't play well with 2D navigation, among others) and in multiscreen setups, an important part of telling what screen I'm on is which of my xmobars has colors
2023-01-15 15:13:01 <geekosaur> keys :: LayoutClass l a => XConfig (l a) -> (XConfig Layout -> M.Map (KeyMask, KeySym) (X ()))
2023-01-15 15:13:10 <vrs> Solid: https://i.imgur.com/p9qriVe.png
2023-01-15 15:13:26 <geekosaur> this is why AdditionalKeysP exists, it hides the ugly stuff
2023-01-15 15:13:35 <geekosaur> (hence EZConfig)
2023-01-15 15:13:49 <wuqas> yeah, neat solution for adding custom shortcuts
2023-01-15 15:14:09 <wuqas> can i add Xconfig Layout to my 'main = xmonad $ def' in some way?
2023-01-15 15:14:16 <wuqas> i am 102% lost
2023-01-15 15:14:21 <vrs> Solid: I think the most annoying bits of my current config are 1. withScreen is not exported 2. dynamicworkspaceorder doesn't have insertBefore/After functionality
2023-01-15 15:14:24 <geekosaur> no
2023-01-15 15:14:27 <vrs> both of which I think I'll cut PRs for
2023-01-15 15:14:41 <geekosaur> you already have an XConfig, it's the `def $ ...`
2023-01-15 15:14:49 <wuqas> so i have to create something like `additionalKeysP`?
2023-01-15 15:15:30 <geekosaur> `XConfig Layout` is what it becomes internally, your layout is wrapped in an existential so xmonad's guts don't have tpo deal with something whose type depends on what you put in your `layoutHook`
2023-01-15 15:15:41 <vrs> vifon: huhhh that explains some of my recent troubles
2023-01-15 15:16:09 <wuqas> but if i try to add ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf) -- %! Launch terminal | to my def $ it throws me an error
2023-01-15 15:16:53 <geekosaur> you just want the `spawn` part
2023-01-15 15:17:25 <vrs> wuqas: I tend to use removeKeysP
2023-01-15 15:17:29 <geekosaur> the rest is the "raw" version of "M-S-<Enter>"
2023-01-15 15:18:35 <Solid> vrs: that's a pretty interesting setup—certainly very far from what I've seen anyone of us use (hence, I suppose, the underdocumented/unexported functions :)
2023-01-15 15:19:25 <geekosaur> it would be possible but unwieldy to write a `remapKeysP`, you'd need to write something that "reversed" the rewriting of "P" format to "raw"
2023-01-15 15:19:26 <vrs> one of these days I'm gonna post my config...
2023-01-15 15:19:38 <Solid> I'd ceratinly be interested
2023-01-15 15:21:20 <Solid> geekosaur: should already be done with XMonad.Prelude.keymaskToString
2023-01-15 15:21:45 <Solid> Er, keyToString
2023-01-15 15:24:01 <geekosaur> oh, huh, right, and I even wrote the first version of that 🙃
2023-01-15 15:24:10 <geekosaur> (part of the debug stuff)
2023-01-15 15:24:53 <wuqas> how can i use removeKeysP? i am trying this: `removeKeysP`
2023-01-15 15:24:54 <wuqas> [ ("M-<Enter>")
2023-01-15 15:24:54 <wuqas> ]
2023-01-15 15:25:10 <wuqas> but M-Enter still works...
2023-01-15 15:25:40 <wuqas> and just in case i got it correctly, if i remove a shortcut with removeKeysP i can set a new shortcut on the removed key?
2023-01-15 15:25:40 <geekosaur> I think, as shown in Config, that key is actually xK_Return aka <Return>
2023-01-15 15:25:54 <geekosaur> you can as long as the removeKeysP comes first
2023-01-15 15:26:08 <geekosaur> it processes them in order
2023-01-15 15:26:13 <wuqas> uhul!
2023-01-15 15:26:16 <wuqas> thanks >.<
2023-01-15 15:27:07 <geekosaur> which also means if you're replacing a definition you don't need to remove it first, it'll overwrite the existing one if any
2023-01-15 15:27:42 <wuqas> lol
2023-01-15 15:27:58 <wuqas> the whole episode was <Enter> for <Return>
2023-01-15 15:28:08 <Solid> hah
2023-01-15 15:28:26 <geekosaur> old engineering workstations were what X11's key definitions were designed for, and Enter meant something different
2023-01-15 15:29:07 <wuqas> this key definitions on xmonad.hs works like this: https://github.com/k0kubun/xremap?
2023-01-15 15:29:25 lb9di is now known as evilop
2023-01-15 15:29:30 <wuqas> i mean, they are the same or some are on a lower level than the other?
2023-01-15 15:30:16 <geekosaur> higher level, but not much higher
2023-01-15 15:30:31 <geekosaur> compare xmonad key bindings to kmonad
2023-01-15 15:30:41 <wuqas> which? the xmonad or the github app i send?
2023-01-15 15:30:46 <geekosaur> (which does for keys roughly what xmonad does for window management)
2023-01-15 15:31:38 <geekosaur> xmonad's key definitions only affect other apps to the extent that they are "passive key grabs" so when the X server sees them it gives xmonad control and sends the key to it
2023-01-15 15:31:50 <geekosaur> but you can't really remap keys for other applications this way
2023-01-15 15:32:07 <geekosaur> (there are some unreliable hacks, but if you want that use kmonad or that app you pointed to)
2023-01-15 15:32:16 <wuqas> interesting
2023-01-15 15:32:28 <wuqas> there is any other $monad app out there?
2023-01-15 15:32:51 <geekosaur> termonad which is a terminal emulator
2023-01-15 15:35:13 <wuqas> ok, here is another one, i typed "startupHook = setDefaultCursor xC_cross" on my xmonad $ def
2023-01-15 15:35:37 <wuqas> but i noticed that when i open some app, the default pointer cursor is the one being used
2023-01-15 15:35:37 <Solid> I think stumpwm works like this where the regrab the keyboard/mouse whenever the focused window changes
2023-01-15 15:35:47 <Solid> in order to faciliate app-specific bindings
2023-01-15 15:36:24 <wuqas> oh! there is a lot of remappers out there no?
2023-01-15 15:36:35 <wuqas> the cutest i found is: https://github.com/sezanzeb/input-remapper
2023-01-15 15:36:51 <geekosaur> `setDefaultCursor`, strictly speaking, sets the cursor for the root window. many but not all apps will inherit that
2023-01-15 15:36:57 <wuqas> but as far as i remember, it did not worked for me... but that was a while ago
2023-01-15 15:37:13 <geekosaur> but an app whoich explicitly sets the arrow cursor will use that regardless of what you specify
2023-01-15 15:37:19 <wuqas> can i set a major default cursor?
2023-01-15 15:37:47 <wuqas> yeah... i got this with xterm and firefox
2023-01-15 15:37:55 <wuqas> and emacs
2023-01-15 15:38:21 <geekosaur> yeh, all of them specify. it's not at all uncommon

All times are in UTC.