diff options
| author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2026-11-04 01:55:22 +0300 |
|---|---|---|
| committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2026-11-04 01:55:22 +0300 |
| commit | 23d610cf95466c8baa0c4b1fd48f401f1b2cd260 (patch) | |
| tree | 033c8128e3e2490068a69b0206f9bf7e318ce6c6 /dotfiles/.local | |
| parent | 619bb249fb6bcb76ffc457eb3503504085921570 (diff) | |
| download | swayrice-23d610cf95466c8baa0c4b1fd48f401f1b2cd260.tar.gz swayrice-23d610cf95466c8baa0c4b1fd48f401f1b2cd260.zip | |
menupass: use dms instead of rofi
TODO: migrate other scripts, cleanup remove unused scripts
Diffstat (limited to 'dotfiles/.local')
| -rwxr-xr-x | dotfiles/.local/bin/menupass | 18 |
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" } |
