This commit is contained in:
eeva 2019-01-27 21:20:08 +02:00
parent 82ae92f620
commit b5b91cdd8d
4 changed files with 20 additions and 16 deletions

View File

@ -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
@ -47,7 +47,7 @@ modify conf = conf
, ("M-<Right>", nextWS)
, ("M-<Tab>", toggleWS' ["NSP"])
, ("M-<Up>", windows W.focusUp)
, ("M-S-<Delete>", spawn "/run/current-system/sw/bin/i3lock -f -t -c 002b36")
, ("M-S-<Delete>", spawn "/run/current-system/sw/bin/xset s activate")
, ("M-S-<Left>", shiftToPrev >> prevWS)
, ("M-S-<Right>", shiftToNext >> nextWS)
, ("M-s s", spawn "sleep 0.2 ; /run/current-system/sw/bin/scrot -s /tmp/screenSel.png")
@ -83,15 +83,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
--

View File

@ -26,6 +26,10 @@ projects = [ Project { projectName = "admin"
, 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

View File

@ -16,7 +16,7 @@ modify conf = conf
}
pads =
[ NS "htop" "/run/current-system/sw/bin/alacritty -t htop -e tmux" (title =? "htop")
[ NS "htop" "/run/current-system/sw/bin/st -t htop -e tmux" (title =? "htop")
(customFloating $ W.RationalRect (1/3) (1/3) (1/3) (1/3))
-- , NS "stardict" "stardict" (className =? "Stardict")
-- (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3))

View File

@ -58,7 +58,7 @@ withConfig =
$ desktopConfig -- on a default desktop config
{ manageHook = myManageHook <+> manageHook desktopConfig
, layoutHook = desktopLayoutModifiers layouts
, terminal = "/run/current-system/sw/bin/alacritty"
, terminal = "/run/current-system/sw/bin/st"
, normalBorderColor = S.base03
, focusedBorderColor = S.violet
, borderWidth = 5