Home liberachat/#xmonad: Logs Calendar

Logs: liberachat/#xmonad

←Prev  Next→
Page 1 .. 718 719 720 721 722 723 724 725 726 727 728 .. 1850
184,942 events total
2022-07-08 11:55:28 <fizzie> Although you might want some form of "debouncing" in there.
2022-07-08 11:55:40 <fizzie> And the version done by X.H.Rescreen is objectively better. :)
2022-07-08 11:56:08 <fizzie> (There tends to be a bunch of events fired off when unplugging/replugging screens, not just one.)
2022-07-08 11:59:30 <fizzie> My kludge is based on just adding a delay of 0.5 seconds, and ignoring subsequent events while that timer is pending. X.H.Rescreen does some smarter to the event queue.
2022-07-08 12:00:59 <tjmciver> Yeah, it sounds like I should invest the time in upgrading to 0.17.
2022-07-08 12:09:27 MUT joins (~MUT@91.196.39.241)
2022-07-08 12:13:01 <MUT> Hello everyone. I've been a long time haskell fan and just decided to give xmonad a good try. I am trying to make the default configuration template provided to work and i came across this issue. The keybinding configuration provided in it is given by `myKeys :: XConfig Layout -> M.Map (KeyMask, KeySym) (X ())`. Now i want to put
2022-07-08 12:13:01 <MUT> XMonad.Util.EZConfig.checkKeymap into my startup hook to use.
2022-07-08 12:13:28 <geekosaur> Jade1, XMonad.Layout.Master lets you add a second master window
2022-07-08 12:14:13 <MUT> The issue is that checkKeymap takes [(String, X())] and not the Map. I can use toList from Data.Map to take the map into [(KeyMask, KeySym), X())], but that wont cut it
2022-07-08 12:14:35 <geekosaur> checkKeymap is designed for use with additionalKeysP maps
2022-07-08 12:15:16 <MUT> is there a  Map (KeyMask, KeySym) (X ()) -> [(String, X ())] function that would be able to take the tuples and return the short string syntax of keymaps?
2022-07-08 12:15:58 × Jade1 quits (~Jade1@ip-178-201-128-039.um46.pools.vodafone-ip.de) (Quit: Client closed)
2022-07-08 12:16:04 <MUT> geekosaur how do i check my initial keymaps for duplicates then?
2022-07-08 12:16:17 <MUT> is it assumed you have to manually do that?
2022-07-08 12:16:49 <geekosaur> yes, because the duplicates will already have overwritten by the time you reach the startupHook
2022-07-08 12:17:39 <MUT> fair enough i guess.
2022-07-08 12:17:59 <geekosaur> and we're kinda strongly encouraging use of the newer keymap style
2022-07-08 12:25:54 <MUT> the short string  thing??
2022-07-08 12:25:58 <MUT> the short string  thing?
2022-07-08 12:26:07 <MUT> damn. sorry
2022-07-08 12:32:23 <MUT> there are just some cool list comprehensions done for the workspace switching and moving that i dont think can be possible to refactor to work with the string syntax.
2022-07-08 12:32:39 <MUT> i might be wrong tho
2022-07-08 12:35:23 <alternateved> What those list comprehensions do for workspace switching?
2022-07-08 12:36:40 <MUT>     -- mod-[1..9], Switch to workspace N
2022-07-08 12:36:41 <MUT>     -- mod-shift-[1..9], Move client to workspace N
2022-07-08 12:36:41 <MUT>     --
2022-07-08 12:36:42 <MUT>     [((m .|. modm, k), windows $ f i)
2022-07-08 12:36:42 <MUT>         | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
2022-07-08 12:36:43 <MUT>         , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
2022-07-08 12:36:56 <alternateved> I do like X.U.EZConfig module, but I also come from Emacs world so this makes it familiar for me
2022-07-08 12:37:26 <alternateved> I have those comprehensions for that short syntax
2022-07-08 12:38:18 <alternateved> [ ("M-" <> m <> show k, withNthWorkspace' f i)
2022-07-08 12:38:18 <alternateved> | (k, i) <- zip workspaceNumbers [0 ..]
2022-07-08 12:38:18 <alternateved> , (m, f) <- [("", W.greedyView), ("S-", W.shift), ("C-", copy)]
2022-07-08 12:38:18 <alternateved> ]
2022-07-08 12:39:56 <alternateved> There is a bit more since I also wanted to filter out scratchpads
2022-07-08 12:44:53 × tjmciver quits (~tjmciver@cpe-198-255-176-114.maine.res.rr.com) (Read error: Connection reset by peer)
2022-07-08 12:45:10 tjmciver joins (~tjmciver@cpe-198-255-176-114.maine.res.rr.com)
2022-07-08 12:49:59 <MUT> hmm
2022-07-08 12:50:04 <MUT> that can work yeah
2022-07-08 12:50:34 <MUT> still if theres a function from "old" syntax to "new" syntax, it would be good to have one from new to old too
2022-07-08 13:01:50 <geekosaur> do you have that backwards? mkKeymap turns an additionalKeysP list into a keymap (but it's already a Map at that point so dups are already lost)
2022-07-08 13:20:14 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-07-08 13:21:35 <MUT> mkKeymap :: XConfig l -> [(String, X ())] -> M.Map (KeyMask, KeySym) (X ())
2022-07-08 13:21:53 <MUT> i want unmkKeymap, if that makes sense
2022-07-08 13:23:30 <MUT> something like
2022-07-08 13:23:30 <MUT> mkNewKeymap ::  M.Map (KeyMask, KeySym) -> (X ()) [(String, X ())]
2022-07-08 13:25:02 <geekosaur> that's why I asked if you had that ackwards; I suspected that
2022-07-08 13:26:00 <geekosaur> it's doable, but EZConfig is all about going the other direction
2022-07-08 13:26:47 <MUT> oh is the map from (KeyMask, Keysym) to X actions the "newer" keymap style that you encourage?
2022-07-08 13:27:34 <geekosaur> no, that's the original style and what is used internally
2022-07-08 13:28:26 <MUT> yeah i see.
2022-07-08 13:28:38 <geekosaur> since keygrabs are done on (KeyMask,KeyCode) and an internal lookup is done to go from KeySym to KeyCode
2022-07-08 13:29:03 <geekosaur> (and that will produce surprises if the KeySym has modifiers associated with it, which is the original reason for checkKeymap)
2022-07-08 13:29:34 <geekosaur> which means we should really have a checkKeymap-alike for old style keys too
2022-07-08 13:32:11 <geekosaur> maybe I'll write that this weekend
2022-07-08 13:39:39 <MUT> [4:16:14 PM] <geekosaur> yes, because the duplicates will already have overwritten by the time you reach the startupHook
2022-07-08 13:39:40 <MUT> But given this i dont think it will be any useful
2022-07-08 13:40:05 <MUT> since the only use i had for it, is like not valid
2022-07-08 13:40:23 <geekosaur> it would still check for non-base plane keys and such. but checkKeymap as is also won't do what you want
2022-07-08 13:41:05 <geekosaur> a version could be written that took a list and checked for dupes along with the other checks, of course
2022-07-08 13:43:16 <MUT> myStartupHook :: X ()
2022-07-08 13:43:16 <MUT> myStartupHook = do
2022-07-08 13:43:17 <MUT>   checkKeymap defaults $ map mkNewKeymap $ M.toList $ myKeys defaults
2022-07-08 13:43:17 <MUT>   where
2022-07-08 13:43:18 <MUT>     mkNewKeymap = ...
2022-07-08 13:43:18 <MUT> this is what how i thought id use the mkNewKeymap
2022-07-08 13:44:15 <MUT> inside the man/xmonad.hs
2022-07-08 13:44:39 <geekosaur> I'd be worried that the conversion would change something I cared about, and would want something more direct
2022-07-08 13:58:29 <valarMorghulis[m> > <@lladeebll:matrix.org> I was trying to implement top bar in xmonad to show active window instead of the boarder. If I user `noFillsDeco` the problem is that it's not smart even if there is just one window it shows the top bar, therefore I got a code snippet for smart top bar from reddit and I'm using it. It... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/9c2b5472f13b769907607584b7a7d69fd3219192)
2022-07-08 13:58:31 <valarMorghulis[m> Anyone got a suggestion on where to ask this so get an answer?
2022-07-08 13:58:31 <lambdabot> <hint>:1:1: error: parse error on input ‘<@’
2022-07-08 13:59:08 <valarMorghulis[m> s/so/to/
2022-07-08 13:59:54 <MUT> geekosaur im guessing you're part of the dev team for xmonad? can you please explain why you use strict types for all the records of XConfig record?
2022-07-08 14:00:06 <MUT> Does it bring any noticable performance boost or is it for something else?
2022-07-08 14:00:47 <geekosaur> I'm part of the current dev team but not the original one that made that decision. I think it's for performance though
2022-07-08 14:01:02 <geekosaur> sjanssen and dons are sadly long gone
2022-07-08 14:01:59 <MUT> aeef36f7 Spencer Janssen (2007-12-29 06:19):
2022-07-08 14:01:59 <MUT> Strictify all XConfig fields, gives nice error messages when a field is forgotten on construction
2022-07-08 14:02:00 <MUT> found this on when git blaming
2022-07-08 14:02:35 <MUT> on Xconfig fields*
2022-07-08 14:03:10 <geekosaur> that seems odd though as users don't generally build one up completely from scratch
2022-07-08 14:03:33 <MUT> yeah
2022-07-08 14:03:34 <geekosaur> there's a lot in there and users typically only touch part of it
2022-07-08 14:04:00 <geekosaur> it's very rare that anyone touches rootMask, for example
2022-07-08 14:05:28 <MUT> yeah i was searching for places where the inner fields are exposed to modification from user, there's a lot that never do
2022-07-08 14:05:51 <alternateved> Is there an easy way to restrict ppCurrent also to the current screen?
2022-07-08 14:07:28 <alternateved> Apart from just using logCurrentOnScreen
2022-07-08 14:07:55 <geekosaur> alternateved, I know it's been done but it's not particularly easy the way DyanmicLog / StatusBar is set up
2022-07-08 14:21:53 <alternateved> Hmm, that is what I've thought. I might play with logCurrentOnScreen then
2022-07-08 14:25:49 <geekosaur> might hang around in here and see if someone else speaks up. someone else had an xmobar per screen, each showing that screen's state
2022-07-08 14:26:25 <geekosaur> sadly they didn't do it in an issue or discussion, and the logs aren't searchable currently
2022-07-08 14:27:19 <geekosaur> Solid might remember a bit more but I think he's away for the next 2 weeks
2022-07-08 14:33:31 <alternateved> Thanks, I will keep that in mind, although I might just use logCurrentOnScreen and then the rest of the workspaces that are hidden as I don't really care about ordering here
2022-07-08 14:46:08 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving)
2022-07-08 14:48:06 geekosaur joins (~geekosaur@xmonad/geekosaur)
2022-07-08 14:54:10 × alternateved quits (~alternate@82.180.151.80) (Remote host closed the connection)
2022-07-08 15:01:30 dschrempf joins (~dominik@mobiledyn-62-240-134-33.mrsn.at)
2022-07-08 15:01:48 alternateved joins (~alternate@82.180.151.80)

All times are in UTC.