Home liberachat/#xmonad: Logs Calendar

Logs: liberachat/#xmonad

←Prev  Next→
Page 1 .. 584 585 586 587 588 589 590 591 592 593 594 .. 1849
184,882 events total
2022-04-10 15:03:40 <geekosaur> I'd actually use : instead of ++ unless order matters, but it doesn't seem to here
2022-04-10 15:06:08 <geekosaur> well, actually, if it weren't likely to never be more than 2 I'd use a Set instead of a list :)
2022-04-10 15:06:29 <fizzie> I also kind of hope there's a more elegant way of dealing with the wrapping type (IgnoredWorkspaces) than the "pattern-match in lambda, rewrap by calling a constructor", something that'd let you just use (W.currentTag ws :) as the "core" of the modification. But I don't know what it is.
2022-04-10 15:08:19 <amenonsen> so i have
2022-04-10 15:08:23 <amenonsen> , ("M-C-A-h", withWindowSet $ \w -> XS.modify (\(IgnoredWorkspaces ignored) -> IgnoredWorkspaces (ignored ++ [W.currentTag w])))
2022-04-10 15:08:23 <amenonsen> , ("M-C-A-s", withWindowSet $ \w -> XS.modify (\(IgnoredWorkspaces ignored) -> IgnoredWorkspaces (filter (\x -> x /= W.currentTag w) ignored)))
2022-04-10 15:08:56 <geekosaur> the pattern would be fmap except that the type can't change so fmap won't work. MonoFunctor (https://hackage.haskell.org/package/mono-traversable-1.0.15.3/docs/Data-MonoTraversable.html#t:MonoFunctor) would, but that's a fairly heavy dependency for such a light use case
2022-04-10 15:09:10 <amenonsen> the way it's written now, it _should_ be possible for me to go around hiding multiple workspaces with no problem
2022-04-10 15:09:38 <amenonsen> is there a convenient way for me to dump the contents of the list for debugging?
2022-04-10 15:09:47 <geekosaur> so mostly I'd just define it with a shorter data constructor (IW instead of IgnoredWorkspaces)
2022-04-10 15:11:09 <abastro[m]> Well this kind of modification is also possible with optics but
2022-04-10 15:11:32 <abastro[m]> In this case, it seems like `IgnoredWorkspaces` is a newtype. Is it?
2022-04-10 15:11:36 <amenonsen> well, i changed it to IWs
2022-04-10 15:12:08 <amenonsen> it compiles, but it doesn't seem to work (the thing doesn't get ignored after my key binding)
2022-04-10 15:12:50 <amenonsen> abastro[m]: yes, data IWs = IWs [WorkspaceId] \n instance ExtensionClass IWs where initialValue = IWs []
2022-04-10 15:13:08 <geekosaur> you could modify https://github.com/geekosaur/xmonad.hs/blob/skkukuk/xmonad.hs#L170 / https://github.com/geekosaur/xmonad.hs/blob/skkukuk/xmonad.hs#L309-L313
2022-04-10 15:13:20 <abastro[m]> If you define it as a newtype, you can use `coerce` function
2022-04-10 15:13:52 <abastro[m]> :t coerce
2022-04-10 15:13:53 <lambdabot> error:
2022-04-10 15:13:54 <lambdabot> • Variable not in scope: coerce
2022-04-10 15:13:54 <lambdabot> • Perhaps you meant ‘coerced’ (imported from Control.Lens)
2022-04-10 15:14:00 <geekosaur> then (XS.get :: IWs) >>= hPutStrLn . show
2022-04-10 15:14:14 <geekosaur> bah, yahb isn't in here
2022-04-10 15:14:29 <abastro[m]> @hoogle coerce
2022-04-10 15:14:30 <lambdabot> Data.Coerce coerce :: forall (k :: RuntimeRep) (a :: TYPE k) (b :: TYPE k) . Coercible a b => a -> b
2022-04-10 15:14:30 <lambdabot> GHC.Exts coerce :: forall (k :: RuntimeRep) (a :: TYPE k) (b :: TYPE k) . Coercible a b => a -> b
2022-04-10 15:14:30 <lambdabot> Control.Lens.Internal.Coerce coerce :: Coercible a b => a -> b
2022-04-10 15:14:57 <amenonsen> abastro[m]: (but i have no idea what any of that means)
2022-04-10 15:15:20 <geekosaur> I am not sure a newtype will work there, tbh
2022-04-10 15:15:33 <geekosaur> there's some type games going on in ExtensibleState
2022-04-10 15:16:33 <abastro[m]> In this case, if you define IWs with newtype, Coercible ([] WorkspaceId -> [] WorkspaceId) (IWs -> IWs)
2022-04-10 15:16:51 <abastro[m]> That is, you can convert a function on WorkspaceId to a function on IWs
2022-04-10 15:17:26 <abastro[m]> I think newtype should work
2022-04-10 15:25:45 × noex quits (~null@user/noex) (Ping timeout: 248 seconds)
2022-04-10 15:27:02 noex joins (~null@user/noex)
2022-04-10 15:39:23 <amenonsen> , ("M-S-h", withWindowSet $ \w -> XS.modify (\(IWs ignored) -> IWs (ignored ++ [W.currentTag w])))
2022-04-10 15:39:23 <amenonsen> , ("M-S-x", withWindowSet $ \w -> XS.modify (\(IWs ignored) -> IWs (filter (\x -> x /= W.currentTag w) ignored)))
2022-04-10 15:39:27 <amenonsen> ok, this works fine.
2022-04-10 15:40:19 <amenonsen> i can in fact hide and unhide (after e.g., mod+2 to go directly to the hidden workspace) multiple workspaces and moveTo Next/Prev behave exactly as desired.
2022-04-10 16:06:45 <amenonsen> hm. should i really switch from (working) XMonad.Hooks.DynamicLog to XMonad.Hooks.StatusBar{,.PP}?
2022-04-10 16:07:56 <geekosaur> I haven't bothered yet. although I need to use dbus so I think it's just the import that would change
2022-04-10 16:14:26 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2022-04-10 16:16:06 geekosaur joins (~geekosaur@xmonad/geekosaur)
2022-04-10 16:23:04 <amenonsen> i'd like to filter out the new NSP workspace in the workspace list. seems straightforward enough. might explore StatusBar alongside.
2022-04-10 16:29:13 <amenonsen> this was certainly a very productive weekend, xmonad-configuration wise. i'm off to bed now, but thank you all for your help.
2022-04-10 16:32:37 <geekosaur> you might at some point abstract out the common part of that to a withIWs function
2022-04-10 16:34:14 <geekosaur> it's not quite trivial because you need to factor the current workspace as well, but it's not terrible either
2022-04-10 18:17:03 benin joins (~benin@183.82.204.110)
2022-04-10 19:08:34 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2022-04-10 19:08:34 allbery_b joins (~geekosaur@xmonad/geekosaur)
2022-04-10 19:08:37 allbery_b is now known as geekosaur
2022-04-10 19:26:56 × benin quits (~benin@183.82.204.110) (Quit: The Lounge - https://thelounge.chat)
2022-04-10 20:15:24 × Nahra quits (~user@static.161.95.99.88.clients.your-server.de) (Remote host closed the connection)
2022-04-10 20:18:48 steve_ joins (~steve@ool-182c2b80.dyn.optonline.net)
2022-04-10 21:20:13 <geekosaur> amenonsen, https://paste.tomsmeding.com/1dWFx7d1
2022-04-10 21:22:05 <geekosaur> sorry, two typoes
2022-04-10 21:24:15 <geekosaur> https://paste.tomsmeding.com/jJFXrr8n also has slightly better comments
2022-04-10 21:42:48 <geekosaur> if you really wanted to be annoying, the first is withIWs (:) and the second is withIWs (filter . (/=))
2022-04-10 21:43:13 <geekosaur> there comes a point where clever becomes unreadable, though
2022-04-10 23:47:01 mvk joins (~mvk@2607:fea8:5ce3:8500::9d5a)
2022-04-11 00:00:04 × mvk quits (~mvk@2607:fea8:5ce3:8500::9d5a) (*.net *.split)
2022-04-11 00:00:05 × ectospasm quits (~ectospasm@user/ectospasm) (*.net *.split)
2022-04-11 00:00:05 × joshproehl quits (~quassel@user/joshproehl) (*.net *.split)
2022-04-11 00:00:05 × coldpress quits (~coldpress@72.136.212.35.bc.googleusercontent.com) (*.net *.split)
2022-04-11 00:00:30 joshproehl joins (~quassel@user/joshproehl)
2022-04-11 00:01:02 ectospasm joins (~ectospasm@23-227-173-50.static.hvvc.us)
2022-04-11 00:01:56 ectospasm is now known as Guest5909
2022-04-11 00:02:09 coldpress joins (~coldpress@72.136.212.35.bc.googleusercontent.com)
2022-04-11 00:22:04 × Guest5909 quits (~ectospasm@23-227-173-50.static.hvvc.us) (Quit: WeeChat 3.5)
2022-04-11 00:22:23 ectospasm joins (~ectospasm@user/ectospasm)
2022-04-11 00:37:12 × noex quits (~null@user/noex) (Quit: :q!)
2022-04-11 00:40:09 × abhixec_ quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: leaving)
2022-04-11 00:53:48 noex joins (~null@user/noex)
2022-04-11 02:03:54 × banc quits (banc@gateway/vpn/airvpn/banc) (Ping timeout: 272 seconds)
2022-04-11 02:12:28 × noex quits (~null@user/noex) (Ping timeout: 260 seconds)
2022-04-11 02:13:09 noex joins (~null@user/noex)
2022-04-11 02:18:54 <abastro[m]> Yea, "Clean code" recommends defining named function for many trivial-looking things
2022-04-11 02:39:48 banc joins (banc@gateway/vpn/airvpn/banc)
2022-04-11 02:46:49 × steve_ quits (~steve@ool-182c2b80.dyn.optonline.net) (Ping timeout: 248 seconds)
2022-04-11 04:07:23 steve_ joins (~steve@ool-182c2b80.dyn.optonline.net)
2022-04-11 04:30:12 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 272 seconds)
2022-04-11 05:31:48 × vanvik quits (~vanvik@78.156.12.223) (*.net *.split)
2022-04-11 05:31:48 × anon_kun600[m] quits (~anonkun60@2001:470:69fc:105::1:ebb8) (*.net *.split)
2022-04-11 05:31:48 × robinhood0018[m] quits (~robinhood@2001:470:69fc:105::1:4dca) (*.net *.split)
2022-04-11 05:31:48 × pentagrade[m] quits (~pentagrad@2001:470:69fc:105::1:e4ae) (*.net *.split)
2022-04-11 05:31:48 × CodeBitCookie[m] quits (~code-bit-@2001:470:69fc:105::a2f) (*.net *.split)
2022-04-11 05:31:48 × M-elo-[m] quits (~gilganixm@2001:470:69fc:105::3d09) (*.net *.split)
2022-04-11 05:31:48 × yuu[m] quits (~yuumatrix@2001:470:69fc:105::8a6) (*.net *.split)
2022-04-11 05:31:49 × ghormoon quits (~ghormoon@ghorland.net) (*.net *.split)
2022-04-11 05:32:49 vanvik joins (~vanvik@78.156.12.223)
2022-04-11 05:33:07 ghormoon joins (~ghormoon@ghorland.net)
2022-04-11 05:33:58 CodeBitCookie[m] joins (~code-bit-@2001:470:69fc:105::a2f)
2022-04-11 05:35:04 pentagrade[m] joins (~pentagrad@2001:470:69fc:105::1:e4ae)
2022-04-11 05:36:11 anon_kun600[m] joins (~anonkun60@2001:470:69fc:105::1:ebb8)
2022-04-11 05:36:44 robinhood0018[m] joins (~robinhood@2001:470:69fc:105::1:4dca)
2022-04-11 05:38:08 M-elo-[m] joins (~gilganixm@2001:470:69fc:105::3d09)
2022-04-11 05:39:05 yuu[m] joins (~yuumatrix@2001:470:69fc:105::8a6)
2022-04-11 05:43:13 × jludwig quits (~justin@li657-110.members.linode.com) (*.net *.split)
2022-04-11 05:43:13 × burp quits (~quassel@hedgewars/sysadmin/burp) (*.net *.split)
2022-04-11 05:43:14 × HAL[m] quits (~evadk8mat@2001:470:69fc:105::3ed0) (*.net *.split)

All times are in UTC.