Add Gambatte GB/GBC emulator, Call/SMS anti-spam blocklist, and Lua/bc/dc/Yabasic

This commit is contained in:
Luxferre
2026-10-26 15:17:55 +02:00
parent b7f0dc08c9
commit 6db14be799
113 changed files with 20006 additions and 237 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
gambatte
+1
View File
@@ -0,0 +1 @@
lua5.5
+1
View File
@@ -0,0 +1 @@
luac5.5
+8 -1
View File
@@ -81,6 +81,11 @@ checkforfinishedcalls() {
sxmo_notify_user.sh "Call with $CONTACT terminated"
stderr "Finished call from $FINISHEDNUMBER"
printf %b "$TIME\tcall_finished\t$FINISHEDNUMBER\n" >> "$SXMO_LOGDIR/modemlog.tsv"
elif [ -f "$XDG_RUNTIME_DIR/sxmo_calls/${FINISHEDCALLID}.blockedcall" ]; then
STATE=muted
mkdir -p "$SXMO_BLOCKDIR"
stderr "Blocked call finished from $FINISHEDNUMBER"
printf %b "$TIME\tcall_blocked\t$FINISHEDNUMBER\n" >> "$SXMO_BLOCKDIR/modemlog.tsv"
elif [ -f "$XDG_RUNTIME_DIR/sxmo_calls/${FINISHEDCALLID}.mutedring" ]; then
STATE=muted
#this ring was muted up
@@ -153,6 +158,8 @@ checkforincomingcalls() {
TIME="$(date +%FT%H:%M:%S%z)"
if sxmo_hook_block_call.sh "$INCOMINGNUMBER" 2>/dev/null; then
stderr "BLOCKED call from number: $VOICECALLID"
mkdir -p "$SXMO_BLOCKDIR"
touch "$XDG_RUNTIME_DIR/sxmo_calls/${VOICECALLID}.blockedcall"
sxmo_modemcall.sh mute "$VOICECALLID"
printf %b "$TIME\tcall_ring\t$INCOMINGNUMBER\n" >> "$SXMO_BLOCKDIR/modemlog.tsv"
else
@@ -243,7 +250,7 @@ checkfornewtexts() {
TIME="$(printf %s "$TEXTDATA" | jq -r .sms.properties.timestamp)"
TIME="$(date +%FT%H:%M:%S%z -d "$TIME")"
if cut -f1 "$SXMO_BLOCKFILE" 2>/dev/null | grep -q "^$NUM$"; then
if sxmo_hook_block_call.sh "$NUM" 2>/dev/null; then
mkdir -p "$SXMO_BLOCKDIR/$NUM"
stderr "BLOCKED text from number: $NUM (TEXTID: $TEXTID)"
sxmo_hook_smslog.sh "recv" "$NUM" "$NUM" "$TIME" "$TEXT" >> "$SXMO_BLOCKDIR/$NUM/sms.txt"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,57 @@
#!/bin/sh
# configversion: 4408f29a464ab22d7c978fa0475cf80e
# This hook is executed to check if a call should be blocked
# If the hook return 0 the call will be blocked
# This hook is executed to check if a call or SMS should be blocked.
# If the hook returns 0 the call/SMS will be blocked.
INCOMINGNUMBER="$1"
BLOCKFILE="${SXMO_BLOCKFILE:-${XDG_CONFIG_HOME:-$HOME/.config}/sxmo/block.tsv}"
cut -f1 "$SXMO_BLOCKFILE" 2>/dev/null | grep -q "^$INCOMINGNUMBER$"
[ -z "$INCOMINGNUMBER" ] && exit 1
[ ! -f "$BLOCKFILE" ] && exit 1
norm_phone() {
printf '%s' "$1" | tr -cd '0-9+*#'
}
suffix_key() {
digits="$(printf '%s' "$1" | tr -cd '0-9')"
len="${#digits}"
if [ "$len" -ge 9 ]; then
printf '%s' "$digits" | tail -c 9
else
printf '%s' "$digits"
fi
}
IN_NORM="$(norm_phone "$INCOMINGNUMBER")"
[ -z "$IN_NORM" ] && exit 1
IN_SFX="$(suffix_key "$IN_NORM")"
while IFS="$(printf '\t')" read -r pat _rest || [ -n "$pat" ]; do
[ -z "$pat" ] && continue
PAT_NORM="$(norm_phone "$pat")"
[ -z "$PAT_NORM" ] && continue
if [ "$PAT_NORM" = "$IN_NORM" ]; then
exit 0
fi
case "$PAT_NORM" in
*\*)
PREFIX="${PAT_NORM%\*}"
if [ -n "$PREFIX" ]; then
case "$IN_NORM" in
"$PREFIX"*) exit 0 ;;
esac
fi
;;
esac
PAT_SFX="$(suffix_key "$PAT_NORM")"
if [ "${#IN_SFX}" -ge 7 ] && [ "$PAT_SFX" = "$IN_SFX" ]; then
exit 0
fi
done < "$BLOCKFILE"
exit 1
@@ -33,3 +33,4 @@ write_line_app() {
write_line_app snake "$icon_gam Snake" "snake"
write_line_app tetris "$icon_gam Tetris" "tetris"
write_line_app gambatte "$icon_gam Game Boy (Gambatte)" "gambatte"