[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
|
||||
# uses rofi if found, or dmenu if found, complains if no selector available
|
||||
# passes along any options given to main script
|
||||
rofi_opts=("$@")
|
||||
_rofi() {
|
||||
if type rofi 2>/dev/null; then
|
||||
echo "rofi found" 1>&2
|
||||
rofi -dmenu -no-auto-select -i "$@" -p "Entry"
|
||||
rofi -dmenu -no-auto-select -i "${rofi_opts[@]}" "$@" -p "Entry"
|
||||
elif type dmenu 2>/dev/null; then
|
||||
echo "dmenu found" 1>&2
|
||||
dmenu -i "$@" -p "Entry"
|
||||
dmenu -i "${rofi_opts[@]}" "$@" -p "Entry"
|
||||
else
|
||||
exist rofi critical "rofi-gopass" || exit 0
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue