Merge branch 'master' of framagit.org:mpo/xmonad-config
This commit is contained in:
commit
1600ae6e77
2 changed files with 29 additions and 13 deletions
|
@ -8,7 +8,7 @@ import Data.List (sort, isSuffixOf)
|
||||||
import Data.Maybe (isJust)
|
import Data.Maybe (isJust)
|
||||||
import Graphics.X11.Types
|
import Graphics.X11.Types
|
||||||
import System.Exit
|
import System.Exit
|
||||||
import Text.EditDistance
|
-- import Text.EditDistance
|
||||||
import XMonad
|
import XMonad
|
||||||
import XMonad.Actions.CycleWS
|
import XMonad.Actions.CycleWS
|
||||||
import XMonad.Actions.DynamicProjects
|
import XMonad.Actions.DynamicProjects
|
||||||
|
@ -82,15 +82,15 @@ promptConfig = def
|
||||||
, promptBorderWidth = 5
|
, promptBorderWidth = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Slightly taken from
|
-- -- Slightly taken from
|
||||||
-- https://mail.haskell.org/pipermail/xmonad/2010-October/010671.html
|
-- -- https://mail.haskell.org/pipermail/xmonad/2010-October/010671.html
|
||||||
data FuzzySpawn = FuzzySpawn deriving (Read, Show)
|
-- data FuzzySpawn = FuzzySpawn deriving (Read, Show)
|
||||||
instance XPrompt FuzzySpawn where showXPrompt _ = "RunC: "
|
-- instance XPrompt FuzzySpawn where showXPrompt _ = "RunC: "
|
||||||
fuzzyPrompt config = do
|
-- fuzzyPrompt config = do
|
||||||
cmds <- io getCommands
|
-- cmds <- io getCommands
|
||||||
let compl s
|
-- let compl s
|
||||||
| null s = []
|
-- | null s = []
|
||||||
| otherwise = let weight c = levenshteinDistance defaultEditCosts s c
|
-- | otherwise = let weight c = levenshteinDistance defaultEditCosts s c
|
||||||
in map snd $ take 20 $ sort $ map (\c -> (weight c,c)) cmds
|
-- in map snd $ take 20 $ sort $ map (\c -> (weight c,c)) cmds
|
||||||
mkXPrompt FuzzySpawn config (return . compl) spawn
|
-- mkXPrompt FuzzySpawn config (return . compl) spawn
|
||||||
|
--
|
||||||
|
|
|
@ -71,6 +71,22 @@ projects = [ Project { projectName = "admin"
|
||||||
, projectDirectory = "/tmp"
|
, projectDirectory = "/tmp"
|
||||||
, projectStartHook = Just $ do safeSpawn "nix" ["run", "nixpkgs.chromium", "-c", "chromium"]
|
, 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
|
modify :: XConfig l -> XConfig l
|
||||||
|
|
Loading…
Reference in a new issue