#!/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
-