···11-#!/bin/sh
22-33-cd "${PA_DIR:-$HOME/.local/share/pa}"
44-password_files="$(find * -type f | grep -v '/.git')"
55-password=$(printf '%s\n' "$password_files" | sed 's/.age//' | dmenu "$@")
66-77-pa show "$password" | head -n 1 |
88- xdotool type --clearmodifiers --file -
+3-1
bin/pa-rofi
···11#!/bin/sh
22+#
33+# prompt for a password, then type the selected password
2435cd "${PA_DIR:-$HOME/.local/share/pa}"
46password_files="$(find * -type f | grep -v '/.git')"
57password=$(printf '%s\n' "$password_files" | sed 's/.age//' | rofi -dmenu "$@")
6879pa show "$password" | head -n 1 |
88- xdotool type --clearmodifiers --file -
1010+ wtype -
+10-8
bin/prompt.go
···33import (
44 "fmt"
55 "os"
66- "os/exec"
66+ "os/exec"
77 "strings"
88)
99···1616 cwd = "~" + cwd[len(home):]
1717 }
18181919- out, err := exec.Command("git", "branch", "--show-current").Output()
2020- if err != nil {
2121- out = []byte("^(;,;)^\n")
2222- }
2323- branchname := strings.TrimSuffix(string(out), "\n")
1919+ out, err := exec.Command("git", "branch", "--show-current").Output()
2020+ if err != nil {
2121+ out = []byte("^(;,;)^\n")
2222+ }
2323+ branchname := strings.TrimSuffix(string(out), "\n")
24242525- fmt.Printf("\033[38;5;162m[%s]\033[0m ", host)
2525+ fmt.Printf("\033[92m[%s]\033[0m ", host)
26262727+ fmt.Printf("\033[94m")
2728 parts = strings.Split(cwd, "/")
2829 for i, part := range parts {
2930 if i == len(parts)-1 {
···3637 }
3738 }
3839 }
4040+ fmt.Printf("\033[0m")
39414040- fmt.Printf(" (%s)", branchname)
4242+ fmt.Printf(" (%s)", branchname)
4143}