Enable FuzzyMatch

This commit is contained in:
Samae 2023-08-01 12:21:23 +03:00
parent 591521b585
commit 57782266e2
3 changed files with 10 additions and 1 deletions

View file

@ -18,6 +18,7 @@ import XMonad.Layout.ToggleLayouts
import XMonad.Operations
import XMonad.Prompt
import XMonad.Prompt.ConfirmPrompt
import XMonad.Prompt.FuzzyMatch
import XMonad.Prompt.Shell
import XMonad.Util.EZConfig
import XMonad.Util.NamedScratchpad
@ -98,6 +99,9 @@ promptConfig = def
, font = "xft:Iosevka Samae:style=Regular:size=8:charwidth=5"
, height = 24
, promptBorderWidth = 5
-- Fuzzysearch by default
, searchPredicate = fuzzyMatch
, sorter = fuzzySort
}
-- -- Slightly taken from

View file

@ -53,7 +53,7 @@ mkPassPrompt label f conf = do
passComplFun :: [String] -> String -> IO [String]
passComplFun allPasses input = pure $
sortBy (compare `on` levenshtein input)
. take 5
. take 10
. filter (consumes input)
$ allPasses
where

View file

@ -47,6 +47,11 @@ projects =
, projectStartHook = Just $ do spawnGuiTextEditor
safeSpawnProg term
}
, Project { projectName = "nixpkgs"
, projectDirectory = "~/admin/nixpkgs"
, projectStartHook = Just $ do spawnGuiTextEditor
safeSpawnProg term
}
, Project { projectName = "overlays-personal"
, projectDirectory = "~/admin/overlays-personal"
, projectStartHook = Just $ do spawnGuiTextEditor