Home liberachat/#xmonad: Logs Calendar

Logs: liberachat/#xmonad

←Prev  Next→
Page 1 .. 810 811 812 813 814 815 816 817 818 819 820 .. 1850
184,975 events total
2022-08-28 13:09:41 <thyriaen> Howdy I have some bug in my dualTab layout ( line 158 ) - when there is only one window open i lose my spacingRaw - how can i avoid this ? https://paste.sqt.wtf/d639dc
2022-08-28 13:12:45 <thyriaen> And is there a way to make the border of my windows include the tabs and not just around the window itself ?
2022-08-28 13:15:35 <geekosaur> the tabs have their own borders, since they're actually independent windows. and the borders are built into the windows, so can't be expanded
2022-08-28 13:18:18 <thyriaen> is it possible to remove the borders on the top when taps are on them and change the outer borders of the tabs ? :p
2022-08-28 13:18:21 <geekosaur> I don't see any reason why spacingRaw would cease working; tabs generally go away if there's only one window, but that's independent
2022-08-28 13:18:48 <geekosaur> you can change the borders of the tabs, but they can't be controlled per side
2022-08-28 13:19:01 <thyriaen> geekosaur, yeath, the taps do go away but when i only have one window in the dualTabs view i have no gaps
2022-08-28 13:19:20 <geekosaur> yes, I read that
2022-08-28 13:19:34 <geekosaur> it doesn't make a whole lot of sense, that's independent of the tabs
2022-08-28 13:19:52 <thyriaen> i thought the first boolean value controls if the gaps are smart or not
2022-08-28 13:20:14 <thyriaen> and since i set it to false it shouldn't go away if only one window exist
2022-08-28 13:20:45 <thyriaen> i think it has something todo with the combining of the twoPane layout - which layout is chosen when there is only one window ?
2022-08-28 13:22:02 <[Leary]> Looks like it doesn't use either of them.
2022-08-28 13:22:33 <thyriaen> can I define a fallback layout when there is only one window somehow ?
2022-08-28 13:23:00 <[Leary]> I suggest you try pulling addTabs and gap outside of combineTwo first.
2022-08-28 13:23:03 <geekosaur> XMonad.Layout.IfMax
2022-08-28 13:23:33 <[Leary]> (You *can*, but it will make your layout hackier.)
2022-08-28 13:23:53 <thyriaen> [Leary], i think there are some spacing issues with the tabs then - i remember i had it this way a few weeks ago
2022-08-28 13:24:35 geekosaur is remembering that, yeh
2022-08-28 13:24:42 <[Leary]> The problem then was that gap was outside of tabs. So long as you apply those two in the right order, you should be able to put combineTwo inside.
2022-08-28 13:24:54 <[Leary]> iirc anyway
2022-08-28 13:25:11 <[Leary]> Seems like addTabs just wants to be outermost
2022-08-28 13:26:29 <thyriaen> ah
2022-08-28 13:26:33 <[Leary]> Well, I'm not certain how clever addTabs is, it might not actually handle combineTwo properly, that might require sublayouts...
2022-08-28 13:26:33 <thyriaen> so you suggest
2022-08-28 13:26:52 <thyriaen> addTabs gap combineTwo
2022-08-28 13:26:55 <thyriaen> in that order ?
2022-08-28 13:27:08 <[Leary]> Yeah, at least give it a try.
2022-08-28 13:27:30 <geekosaur> addTabs isn't very clever
2022-08-28 13:27:52 <geekosaur> it's also abusing Decoration in ways that sometimes cause problems
2022-08-28 13:30:02 <thyriaen> i am having trouble creating anything that compiles :p
2022-08-28 13:31:16 <thyriaen> gap $ addTabs shrinkText myTabConfig ( TwoPane 0.03 0.5 ) -- this gives me something but without tabs at all
2022-08-28 13:32:15 <geekosaur> I was trying to figure out why [Leary] would suggest that, since the "tabs" would be for the sublayouts, but those aren't actually windows and would confuse it
2022-08-28 13:32:34 <thyriaen> yea
2022-08-28 13:32:42 <thyriaen> i think the tabs should be directly at the window
2022-08-28 13:32:47 <thyriaen> and not at the layout
2022-08-28 13:33:55 <[Leary]> I was thinking: dualTab = addTabs shrinkText myTabConfig . gap $ combineTwo (TwoPane 0.03 0.5) Simplest Simplest
2022-08-28 13:34:19 <[Leary]> But I do suspect it's not quite right.
2022-08-28 13:34:28 <thyriaen> did you run it ?
2022-08-28 13:36:15 <thyriaen> Ambiguous type variable 'a0' arising from a use of 'combineTwo'
2022-08-28 13:38:07 <thyriaen> it actually works :p
2022-08-28 13:38:49 <thyriaen> now it would be good for me to understand whats going on with that .
2022-08-28 13:39:47 <thyriaen> i know it is a combination of functions but how to rewrite it without the . ?
2022-08-28 13:40:11 <[Leary]> . is function composition: f $ g $ x === f . g $ x === (f . g) x === f (g x)
2022-08-28 13:41:44 <thyriaen> thanks
2022-08-28 13:46:16 <thyriaen> i found something really really interesting
2022-08-28 13:48:11 <thyriaen> this does work: https://paste.sqt.wtf/24cb24
2022-08-28 13:49:16 <thyriaen> and so does this https://paste.sqt.wtf/fb824b
2022-08-28 13:49:55 <thyriaen> but this doesn't https://paste.sqt.wtf/38f88c, because myTest has two different types now
2022-08-28 13:51:28 <[Leary]> It would probably work if you gave it a general enough type signature, or disabled the MonomorphismRestriction.
2022-08-28 13:52:01 <thyriaen> okay what would be the correct type of it ? xD
2022-08-28 13:53:29 <[Leary]> You can probably read it off the docs for `addTabs`. GHC might be able to tell you if you give it a "hole" to fill like: `myTest :: _`
2022-08-28 13:53:48 <thyriaen> oh really ?
2022-08-28 13:56:06 <[Leary]> By the way, if you want to take your test further, you should be able to move `gap` in there too, then apply `myTest` outside of the ||| those two layout share.
2022-08-28 13:57:24 <thyriaen> i don't quite catch how the syntax should be for that
2022-08-28 13:57:33 <thyriaen> but yeath the gap should also be in there
2022-08-28 13:58:00 <thyriaen> myTest x = addTabs shrinkText myTabConfig ( gap x ) ?
2022-08-28 13:59:40 <[Leary]> Normally this is where you use composition, but that is equivalent, yes.
2022-08-28 13:59:55 <thyriaen> ah you mean
2022-08-28 14:00:11 <thyriaen> addTabs shrinkText myTabConfig . gap
2022-08-28 14:00:18 <[Leary]> Right.
2022-08-28 14:00:31 <thyriaen> ah
2022-08-28 14:00:40 <thyriaen> when i use my x notation it works fine
2022-08-28 14:00:49 <thyriaen> with the . it again can't figure out the type T_T
2022-08-28 14:02:17 <thyriaen> could you help me figure out the right type for it ?
2022-08-28 14:02:24 <geekosaur> likely the monomorphism restriction, but also haskell has trouble inferring types of layouts when they're not used
2022-08-28 14:02:35 <thyriaen> i wonder
2022-08-28 14:02:43 <geekosaur> [Leary] already pointed out the use of holes
2022-08-28 14:02:47 <thyriaen> isn't combineTwo (TwoPane 0.03 0.5) Simplest Simplest just TwoPane ?
2022-08-28 14:02:59 <geekosaur> you could also give it an incorrect type and have it tell you the correct one
2022-08-28 14:03:19 ectospasm joins (~ectospasm@user/ectospasm)
2022-08-28 14:03:41 <geekosaur> not quite, since you have to manually move windows between panes
2022-08-28 14:03:59 <geekosaur> (this actually gives you more control than you;d normally have, I think)
2022-08-28 14:04:39 <thyriaen> i am not quite successful with the _
2022-08-28 14:05:30 <geekosaur> can you pastebin the error it produces? (it always produces one, unless you enable an extension that allows it to proceed with the inferred type)
2022-08-28 14:05:52 <thyriaen> i somehow cannot copy out of the xmessage window
2022-08-28 14:06:06 <thyriaen> ah there is an error log somewhere, right ?
2022-08-28 14:06:51 <thyriaen> https://termbin.com/ogwn
2022-08-28 14:07:44 <[Leary]> This is why we don't bother giving our layout helpers types in xmonad. <.<
2022-08-28 14:07:59 <[Leary]> It just becomes a mess.
2022-08-28 14:08:07 <thyriaen> hihi
2022-08-28 14:09:29 <[Leary]> In any case, you *could* copy that type signature, generalising the argument type (and where it appears in the result type) to some type variable `l`.
2022-08-28 14:10:17 <[Leary]> But I would just use {-# LANGUAGE NoMonomorphisRestriction #-} at the top of the config.
2022-08-28 14:10:28 <[Leary]> It's GHC's job to infer these things for you.
2022-08-28 14:10:49 <[Leary]> phism*
2022-08-28 14:10:49 <thyriaen> what is a good reason for there being MonomorphisRestrictions enabled ?
2022-08-28 14:10:58 <geekosaur> https://github.com/geekosaur/xmonad.hs/blob/skkukuk/xmonad.hs#L51 🙂
2022-08-28 14:11:26 <[Leary]> It helps share work in some cases.
2022-08-28 14:11:43 <[Leary]> Here, I don't think it really matters.
2022-08-28 14:12:45 <thyriaen> awesome
2022-08-28 14:12:55 <thyriaen> works and looks cleaner aswell :p
2022-08-28 14:15:34 <thyriaen> i love haskell so much
2022-08-28 14:15:44 <thyriaen> although it really messes up my head
2022-08-28 14:22:22 <geekosaur> it does that to a lot of people 🙂
2022-08-28 14:23:05 <thyriaen> i always wondered why on earth do i want to use a language with lots of abstraction like java when i can just use c
2022-08-28 14:23:29 <geekosaur> I can think of lots of reasons. starting woth, er, strings
2022-08-28 14:23:30 <thyriaen> until i met haskell and i never wanted to go back to imperative stuff
2022-08-28 14:23:33 <geekosaur> *with
2022-08-28 14:24:13 <thyriaen> yea sure - but i am talking about the object orientation stuff
2022-08-28 14:24:28 <thyriaen> sure it is nice to have sane data types :p

All times are in UTC.