summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.xmonad/xmonad.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs
index 9bd67b2..8a55674 100644
--- a/.xmonad/xmonad.hs
+++ b/.xmonad/xmonad.hs
@@ -195,9 +195,12 @@ autostart = [ spawnOnce "urxvtd -o"
195 195
196spawnKeychain = do 196spawnKeychain = do
197 home <- liftIO getHomeDirectory 197 home <- liftIO getHomeDirectory
198 let keys = map ((home </>) . ("/.ssh/id_" ++)) ["ed25519", "ecdsa", "rsa"] 198 let keys = map ((home </>) . (".ssh/id_" ++)) ["ed25519", "ecdsa", "rsa"]
199 keys' <- filterM (liftIO . doesFileExist) keys 199 liftIO (maybe (return ()) (setEnv "SSH_ASKPASS") =<< findAskpass)
200 safeSpawn "urxvtc" $ ["-title", "keysetup", "-e", "keychain"] ++ keys' 200 safeSpawn "keychain" =<< liftIO (filterM doesFileExist keys)
201 where
202 findAskpass = filter `liftM` readFile "/etc/zshrc"
203 filter = listToMaybe . catMaybes . map (stripPrefix "export SSH_ASKPASS=") . lines
201 204
202assimilateKeychain :: X () 205assimilateKeychain :: X ()
203assimilateKeychain = liftIO $ assimilateKeychain' >> return () 206assimilateKeychain = liftIO $ assimilateKeychain' >> return ()