summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-12-25 14:43:13 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2015-12-25 14:43:13 +0000
commit21d47dd6d13ee7dd2feea5e55f781cf788022b61 (patch)
treecd8db30bfa98b8c88a6e45e3d4eae3ed8906ef85
parent5efa7f8b67ba0ac86346e0703b9034a2c75e486a (diff)
downloaddotfiles-21d47dd6d13ee7dd2feea5e55f781cf788022b61.tar
dotfiles-21d47dd6d13ee7dd2feea5e55f781cf788022b61.tar.gz
dotfiles-21d47dd6d13ee7dd2feea5e55f781cf788022b61.tar.bz2
dotfiles-21d47dd6d13ee7dd2feea5e55f781cf788022b61.tar.xz
dotfiles-21d47dd6d13ee7dd2feea5e55f781cf788022b61.zip
Fixed keychain
-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 ()