respect custom rofi options
This commit is contained in:
parent
d2e6f2eda2
commit
6a3db43ff0
12
rofi-pass
12
rofi-pass
@ -134,7 +134,7 @@ generatePass () {
|
|||||||
elif [[ $symbols == "2 No" ]]; then symbols="-n";
|
elif [[ $symbols == "2 No" ]]; then symbols="-n";
|
||||||
fi
|
fi
|
||||||
HELP="<span color='$help_color'>Enter Number or hit Enter to use default length</span>"
|
HELP="<span color='$help_color'>Enter Number or hit Enter to use default length</span>"
|
||||||
length=$(echo -e "" | rofi -dmenu -mesg "${HELP}" -p "Password length? (Default: ${passlength}) > ")
|
length=$(echo -e "" | _rofi -dmenu -mesg "${HELP}" -p "Password length? (Default: ${passlength}) > ")
|
||||||
askGen
|
askGen
|
||||||
if [[ $length == "" ]]; then pass generate ${symbols} -i "$selected_password" "${passlength}" > /dev/null;
|
if [[ $length == "" ]]; then pass generate ${symbols} -i "$selected_password" "${passlength}" > /dev/null;
|
||||||
else pass generate ${symbols} -i "$selected_password" "${length}" > /dev/null;
|
else pass generate ${symbols} -i "$selected_password" "${length}" > /dev/null;
|
||||||
@ -144,7 +144,7 @@ generatePass () {
|
|||||||
# main Menu
|
# main Menu
|
||||||
mainMenu () {
|
mainMenu () {
|
||||||
unset selected_password
|
unset selected_password
|
||||||
help_text=$(echo -e "${autotype}: Autotype - ${action_menu}: Actions - ${show}: View\n${type_menu}: Type Field - ${copy_menu}: Copy Field - ${help}: Help" | column -s '-' -t)
|
help_text=$(echo -e "Enter: Autotype - ${action_menu}: Actions - ${show}: View\n${type_menu}: Type Field - ${copy_menu}: Copy Field - ${help}: Help" | column -s '-' -t)
|
||||||
line1=$(echo "${help_text}" | head -1)
|
line1=$(echo "${help_text}" | head -1)
|
||||||
line3=$(echo "${help_text}" | tail -1)
|
line3=$(echo "${help_text}" | tail -1)
|
||||||
HELP="<span color='$help_color'>${line1}
|
HELP="<span color='$help_color'>${line1}
|
||||||
@ -221,14 +221,14 @@ ${copy_url}: Copy URL
|
|||||||
${copy_menu}: Copy Custom Field
|
${copy_menu}: Copy Custom Field
|
||||||
---
|
---
|
||||||
${action_menu}: Edit, Move, Delete, Re-generate Submenu
|
${action_menu}: Edit, Move, Delete, Re-generate Submenu
|
||||||
${show}: Show Password File" | rofi -dmenu -p "Help > ")
|
${show}: Show Password File" | _rofi -dmenu -p "Help > ")
|
||||||
if [[ $help == "" ]]; then exit;
|
if [[ $help == "" ]]; then exit;
|
||||||
else unset helptext; mainMenu; fi
|
else unset helptext; mainMenu; fi
|
||||||
}
|
}
|
||||||
|
|
||||||
typeMenu () {
|
typeMenu () {
|
||||||
checkIfPass
|
checkIfPass
|
||||||
typefield=$(echo -e "< Return\n---\npassword\n$(pass ${selected_password} | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2)" | rofi -dmenu -p "Choose Field to type > ")
|
typefield=$(echo -e "< Return\n---\npassword\n$(pass ${selected_password} | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2)" | _rofi -dmenu -p "Choose Field to type > ")
|
||||||
if [[ $typefield == "" ]]; then exit;
|
if [[ $typefield == "" ]]; then exit;
|
||||||
elif [[ $typefield == "password" ]]; then typePass;
|
elif [[ $typefield == "password" ]]; then typePass;
|
||||||
elif [[ $typefield == "< Return" ]]; then mainMenu;
|
elif [[ $typefield == "< Return" ]]; then mainMenu;
|
||||||
@ -238,7 +238,7 @@ typeMenu () {
|
|||||||
|
|
||||||
copyMenu () {
|
copyMenu () {
|
||||||
checkIfPass
|
checkIfPass
|
||||||
copyfield=$(echo -e "< Return\n---\npassword\n$(pass ${selected_password} | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2)" | rofi -dmenu -p "Choose Field to type > ")
|
copyfield=$(echo -e "< Return\n---\npassword\n$(pass ${selected_password} | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2)" | _rofi -dmenu -p "Choose Field to type > ")
|
||||||
if [[ $copyfield == "" ]]; then exit;
|
if [[ $copyfield == "" ]]; then exit;
|
||||||
elif [[ $copyfield == "password" ]]; then copyPass;
|
elif [[ $copyfield == "password" ]]; then copyPass;
|
||||||
elif [[ $copyfield == "< Return" ]]; then mainMenu;
|
elif [[ $copyfield == "< Return" ]]; then mainMenu;
|
||||||
@ -248,7 +248,7 @@ copyMenu () {
|
|||||||
|
|
||||||
actionMenu () {
|
actionMenu () {
|
||||||
checkIfPass
|
checkIfPass
|
||||||
action=$(echo -e "< Return\n---\n1 Move Password File\n2 Delete Password File\\n3 Edit Password File\n4 Generate New Password" | rofi -dmenu -p "Choose Action > ")
|
action=$(echo -e "< Return\n---\n1 Move Password File\n2 Delete Password File\\n3 Edit Password File\n4 Generate New Password" | _rofi -dmenu -p "Choose Action > ")
|
||||||
if [[ ${action} == "1 Move Password File" ]]; then manageEntry move;
|
if [[ ${action} == "1 Move Password File" ]]; then manageEntry move;
|
||||||
elif [[ ${action} == "2 Delete Password File" ]]; then manageEntry delete;
|
elif [[ ${action} == "2 Delete Password File" ]]; then manageEntry delete;
|
||||||
elif [[ ${action} == "3 Edit Password File" ]]; then manageEntry edit;
|
elif [[ ${action} == "3 Edit Password File" ]]; then manageEntry edit;
|
||||||
|
Loading…
Reference in New Issue
Block a user