From 23d610cf95466c8baa0c4b1fd48f401f1b2cd260 Mon Sep 17 00:00:00 2001 From: Yaroslav de la Peña Smirnov Date: Wed, 4 Nov 2026 01:55:22 +0300 Subject: menupass: use dms instead of rofi TODO: migrate other scripts, cleanup remove unused scripts --- dotfiles/.local/bin/menupass | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'dotfiles/.local/bin/menupass') 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" } -- cgit v1.3.1