aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local')
-rwxr-xr-xdotfiles/.local/bin/menupass18
1 files changed, 9 insertions, 9 deletions
diff --git a/dotfiles/.local/bin/menupass b/dotfiles/.local/bin/menupass
index 844ef33..76d1f18 100755
--- a/dotfiles/.local/bin/menupass
+++ b/dotfiles/.local/bin/menupass
@@ -5,7 +5,6 @@
shopt -s nullglob globstar
-notititle="🔑 Password store"
cleartime=30
lastpass_cache="$HOME/.cache/lastpass"
@@ -14,23 +13,24 @@ password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
+_notify() {
+ notify-send -a "Password store" -i dialog-password -e "$1"
+}
notify_pass() {
- notify-send \
- "$notititle" \
- "The password for $1 has been copied to the clipboard and will be cleared in 30 seconds"
+ _notify "The password for $1 has been copied to the clipboard and will be cleared in 30 seconds"
}
notify_spass() {
- notify-send "$notititle" "Password for $1: $2"
+ _notify "Password for $1: $2"
}
notify_nocache() {
- notify-send "$notititle" "No cache about previously selected login"
+ _notify "No cache about previously selected login"
}
show_menu() {
- password=$(printf '%s\n' "${password_files[@]}" | rofi -dmenu -p "$1")
+ password=$(printf '%s\n' "${password_files[@]}" | dms dmenu -p "$1")
[ -n "$password" ] || exit
}
@@ -42,14 +42,14 @@ copy_password() {
copy_login() {
thelogin=$(pass show "$1"| sed -n 2p)
wl-copy "$thelogin"
- notify-send "$notititle" "The login $thelogin has been copied to the clipboard"
+ _notify "The login $thelogin has been copied to the clipboard"
printf "%s" "$1" > $lastpass_cache
}
wait_and_clear() {
sleep $cleartime
wl-copy ""
- notify-send "🔑 Password store" "Clipboard has been cleared"
+ _notify "Clipboard has been cleared"
}