feat(user/zsh): use kdialog instead of yad

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-07-07 17:46:23 +02:00
parent 3c4950bcd0
commit 2c9fc903f4
Signed by: mfocko
SSH key fingerprint: SHA256:5YXD7WbPuK60gxnG6DjAwJiS9+swoWj33/HFu8g8JVo

View file

@ -69,7 +69,7 @@ eval "$(bw completion --shell zsh); compdef _bw bw;"
function bwu() { function bwu() {
local VAULT=$(basename $BITWARDENCLI_APPDATA_DIR) local VAULT=$(basename $BITWARDENCLI_APPDATA_DIR)
local PASS=$(yad --text "Master password for Bitwarden Vault @ $VAULT:" --center --button "yad-ok" --entry --hide-text) local PASS=$(kdialog --password "Master password for Bitwarden Vault @ $VAULT")
export BW_SESSION=$(bw unlock --raw "$PASS") export BW_SESSION=$(bw unlock --raw "$PASS")
} }
@ -104,7 +104,7 @@ function gen_passphrase() {
### HashiCorp Vault ### ### HashiCorp Vault ###
export VAULT_ADDR="https://hvault.mfocko.xyz" export VAULT_ADDR="https://hvault.mfocko.xyz"
function hcvu() { function hcvu() {
local PASS=$(yad --text "Password for HashiCorp Vault @ mfocko.xyz:" --center --button "yad-ok" --entry --hide-text) local PASS=$(kdialog --password "Password for HashiCorp Vault @ mfocko.xyz")
vault login -method=userpass -no-print username=$(whoami) password=$PASS vault login -method=userpass -no-print username=$(whoami) password=$PASS
} }