2022-04-10 00:16:40 +0200 | mc47 | (~mc47@xmonad/TheMC47) (Read error: Connection reset by peer) |
2022-04-10 01:47:11 +0200 | abhixec_ | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
2022-04-10 02:47:08 +0200 | kidany | (~kidany@68.205.87.94) (Quit: Leaving) |
2022-04-10 03:02:17 +0200 | benin | (~benin@183.82.204.110) (Quit: The Lounge - https://thelounge.chat) |
2022-04-10 04:03:42 +0200 | banc | (banc@gateway/vpn/airvpn/banc) (Ping timeout: 272 seconds) |
2022-04-10 04:22:57 +0200 | banc | (banc@gateway/vpn/airvpn/banc) |
2022-04-10 04:54:42 +0200 | steve_ | (~steve@ool-182c2b80.dyn.optonline.net) (Ping timeout: 246 seconds) |
2022-04-10 05:33:53 +0200 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 256 seconds) |
2022-04-10 05:38:53 +0200 | benin | (~benin@183.82.204.110) |
2022-04-10 06:15:05 +0200 | Czernobog | (~Czernobog@user/czernobog) (Quit: ZNC 1.8.2 - https://znc.in) |
2022-04-10 06:16:50 +0200 | Czernobog | (~Czernobog@user/czernobog) |
2022-04-10 06:28:40 +0200 | Czernobog | (~Czernobog@user/czernobog) (Read error: Connection reset by peer) |
2022-04-10 06:35:41 +0200 | Czernobog | (~Czernobog@user/czernobog) |
2022-04-10 06:39:24 +0200 | Czernobog | (~Czernobog@user/czernobog) (Client Quit) |
2022-04-10 06:41:00 +0200 | Czernobog | (~Czernobog@user/czernobog) |
2022-04-10 06:47:54 +0200 | Czernobog | (~Czernobog@user/czernobog) (Read error: Connection reset by peer) |
2022-04-10 06:48:24 +0200 | Czernobog | (~Czernobog@user/czernobog) |
2022-04-10 06:48:40 +0200 | Czernobog | (~Czernobog@user/czernobog) (Remote host closed the connection) |
2022-04-10 06:50:28 +0200 | Czernobog | (~Czernobog@user/czernobog) |
2022-04-10 06:59:31 +0200 | dschrempf | (~dominik@2a01-036d-0118-ae84-6c6f-79fb-839d-0cde.pool6.digikabel.hu) |
2022-04-10 07:14:57 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2022-04-10 07:14:59 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2022-04-10 07:15:02 +0200 | allbery_b | geekosaur |
2022-04-10 07:24:29 +0200 | dschrempf | (~dominik@2a01-036d-0118-ae84-6c6f-79fb-839d-0cde.pool6.digikabel.hu) (Quit: WeeChat 3.4.1) |
2022-04-10 08:50:40 +0200 | Czernobog | (~Czernobog@user/czernobog) (Quit: ZNC 1.8.2 - https://znc.in) |
2022-04-10 08:51:07 +0200 | <amenonsen> | hmm, maybe I can use XMonad.Actions.PerWorkspaceKeys to use XMonad.Util.ExtensibleState to mark/unmark a workspace for skipping. |
2022-04-10 08:52:23 +0200 | Czernobog | (~Czernobog@user/czernobog) |
2022-04-10 08:58:48 +0200 | Czernobog | (~Czernobog@user/czernobog) (Quit: ZNC 1.8.2 - https://znc.in) |
2022-04-10 09:00:30 +0200 | Czernobog | (~Czernobog@user/czernobog) |
2022-04-10 11:05:44 +0200 | noex | (~null@user/noex) (Remote host closed the connection) |
2022-04-10 11:06:13 +0200 | noex | (~null@user/noex) |
2022-04-10 12:12:25 +0200 | <Ether[m]> | Is it possible to do tell xmonad to do a something when theree are 3 windows in particular layout? |
2022-04-10 12:12:33 +0200 | Nahra | (~user@static.161.95.99.88.clients.your-server.de) |
2022-04-10 12:16:48 +0200 | <abastro[m]> | I think layouthook is capable of that |
2022-04-10 12:17:08 +0200 | <abastro[m]> | Forgot how to do tho |
2022-04-10 12:27:24 +0200 | <Ether[m]> | When something is unbound xmonad uses default bindings.. |
2022-04-10 12:27:34 +0200 | <Ether[m]> | How do i change this behavior 🤔? |
2022-04-10 12:28:43 +0200 | <Solid> | you can directly override the `keys` field of the XConfig record |
2022-04-10 12:38:45 +0200 | <amenonsen> | i think i've thoroughly broken my xmonad by trying to use Util.ExtensibleState to hide my work-space |
2022-04-10 12:43:48 +0200 | <fizzie> | Ether[m]: If you're using EZConfig for your key bindings, it's got an `removeKeys` and `removeKeysP` for removing bindings from the defaults. |
2022-04-10 12:45:38 +0200 | <fizzie> | (Assuming you want to keep most of the defaults and just drop some. If you don't want any defaults at all, then yeah, just set `keys` in the config directly.) |
2022-04-10 13:07:05 +0200 | benin | (~benin@183.82.204.110) (Ping timeout: 248 seconds) |
2022-04-10 13:12:31 +0200 | <amenonsen> | hmm, the examples of ExtensibleState usage in xmonad-contrib are distinctly non-trivial |
2022-04-10 13:18:24 +0200 | <abastro[m]> | What is ExtensibleState? |
2022-04-10 13:19:23 +0200 | <amenonsen> | https://xmonad.github.io/xmonad-docs/xmonad-contrib/XMonad-Util-ExtensibleState.html |
2022-04-10 13:19:26 +0200 | <amenonsen> | "Module for storing custom mutable state in xmonad." |
2022-04-10 13:20:24 +0200 | <amenonsen> | i'm trying to store a list of WorkspaceIds to ignore with moveTo Next/Prev workspaces (with .Action.CycleWS) |
2022-04-10 13:56:47 +0200 | <geekosaur> | Ether[m], re 3 windows, take a look at XMonad.Layout.IfMax |
2022-04-10 13:57:07 +0200 | <geekosaur> | re bindings, you're seeing what is wrong with the kind of config you used instead of the one we recommend |
2022-04-10 14:06:48 +0200 | <fizzie> | amenonsen: The ExtensibleState module-level docs have kind of the minimal possible example, for storing an [Integer], which isn't really any different from storing a [WorkspaceId] (aka [String]). But it is inherently quite... Haskell-y, since it involves a type class. |
2022-04-10 14:10:00 +0200 | <fizzie> | You'd basically need that latter, five-line block, where you'd substitute `ListStorage` by some name descriptive of your thing (say, `IgnoredWorkspaces`) and `[Integer]` by `[WorkspaceId]`, and that would allow you, in a keybinding or elsewhere you have a X action, to say `XS.put (IgnoredWorkspaces ["foo", "bar"])` to update the list, and `(XS.get :: X IgnoredWorkspaces)` to retrieve it back. |
2022-04-10 14:23:53 +0200 | <amenonsen> | fizzie: that's roughly what i've done, following the integer example that you pointed me to yesterday. |
2022-04-10 14:24:24 +0200 | <amenonsen> | https://irc.toroid.org/file/2/Dd36AugJga0LqFjU |
2022-04-10 14:24:56 +0200 | <amenonsen> | sorry, and this is what the definition looks like: |
2022-04-10 14:24:59 +0200 | <amenonsen> | https://irc.toroid.org/file/2/8G5CWUUzLBKgjBTc |
2022-04-10 14:25:26 +0200 | <amenonsen> | (you're right, though, IgnoredWorkspaces would have been a better name for it) |
2022-04-10 14:29:43 +0200 | <fizzie> | That looks mostly right, you'll just need to unwrap it from the WorkspaceList type, and also sequence it to get it out of the X. |
2022-04-10 14:31:03 +0200 | <fizzie> | Completely untested, but something like ("M-<Left>", (XS.get :: X WorkspaceList) >>= \(WorkspaceList ignored) -> (moveTo Prev $ ignoringWSs ignoring)) has a _chance_ of working. |
2022-04-10 14:31:13 +0200 | <fizzie> | There's probably a more elegant way of doing that too. |
2022-04-10 14:33:05 +0200 | <fizzie> | Maybe with do notation, something like ("M-<Left>", do WorkspaceList ignored <- XS.get; moveTo Prev $ ignoringWSs ignored). Or something vaguely like that. I can't really write Haskell without some machine assistance. |
2022-04-10 14:34:44 +0200 | <amenonsen> | it works! |
2022-04-10 14:34:55 +0200 | <amenonsen> | (i tried the first form, not the do) |
2022-04-10 14:35:47 +0200 | <amenonsen> | so now i just need to make another keybinding to add another workspaceid to the list |
2022-04-10 14:44:43 +0200 | <abastro[m]> | I wonder what would be the usecase of the advanced feature |
2022-04-10 14:47:32 +0200 | <geekosaur> | which advanced feature? |
2022-04-10 14:51:57 +0200 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2022-04-10 15:05:15 +0200 | de-vri-es | (~de-vri-es@voyager.de-vri.es) (Quit: Bathrobe!) |
2022-04-10 15:05:46 +0200 | de-vri-es | (~de-vri-es@voyager.de-vri.es) |
2022-04-10 15:06:55 +0200 | <abastro[m]> | Mutable states |
2022-04-10 15:07:06 +0200 | <abastro[m]> | * Mutable extended states |
2022-04-10 15:10:43 +0200 | <geekosaur> | in this case, they have a "work" workspace and want to hide it when they're not working |
2022-04-10 15:11:24 +0200 | <geekosaur> | I have a module that uses it to add "icons" to NamedScratchpads (which needs to be extended for dynamic scratchpads at some point) |
2022-04-10 15:11:56 +0200 | <geekosaur> | various other modules use it to add state to the core without having to patch the core |
2022-04-10 15:13:36 +0200 | <geekosaur> | since that lets you pass state between hooks |
2022-04-10 15:37:56 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2022-04-10 15:38:16 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2022-04-10 15:47:38 +0200 | <abastro[m]> | Oh, I see |
2022-04-10 16:00:48 +0200 | <amenonsen> | i have main = do … spawn … xmonad $ … $ stuff |
2022-04-10 16:01:14 +0200 | <amenonsen> | can i stuff an XS.put(IgnoredWorkspace [scratchpadWorkspaceTag]) in there somehow? |
2022-04-10 16:01:40 +0200 | <amenonsen> | (as opposed to setting initialValue = [scratchpadWorkspaceTag] when defining the type) |
2022-04-10 16:01:54 +0200 | <fizzie> | No, because it's in IO, and you need that to be in X. You could stuff one in startupHook, though. |
2022-04-10 16:06:37 +0200 | <fizzie> | (How exactly you'd do that depends a little on what `… $ stuff` looks like, but it's just a field on the XConfig like manageHook and others. And the type is already a X (), which is exactly what a `XS.put (...)` is too.) |
2022-04-10 16:14:03 +0200 | <amenonsen> | cool. |
2022-04-10 16:14:48 +0200 | <amenonsen> | if i `import qualified XMonad.StackSet as W`, will W.workspace be my current WorkspaceId? |
2022-04-10 16:21:13 +0200 | <geekosaur> | W.currentTag |
2022-04-10 16:21:47 +0200 | <geekosaur> | W.workspace points to the actual workspace record, which contains a tag, the current layout, and a Maybe Stack |
2022-04-10 16:23:33 +0200 | <geekosaur> | also it won't be the current one necessarily; you need to go through W.current (which gets you a Screen) and *then* W.workspace |
2022-04-10 16:23:55 +0200 | <geekosaur> | W.currentTag is shorthand for W.tag . W.workspace . W.current |
2022-04-10 16:24:11 +0200 | <amenonsen> | currentWs = liftX (withWindowSet $ return . W.currentTag) |
2022-04-10 16:24:20 +0200 | <amenonsen> | (found in Hooks/ManageHelpers) |
2022-04-10 16:24:26 +0200 | <geekosaur> | yep |
2022-04-10 16:26:07 +0200 | <geekosaur> | (the liftX indicates that it's a manageHook) |
2022-04-10 16:26:21 +0200 | <fizzie> | If you just need an `X WorkspaceId`, I imagine it should be just `withWindowSet W.currentTag`. |
2022-04-10 16:31:56 +0200 | <amenonsen> | https://irc.toroid.org/file/2/avA9g9ntHRsUB2Cr |
2022-04-10 16:31:59 +0200 | <geekosaur> | still need the return because it's in X |
2022-04-10 16:35:35 +0200 | <amenonsen> | , ("M-C-A-h", (XS.get :: X IgnoredWorkspaces) >>= \(IgnoredWorkspaces ignored) -> (XS.put (IgnoredWorkspaces $ ignored ++ [(withWindowSet $ return . W.currentTag)]))) |
2022-04-10 16:35:52 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2022-04-10 16:35:52 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2022-04-10 16:35:55 +0200 | allbery_b | geekosaur |
2022-04-10 16:35:59 +0200 | <amenonsen> | this says Expected type: WorkspaceId, Actual type: X WorkspaceId. that seems like progress. |
2022-04-10 16:36:16 +0200 | <amenonsen> | but just adding liftX gives me a Query WorkspaceId |
2022-04-10 16:38:32 +0200 | <geekosaur> | withWindowSet $ return W.currentTag |
2022-04-10 16:38:43 +0200 | <geekosaur> | or: fmap W.currentTag $ gets windowset |
2022-04-10 16:39:32 +0200 | <abastro[m]> | Wow complex onr |
2022-04-10 16:39:38 +0200 | <abastro[m]> | * Wow complex one |
2022-04-10 16:56:47 +0200 | <fizzie> | See also XS.modify. |
2022-04-10 16:58:09 +0200 | <geekosaur> | sorry, needed that dot. withWindowSet $ return . W.currentTag |
2022-04-10 16:58:46 +0200 | <geekosaur> | without the dot it's withWindowSet $ \w -> return (W.currentTag w) |
2022-04-10 17:02:50 +0200 | <fizzie> | Or, putting it together slightly differently: withWindowSet $ \w -> XS.modify (\(IgnoredWorkspaces ignored) -> IgnoredWorkspaces (ignored ++ [W.currentTag w])) |
2022-04-10 17:03:40 +0200 | <geekosaur> | I'd actually use : instead of ++ unless order matters, but it doesn't seem to here |
2022-04-10 17:06:08 +0200 | <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 17:06:29 +0200 | <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 17:08:19 +0200 | <amenonsen> | so i have |
2022-04-10 17:08:23 +0200 | <amenonsen> | , ("M-C-A-h", withWindowSet $ \w -> XS.modify (\(IgnoredWorkspaces ignored) -> IgnoredWorkspaces (ignored ++ [W.currentTag w]))) |
2022-04-10 17:08:23 +0200 | <amenonsen> | , ("M-C-A-s", withWindowSet $ \w -> XS.modify (\(IgnoredWorkspaces ignored) -> IgnoredWorkspaces (filter (\x -> x /= W.currentTag w) ignored))) |
2022-04-10 17:08:56 +0200 | <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:Mon…) would, but that's a fairly heavy dependency for such a light use case |
2022-04-10 17:09:10 +0200 | <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 17:09:38 +0200 | <amenonsen> | is there a convenient way for me to dump the contents of the list for debugging? |
2022-04-10 17:09:47 +0200 | <geekosaur> | so mostly I'd just define it with a shorter data constructor (IW instead of IgnoredWorkspaces) |
2022-04-10 17:11:09 +0200 | <abastro[m]> | Well this kind of modification is also possible with optics but |
2022-04-10 17:11:32 +0200 | <abastro[m]> | In this case, it seems like `IgnoredWorkspaces` is a newtype. Is it? |
2022-04-10 17:11:36 +0200 | <amenonsen> | well, i changed it to IWs |
2022-04-10 17:12:08 +0200 | <amenonsen> | it compiles, but it doesn't seem to work (the thing doesn't get ignored after my key binding) |
2022-04-10 17:12:50 +0200 | <amenonsen> | abastro[m]: yes, data IWs = IWs [WorkspaceId] \n instance ExtensionClass IWs where initialValue = IWs [] |
2022-04-10 17:13:08 +0200 | <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 17:13:20 +0200 | <abastro[m]> | If you define it as a newtype, you can use `coerce` function |
2022-04-10 17:13:52 +0200 | <abastro[m]> | :t coerce |
2022-04-10 17:13:53 +0200 | <lambdabot> | error: |
2022-04-10 17:13:54 +0200 | <lambdabot> | • Variable not in scope: coerce |
2022-04-10 17:13:54 +0200 | <lambdabot> | • Perhaps you meant ‘coerced’ (imported from Control.Lens) |
2022-04-10 17:14:00 +0200 | <geekosaur> | then (XS.get :: IWs) >>= hPutStrLn . show |
2022-04-10 17:14:14 +0200 | <geekosaur> | bah, yahb isn't in here |
2022-04-10 17:14:29 +0200 | <abastro[m]> | @hoogle coerce |
2022-04-10 17:14:30 +0200 | <lambdabot> | Data.Coerce coerce :: forall (k :: RuntimeRep) (a :: TYPE k) (b :: TYPE k) . Coercible a b => a -> b |
2022-04-10 17:14:30 +0200 | <lambdabot> | GHC.Exts coerce :: forall (k :: RuntimeRep) (a :: TYPE k) (b :: TYPE k) . Coercible a b => a -> b |
2022-04-10 17:14:30 +0200 | <lambdabot> | Control.Lens.Internal.Coerce coerce :: Coercible a b => a -> b |
2022-04-10 17:14:57 +0200 | <amenonsen> | abastro[m]: (but i have no idea what any of that means) |
2022-04-10 17:15:20 +0200 | <geekosaur> | I am not sure a newtype will work there, tbh |
2022-04-10 17:15:33 +0200 | <geekosaur> | there's some type games going on in ExtensibleState |
2022-04-10 17:16:33 +0200 | <abastro[m]> | In this case, if you define IWs with newtype, Coercible ([] WorkspaceId -> [] WorkspaceId) (IWs -> IWs) |
2022-04-10 17:16:51 +0200 | <abastro[m]> | That is, you can convert a function on WorkspaceId to a function on IWs |
2022-04-10 17:17:26 +0200 | <abastro[m]> | I think newtype should work |
2022-04-10 17:25:45 +0200 | noex | (~null@user/noex) (Ping timeout: 248 seconds) |
2022-04-10 17:27:02 +0200 | noex | (~null@user/noex) |
2022-04-10 17:39:23 +0200 | <amenonsen> | , ("M-S-h", withWindowSet $ \w -> XS.modify (\(IWs ignored) -> IWs (ignored ++ [W.currentTag w]))) |
2022-04-10 17:39:23 +0200 | <amenonsen> | , ("M-S-x", withWindowSet $ \w -> XS.modify (\(IWs ignored) -> IWs (filter (\x -> x /= W.currentTag w) ignored))) |
2022-04-10 17:39:27 +0200 | <amenonsen> | ok, this works fine. |
2022-04-10 17:40:19 +0200 | <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 18:06:45 +0200 | <amenonsen> | hm. should i really switch from (working) XMonad.Hooks.DynamicLog to XMonad.Hooks.StatusBar{,.PP}? |
2022-04-10 18:07:56 +0200 | <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 18:14:26 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2022-04-10 18:16:06 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2022-04-10 18:23:04 +0200 | <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 18:29:13 +0200 | <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 18:32:37 +0200 | <geekosaur> | you might at some point abstract out the common part of that to a withIWs function |
2022-04-10 18:34:14 +0200 | <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 20:17:03 +0200 | benin | (~benin@183.82.204.110) |
2022-04-10 21:08:34 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2022-04-10 21:08:34 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2022-04-10 21:08:37 +0200 | allbery_b | geekosaur |
2022-04-10 21:26:56 +0200 | benin | (~benin@183.82.204.110) (Quit: The Lounge - https://thelounge.chat) |
2022-04-10 22:15:24 +0200 | Nahra | (~user@static.161.95.99.88.clients.your-server.de) (Remote host closed the connection) |
2022-04-10 22:18:48 +0200 | steve_ | (~steve@ool-182c2b80.dyn.optonline.net) |
2022-04-10 23:20:13 +0200 | <geekosaur> | amenonsen, https://paste.tomsmeding.com/1dWFx7d1 |
2022-04-10 23:22:05 +0200 | <geekosaur> | sorry, two typoes |
2022-04-10 23:24:15 +0200 | <geekosaur> | https://paste.tomsmeding.com/jJFXrr8n also has slightly better comments |
2022-04-10 23:42:48 +0200 | <geekosaur> | if you really wanted to be annoying, the first is withIWs (:) and the second is withIWs (filter . (/=)) |
2022-04-10 23:43:13 +0200 | <geekosaur> | there comes a point where clever becomes unreadable, though |