[gopass] Add passing arguments to rofi
Can be used to style rofi-gopass or add additional keybindings or change functionality slightly in a relatively easy way.
This commit is contained in:
parent
6100215c72
commit
5733f928fa
1 changed files with 4 additions and 4 deletions
|
|
@ -4,13 +4,13 @@
|
||||||
|
|
||||||
# selector wrapper
|
# selector wrapper
|
||||||
# uses rofi if found, or dmenu if found, complains if no selector available
|
# uses rofi if found, or dmenu if found, complains if no selector available
|
||||||
|
# passes along any options given to main script
|
||||||
|
rofi_opts=("$@")
|
||||||
_rofi() {
|
_rofi() {
|
||||||
if type rofi 2>/dev/null; then
|
if type rofi 2>/dev/null; then
|
||||||
echo "rofi found" 1>&2
|
rofi -dmenu -no-auto-select -i "${rofi_opts[@]}" "$@" -p "Entry"
|
||||||
rofi -dmenu -no-auto-select -i "$@" -p "Entry"
|
|
||||||
elif type dmenu 2>/dev/null; then
|
elif type dmenu 2>/dev/null; then
|
||||||
echo "dmenu found" 1>&2
|
dmenu -i "${rofi_opts[@]}" "$@" -p "Entry"
|
||||||
dmenu -i "$@" -p "Entry"
|
|
||||||
else
|
else
|
||||||
exist rofi critical "rofi-gopass" || exit 0
|
exist rofi critical "rofi-gopass" || exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue