diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-12-25 14:43:13 +0000 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-12-25 14:43:13 +0000 |
commit | 21d47dd6d13ee7dd2feea5e55f781cf788022b61 (patch) | |
tree | cd8db30bfa98b8c88a6e45e3d4eae3ed8906ef85 /.xmonad/xmonad.hs | |
parent | 5efa7f8b67ba0ac86346e0703b9034a2c75e486a (diff) | |
download | dotfiles-21d47dd6d13ee7dd2feea5e55f781cf788022b61.tar dotfiles-21d47dd6d13ee7dd2feea5e55f781cf788022b61.tar.gz dotfiles-21d47dd6d13ee7dd2feea5e55f781cf788022b61.tar.bz2 dotfiles-21d47dd6d13ee7dd2feea5e55f781cf788022b61.tar.xz dotfiles-21d47dd6d13ee7dd2feea5e55f781cf788022b61.zip |
Fixed keychain
Diffstat (limited to '.xmonad/xmonad.hs')
-rw-r--r-- | .xmonad/xmonad.hs | 9 |
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 | ||
196 | spawnKeychain = do | 196 | spawnKeychain = 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 | ||
202 | assimilateKeychain :: X () | 205 | assimilateKeychain :: X () |
203 | assimilateKeychain = liftIO $ assimilateKeychain' >> return () | 206 | assimilateKeychain = liftIO $ assimilateKeychain' >> return () |