Home liberachat/#xmonad: Logs Calendar

Logs: liberachat/#xmonad

←Prev  Next→
Page 1 .. 166 167 168 169 170 171 172 173 174 175 176 .. 1843
184,262 events total
2021-08-12 08:06:50 <grvxs[m]> oh thanks lol, I was confused when you sent me that
2021-08-12 08:17:27 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2021-08-12 08:17:27 allbery_b joins (~geekosaur@xmonad/geekosaur)
2021-08-12 08:17:30 allbery_b is now known as geekosaur
2021-08-12 08:23:16 <elonsroadster[m]> lol okay
2021-08-12 08:23:19 elonsroadster[m] < https://libera.ems.host/_matrix/media/r0/download/libera.chat/6b5a2d24a4bd63a7cd4ceb9cf6f77646fe778fa2/message.txt >
2021-08-12 08:23:24 <elonsroadster[m]> okay that should work
2021-08-12 08:23:39 <elonsroadster[m]> Maybe I should contribute this to Xmonad.contrib
2021-08-12 08:23:47 <elonsroadster[m]> grvxs[m]: do you understand how to use it?
2021-08-12 08:23:59 <grvxs[m]> lemme try
2021-08-12 08:24:13 <elonsroadster[m]> so you need to have some key that flips the value of the ioref
2021-08-12 08:24:14 <elonsroadster[m]> in each map
2021-08-12 08:25:44 <elonsroadster[m]> hmm you may need to change the type of KeyMask to ButtonMaks
2021-08-12 08:25:55 <elonsroadster[m]> im not sure what the difference between those 2 are
2021-08-12 08:28:17 <grvxs[m]> so `combineKeyMaps` takes a String and a keymap and then returns a keymap
2021-08-12 08:28:45 <grvxs[m]> how do I use it though?
2021-08-12 08:30:02 <elonsroadster[m]> no it takes a LIST of [(String, Keymap)] airs
2021-08-12 08:30:04 <elonsroadster[m]> pairs
2021-08-12 08:30:10 <elonsroadster[m]> and returns a single keymap
2021-08-12 08:30:14 <elonsroadster[m]> you also need an ioref
2021-08-12 08:30:31 <elonsroadster[m]> so like you have a two keymaps right?
2021-08-12 08:30:32 <elonsroadster[m]> so you would go like
2021-08-12 08:31:21 <elonsroadster[m]> ```
2021-08-12 08:31:21 <elonsroadster[m]> combineKeyMaps ref [("first keymap name", firstKeymap), ("second keymap name", secondKeymap)]
2021-08-12 08:31:37 <elonsroadster[m]> and you need to make the ref in your main function
2021-08-12 08:31:38 <elonsroadster[m]> like
2021-08-12 08:32:38 <elonsroadster[m]> ```
2021-08-12 08:32:38 <elonsroadster[m]> main = do
2021-08-12 08:32:38 <elonsroadster[m]> ref <- newIORef "first keymap name"
2021-08-12 08:35:48 <grvxs[m]> how do i make a keybind that toggles between these
2021-08-12 08:36:32 <elonsroadster[m]> ugh you're using easy keys
2021-08-12 08:36:40 <elonsroadster[m]> oh thats easy
2021-08-12 08:36:52 grvxs[m] < https://libera.ems.host/_matrix/media/r0/download/libera.chat/591884f9b383493a0e2ebbc54ee2a14b8cf6dbba/message.txt >
2021-08-12 08:37:03 <grvxs[m]> i want to toggle between these
2021-08-12 08:37:09 <elonsroadster[m]> yeah so
2021-08-12 08:38:25 grvxs[m] < https://libera.ems.host/_matrix/media/r0/download/libera.chat/cbbe457395e5f117d0179813b2a92d6d4a094882/message.txt >
2021-08-12 08:38:58 grvxs[m] < https://libera.ems.host/_matrix/media/r0/download/libera.chat/d4e68be204cd5877638f64e71eedbb0cad957af9/message.txt >
2021-08-12 08:39:43 <elonsroadster[m]> the toggle function would be
2021-08-12 08:39:43 <elonsroadster[m]> ```
2021-08-12 08:39:43 <elonsroadster[m]> useDvorak :: IORef String -> X ()
2021-08-12 08:39:43 <elonsroadster[m]> useDvorak ref = liftIO $ writeIORef ref "dvorak"
2021-08-12 08:39:55 grvxs[m] < https://libera.ems.host/_matrix/media/r0/download/libera.chat/a5db375f94cda88ff9cbe1088d416f99ca39e7c0/message.txt >
2021-08-12 08:40:31 <elonsroadster[m]> okay i mean why is that relevant
2021-08-12 08:40:33 <elonsroadster[m]> like
2021-08-12 08:40:44 <elonsroadster[m]> what you would do is just make 1 keymap that you want when qwerty is active
2021-08-12 08:40:49 <elonsroadster[m]> and 1 you want when dvorak is active
2021-08-12 08:40:59 <grvxs[m]> ok i'll combine them
2021-08-12 08:41:03 <elonsroadster[m]> ```
2021-08-12 08:41:03 <elonsroadster[m]> useQwerty :: IORef String -> X ()
2021-08-12 08:41:03 <elonsroadster[m]> useQwerty ref = liftIO $ writeIORef ref "qwerty"
2021-08-12 08:41:24 <grvxs[m]> > <@elonsroadster[m]:libera.chat> ```
2021-08-12 08:41:24 <grvxs[m]> > combineKeyMaps ref [("first keymap name", firstKeymap), ("second keymap name", secondKeymap)]
2021-08-12 08:41:24 <grvxs[m]> where and how do I use this
2021-08-12 08:41:26 <lambdabot> <hint>:1:1: error: parse error on input ‘<@’
2021-08-12 08:41:26 <lambdabot> error:
2021-08-12 08:41:26 <lambdabot> Variable not in scope: combineKeyMaps :: t0 -> [([Char], b0)] -> terror:
2021-08-12 08:41:26 <lambdabot> • Variable not in scope: ref
2021-08-12 08:41:42 <elonsroadster[m]> right i told you
2021-08-12 08:41:56 <elonsroadster[m]> ```
2021-08-12 08:41:56 <elonsroadster[m]> main = do
2021-08-12 08:41:56 <elonsroadster[m]> ref <- newIORef "first keymap name"
2021-08-12 08:42:03 <elonsroadster[m]> thats where you get ref from
2021-08-12 08:42:13 <elonsroadster[m]> * ```
2021-08-12 08:42:13 <elonsroadster[m]> main = do
2021-08-12 08:42:13 <elonsroadster[m]> ref <- newIORef "dvorak"
2021-08-12 08:42:13 <elonsroadster[m]> ```
2021-08-12 08:46:52 <elonsroadster[m]> here ill make a pr for you
2021-08-12 08:47:57 <grvxs[m]> thanks
2021-08-12 08:51:07 <elonsroadster[m]> https://github.com/grvxs/dots/pull/2
2021-08-12 08:51:15 <elonsroadster[m]> youll need to add a binding to toggle between them
2021-08-12 08:51:17 <elonsroadster[m]> also
2021-08-12 08:51:22 <elonsroadster[m]> lol I did not test this at all
2021-08-12 08:51:28 <elonsroadster[m]> but it compiles
2021-08-12 08:51:40 <grvxs[m]> lol it's ok
2021-08-12 08:52:29 <elonsroadster[m]> grvxs[m]: does it kind of make sense to you
2021-08-12 08:52:31 <elonsroadster[m]> what is going on?
2021-08-12 08:53:01 <grvxs[m]> yea kind of
2021-08-12 08:53:22 <elonsroadster[m]> do you know hwo to add the bindings for useQwerty?
2021-08-12 08:53:26 <elonsroadster[m]> its a little tricky
2021-08-12 08:53:35 <elonsroadster[m]> well no its not that bad
2021-08-12 08:53:42 <elonsroadster[m]> you have to do it in the function defaults
2021-08-12 08:53:44 <elonsroadster[m]> where you have the ref
2021-08-12 08:54:01 <grvxs[m]> not in EZConfig?
2021-08-12 08:54:05 <grvxs[m]> lol
2021-08-12 08:54:16 <elonsroadster[m]> no
2021-08-12 08:54:24 <elonsroadster[m]> you need access to the ref
2021-08-12 08:54:30 <elonsroadster[m]> god ezconfig is the dumbest thing ever
2021-08-12 08:55:03 <grvxs[m]> how do i set a keybind?
2021-08-12 08:55:47 <elonsroadster[m]> so okay im guessing you must have cargo culted like all of this right?
2021-08-12 08:55:56 <elonsroadster[m]> because you're setting keybinds all over the place
2021-08-12 08:56:32 <grvxs[m]> yea, I took someone else's config and changed it according to me
2021-08-12 08:56:57 <elonsroadster[m]> you can just add
2021-08-12 08:56:57 <grvxs[m]> i only know a little bit of haskell, like I used to solve project euler with it
2021-08-12 08:58:12 <elonsroadster[m]> ```
2021-08-12 08:58:12 <elonsroadster[m]> (myKeys ++ [("binding", useDvorak ref), ("binding", useQwerty ref)])
2021-08-12 08:58:22 AndrewYu joins (~andrew@user/andrewyu)
2021-08-12 08:58:24 <elonsroadster[m]> you see where that is
2021-08-12 08:58:38 <elonsroadster[m]> and just replace binding with whatever you want using your stupid ezconfig
2021-08-12 08:59:14 <elonsroadster[m]> does that work?
2021-08-12 09:09:23 <Solid> can you perhaps stop with the insecurities regarding ezconfig? :)

All times are in UTC.