dot_config/rofi/executable_pass.sh 🔗
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-secret-tool lookup name $(rofi -dmenu -password -p " ") | xdotool type --delay 100 --file - && xdotool key enter
Amolith created
dot_config/rofi/executable_pass.sh | 3 ---
dot_config/rofi/executable_pass.sh.tmpl | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+), 3 deletions(-)
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-secret-tool lookup name $(rofi -dmenu -password -p " ") | xdotool type --delay 100 --file - && xdotool key enter
@@ -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