feat(rofi): add rofi config and scripts
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
e9cb27e509
commit
48cd765ce9
4 changed files with 202 additions and 1 deletions
19
.local/bin/rofi-pass
Executable file
19
.local/bin/rofi-pass
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
get_accounts() {
|
||||
find ~/.password-store \
|
||||
| grep "$HOME/.password-store/"\
|
||||
| sed "s|$HOME/.password-store/||"\
|
||||
| grep "\gpg$" \
|
||||
| sed "s/\.gpg$//" \
|
||||
| grep ".*/" \
|
||||
| grep -v "^z/"
|
||||
}
|
||||
|
||||
main () {
|
||||
selected="$(get_accounts 2>/dev/null \
|
||||
| rofi -dmenu -p 'pass')"
|
||||
pass -c "$selected"
|
||||
}
|
||||
|
||||
main
|
Loading…
Add table
Add a link
Reference in a new issue