From 56936808d4ba71d834807c0df5034aa81fe14dea Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 26 Jun 2019 19:39:45 +0200 Subject: [PATCH] Use KeePassXC as the ssh-agent key provider --- shell/keychain.sh | 13 ++++--------- sway/config | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/shell/keychain.sh b/shell/keychain.sh index 30e836c..079f8f8 100755 --- a/shell/keychain.sh +++ b/shell/keychain.sh @@ -1,12 +1,7 @@ -#!/bin/sh - -# array to process, either folders or directories for recursive processing -KEYPATHS+=("$HOME/.ssh") +#!/usr/bin/env bash +# Assert an ssh-agent (which is empty at the beginning) if command -v keychain 2>&1 >/dev/null; then - eval \ - "$(find "${KEYPATHS[@]}" -type f -name '*.pub' 2>/dev/null \ - | sed 's/.pub$//' \ - | xargs keychain -q --nogui --agents ssh --timeout 600 --eval)" + eval $(keychain -q --nogui --agents ssh --timeout 600 --eval) fi -unset KEYPATHS + diff --git a/sway/config b/sway/config index cf4d69b..738af22 100644 --- a/sway/config +++ b/sway/config @@ -80,7 +80,7 @@ focus_follows_mouse no bindsym $mod+Tab workspace next bindsym Shift+$mod+Tab workspace prev -bindsym $mod+m exec eval $(keychain -q --nogui --agents ssh --timeout 600 --eval) && keepassxc +bindsym $mod+m exec . ~/.profile.d/90-keychain.sh && keepassxc bindsym $mod+e exec subl3 bindsym $mod+w exec firefox bindsym $mod+u exec feedreader