diff --git a/lib/KeyBindings.hs b/lib/KeyBindings.hs index c3c0c73..a6fa3cb 100644 --- a/lib/KeyBindings.hs +++ b/lib/KeyBindings.hs @@ -8,7 +8,7 @@ import Data.List (sort, isSuffixOf) import Data.Maybe (isJust) import Graphics.X11.Types import System.Exit -import Text.EditDistance +-- import Text.EditDistance import XMonad import XMonad.Actions.CycleWS import XMonad.Actions.DynamicProjects @@ -82,15 +82,15 @@ promptConfig = def , promptBorderWidth = 5 } --- Slightly taken from --- https://mail.haskell.org/pipermail/xmonad/2010-October/010671.html -data FuzzySpawn = FuzzySpawn deriving (Read, Show) -instance XPrompt FuzzySpawn where showXPrompt _ = "RunC: " -fuzzyPrompt config = do - cmds <- io getCommands - let compl s - | null s = [] - | otherwise = let weight c = levenshteinDistance defaultEditCosts s c - in map snd $ take 20 $ sort $ map (\c -> (weight c,c)) cmds - mkXPrompt FuzzySpawn config (return . compl) spawn - +-- -- Slightly taken from +-- -- https://mail.haskell.org/pipermail/xmonad/2010-October/010671.html +-- data FuzzySpawn = FuzzySpawn deriving (Read, Show) +-- instance XPrompt FuzzySpawn where showXPrompt _ = "RunC: " +-- fuzzyPrompt config = do +-- cmds <- io getCommands +-- let compl s +-- | null s = [] +-- | otherwise = let weight c = levenshteinDistance defaultEditCosts s c +-- in map snd $ take 20 $ sort $ map (\c -> (weight c,c)) cmds +-- mkXPrompt FuzzySpawn config (return . compl) spawn +-- diff --git a/lib/Projects.hs b/lib/Projects.hs index fbd3b10..1d32cd3 100644 --- a/lib/Projects.hs +++ b/lib/Projects.hs @@ -71,6 +71,22 @@ projects = [ Project { projectName = "admin" , projectDirectory = "/tmp" , projectStartHook = Just $ do safeSpawn "nix" ["run", "nixpkgs.chromium", "-c", "chromium"] } + , Project { projectName = "steam" + , projectDirectory = "~/" + , projectStartHook = Just $ do spawn "steam" + } + , Project { projectName = "web" + , projectDirectory = "/tmp" + , projectStartHook = Just $ do spawn "firefox" + } + , Project { projectName = "yt" + , projectDirectory = "/tmp" + , projectStartHook = Just $ do spawn "ytapp-launcher.sh" + } + , Project { projectName = "Diablo" + , projectDirectory = "/tmp" + , projectStartHook = Just $ do spawn "/run/current-system/sw/bin/wine '/home/eeva/.wine/drive_c/Program Files/Battle.net/Battle.net Launcher.exe'" + } ] modify :: XConfig l -> XConfig l