|
|
@ -18,7 +18,7 @@ newcontact() { |
|
|
|
name="$(echo | sxmo_dmenu_with_kb.sh -c -l 2 -p "$icon_usr Name")" |
|
|
|
name="$(echo | sxmo_dmenu_with_kb.sh -c -l 2 -p "$icon_usr Name")" |
|
|
|
number= |
|
|
|
number= |
|
|
|
while [ -z "$number" ]; do |
|
|
|
while [ -z "$number" ]; do |
|
|
|
number="$(echo | sxmo_dmenu_with_kb.sh -c -l 2 -p "$icon_phl Number")" |
|
|
|
number="$(sxmo_contacts.sh --unknown | sxmo_dmenu_with_kb.sh -c -l 10 -p "$icon_phl Number")" |
|
|
|
number="$(valid_number "$number")" |
|
|
|
number="$(valid_number "$number")" |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
@ -49,14 +49,14 @@ editcontactnumber() { |
|
|
|
oldnumber="$(echo "$1" | cut -d" " -f1)" |
|
|
|
oldnumber="$(echo "$1" | cut -d" " -f1)" |
|
|
|
oldname="$(echo "$1" | cut -d" " -f2)" |
|
|
|
oldname="$(echo "$1" | cut -d" " -f2)" |
|
|
|
|
|
|
|
|
|
|
|
ENTRIES="$(printf %b "Old number: $oldnumber")" |
|
|
|
ENTRIES="$(sxmo_contacts.sh --unknown | xargs -0 printf "%b (Old number)\n%b" "$oldnumber")" |
|
|
|
PICKED= # already used var name |
|
|
|
PICKED= # already used var name |
|
|
|
while [ -z "$PICKED" ]; do |
|
|
|
while [ -z "$PICKED" ]; do |
|
|
|
PICKED="$( |
|
|
|
PICKED="$( |
|
|
|
echo "$ENTRIES" | |
|
|
|
echo "$ENTRIES" | |
|
|
|
sxmo_dmenu_with_kb.sh -c -l 3 -p "$icon_edt Edit Contact" |
|
|
|
sxmo_dmenu_with_kb.sh -c -l 10 -p "$icon_edt Edit Contact" |
|
|
|
)" |
|
|
|
)" |
|
|
|
if echo "$PICKED" | grep -q "^Old number: "; then |
|
|
|
if echo "$PICKED" | grep -q "(Old number)$"; then |
|
|
|
editcontact "$1" |
|
|
|
editcontact "$1" |
|
|
|
return |
|
|
|
return |
|
|
|
fi |
|
|
|
fi |
|
|
|