]> Freerunner's - dotfiles.git/commitdiff
aerc: use kwallet on plasma
authorAndre Ramnitz <tux.rising@gmail.com>
Thu, 4 Jul 2024 19:01:09 +0000 (21:01 +0200)
committerAndre Ramnitz <tux.rising@gmail.com>
Sun, 18 Aug 2024 19:05:38 +0000 (21:05 +0200)
config/aerc/scripts/wait-for-creds.sh

index 834c67e4319bc3efef8601813b69ba7d7c9a0228..9221635446f5fe22c74a7ab68e48e76e3333579b 100755 (executable)
@@ -1,14 +1,16 @@
 #!/bin/sh
 
-if [ ! "$(pidof keepassxc)" ]; then
-    echo "KeepassXC not running";
-    exit 1
+if [ "$(pgrep kwin)" ]; then
+    kwallet-query -r "$2" kdewallet
+else
+    # if [ ! "$(pidof keepassxc)" ]; then
+    #     echo "KeepassXC not running";
+    #     exit 1
+    # fi
+    secret-tool lookup "$1" "$2"
+    # wait until the password is available
+    while [ $? != 0 ]; do
+       secret-tool lookup "$1" "$2"
+       sleep 5
+    done
 fi
-
-secret-tool lookup "$1" "$2"
-# wait until the password is available
-while [ $? != 0 ]; do
-       secret-tool lookup "$1" "$2"
-       sleep 5
-done
-