Skip to content

Commit

Permalink
Merge pull request #874 from ulrikdem/ezconfig-duplicate
Browse files Browse the repository at this point in the history
X.U.EZConfig: Fix checkKeymap warning that all keybindings are duplicate
  • Loading branch information
slotThe authored Feb 16, 2024
2 parents 93ad0ef + aec2186 commit c8dff5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

* Fix build-with-cabal.sh when XDG_CONFIG_HOME is defined.

* `XMonad.Util.EZConfig`

- Fixed `checkKeymap` warning that all keybindings are duplicates.

### Other changes

## 0.18.0 (February 3, 20
Expand Down
4 changes: 2 additions & 2 deletions XMonad/Util/EZConfig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@ doKeymapCheck :: XConfig l -> [(String,a)] -> ([String], [String])
doKeymapCheck conf km = (bad,dups)
where ks = map ((readKeySequence conf &&& id) . fst) km
bad = nub . map snd . filter (isNothing . fst) $ ks
dups = map (snd . NE.head)
. mapMaybe nonEmpty
dups = map (snd . NE.head . notEmpty)
. filter ((>1) . length)
. groupBy ((==) `on` fst)
. sortBy (comparing fst)
. map (first fromJust)
Expand Down

0 comments on commit c8dff5e

Please sign in to comment.