Closed kentookura closed 2 years ago
Even though I don't use the module, I don't really like exposing internals unless there's a very good reason that we should. Do you have an example?
I use the module like so:
dynamicPadKeys :: [((KeyMask, KeySym), X ())]
dynamicPadKeys = map spawnSP keySyms ++ map makeSP keySyms
where
spawnSP x =
((mod4Mask .|. mod1Mask, stringToKeysym x), spawnDynamicSP x)
makeSP x =
( (mod4Mask .|. mod1Mask .|. shiftMask, stringToKeysym x)
, withFocused . makeDynamicSP $ x
)
keySyms = tail $ splitOn "" "abcdefghijklmnonqprstuvwxyz"
I would like to use a logHook to keep track of which keys are bound to which windows. Exposing SPStorage would allow for this functionality.
I was thinking along the lines of https://hackage.haskell.org/package/xmonad-contrib-0.17.0/docs/XMonad-Util-Loggers-NamedScratchpad.html modified for dynamic scratchpads; I don't think it can do so directly at present because it gets too much information from the NamedScratchpad
data structure.
I am willing to work on this. This is my first time contributing to any open source software, so I might need some guidance. Should I add this functionality to the existing logger module or should I create a new Loggers.DynamicScratchpad module?
I'd probably add it to the existing one by refactoring the common parts and then implementing the DynamicScratchpads
part on top of SPStorage
and the existing part on top of NamedScratchpad
.
Hm. Anyone know why the failed CI run would be failing to install hlint?
This may or may not be feature creep, but in the interest of roping you into contributing a bit more[^1], here's a thought.
I noticed that the existence of X.U.DynamicScratchpads may not be necessary at all; this could just be copied over to NamedScratchpads. Would you be interested in doing this as well? If not, that's totally okay, of course!
[^1]: Evil, I know :)
Hm. Anyone know why the failed CI run would be failing to install hlint?
Sure, I'll give it a shot
@kentookura any updates?
Description
Allow the user of DynamicScratchpads to access the current DynamicScratchpads state.
Checklist
[ x] I've read CONTRIBUTING.md
[ x] I've considered how to best test these changes (property, unit, manually, ...) and concluded: XXX
[ ] I updated the
CHANGES.md
file