diff --git a/dot_config/rofi/executable_pass.sh b/dot_config/rofi/executable_pass.sh deleted file mode 100644 index cda198d198cdd42b02864eed30008fe8b72d940c..0000000000000000000000000000000000000000 --- a/dot_config/rofi/executable_pass.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -secret-tool lookup name $(rofi -dmenu -password -p "󰟵 ") | xdotool type --delay 100 --file - && xdotool key enter diff --git a/dot_config/rofi/executable_pass.sh.tmpl b/dot_config/rofi/executable_pass.sh.tmpl new file mode 100644 index 0000000000000000000000000000000000000000..bba79c4c05485222a79e7378e2b16031aa3e5a3a --- /dev/null +++ b/dot_config/rofi/executable_pass.sh.tmpl @@ -0,0 +1,21 @@ +#!/bin/sh + +export BW_SESSION="{{ .bw_session }}" + +ENTRY=$(rofi -dmenu -password -p "󰟵 ") + +if [ -z "$ENTRY" ]; then + exit +fi + +echo "$ENTRY" + +PASSWD=$(bw get password "$ENTRY") + +if [ -z "$PASSWD" ]; then + notify-send "There was an error getting the password" + exit +fi + +xdotool type --delay 100 "$PASSWD" +xdotool key enter