This menu allow the user to - call - text - save The tel number.master
parent
87d86b7cf0
commit
af856d5bfa
5 changed files with 72 additions and 2 deletions
@ -0,0 +1,6 @@ |
||||
[Desktop Entry] |
||||
Name=Sxmo Phone Menu |
||||
Exec=sxmo_phonemenu.sh |
||||
Terminal=false |
||||
Type=Application |
||||
MimeType=x-scheme-handler/tel |
@ -0,0 +1,25 @@ |
||||
{ |
||||
"defaultHandlersVersion": { |
||||
"en-US": 4 |
||||
}, |
||||
"mimeTypes": { |
||||
"application/pdf": { |
||||
"action": 3, |
||||
"extensions": [ |
||||
"pdf" |
||||
] |
||||
} |
||||
}, |
||||
"schemes": { |
||||
"tel": { |
||||
"action": 2, |
||||
"ask": false, |
||||
"handlers": [ |
||||
{ |
||||
"name": "sxmo", |
||||
"path": "/usr/bin/sxmo_open.sh" |
||||
} |
||||
] |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,27 @@ |
||||
#!/usr/bin/env sh |
||||
|
||||
# shellcheck source=scripts/core/sxmo_common.sh |
||||
. "$(dirname "$0")/sxmo_common.sh" |
||||
|
||||
set -e |
||||
|
||||
number="$(printf "%s" "$1" | sed -e "s/^tel://")" |
||||
|
||||
number="$(sxmo_validnumber.sh "$number")" |
||||
|
||||
result="$(printf "%s Call %s\n%s Text %s\n%s Save %s\n%s Close Menu\n" \ |
||||
"$icon_phn" "$number" "$icon_msg" "$number" "$icon_sav" "$number" \ |
||||
"$icon_cls" \ |
||||
| sxmo_dmenu.sh -p "Action")" |
||||
|
||||
case "$result" in |
||||
*Call*) |
||||
sxmo_modemdial.sh "$number" |
||||
;; |
||||
*Text*) |
||||
sxmo_textmenu.sh "$number" |
||||
;; |
||||
*Save*) |
||||
sxmo_contactmenu.sh newcontact "$number" |
||||
;; |
||||
esac |
Loading…
Reference in new issue