Skip to content

Commit

Permalink
Cosmetic details
Browse files Browse the repository at this point in the history
  • Loading branch information
cizia64 committed Jun 4, 2024
1 parent 7e19b77 commit bc57ff1
Show file tree
Hide file tree
Showing 11 changed files with 145 additions and 69 deletions.
32 changes: 23 additions & 9 deletions Apps/SystemTools/Menu/USER INTERFACE##START TAB (value)/Tab App.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
PATH="/mnt/SDCARD/System/bin:$PATH"
LD_LIBRARY_PATH="/mnt/SDCARD/System/lib:/usr/trimui/lib:$LD_LIBRARY_PATH"

/mnt/SDCARD/System/bin/sdl2imgshow \
-i "/mnt/SDCARD/trimui/res/crossmix-os/bg-info.png" \
-f "/mnt/SDCARD/System/resources/DejaVuSans.ttf" \
-s 50 \
-c "220,220,220" \
-t "$(basename "$0" .sh) by default." &
silent=false
for arg in "$@"; do
if [ "$arg" = "-s" ]; then
silent=true
break
fi
done

if [ "$silent" = false ]; then
/mnt/SDCARD/System/bin/sdl2imgshow \
-i "/mnt/SDCARD/trimui/res/crossmix-os/bg-info.png" \
-f "/mnt/SDCARD/System/resources/DejaVuSans.ttf" \
-s 50 \
-c "220,220,220" \
-t "$(basename "$0" .sh) by default." &
fi

cat >/mnt/SDCARD/System/starts/start_tab.sh <<-EOM
cat > /tmp/state.json <<- EOM2
Expand All @@ -26,21 +36,25 @@ chmod a+x /mnt/SDCARD/System/starts/start_tab.sh

# Menu modification to reflect the change immediately

# update crossmix.json configuration file
script_name=$(basename "$0" .sh)

json_file="/mnt/SDCARD/System/etc/crossmix.json"
if [ ! -f "$json_file" ]; then
echo "{}" >"$json_file"
fi
/mnt/SDCARD/System/bin/jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"
jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"

# update database of "System Tools" database
database_file="/mnt/SDCARD/Apps/SystemTools/Menu/Menu_cache7.db"

sqlite3 "$database_file" "UPDATE Menu_roms SET disp = 'START TAB ($script_name)',pinyin = 'START TAB ($script_name)',cpinyin = 'START TAB ($script_name)',opinyin = 'START TAB ($script_name)' WHERE disp LIKE 'START TAB (%)';"
sqlite3 "$database_file" "UPDATE Menu_roms SET ppath = 'START TAB ($script_name)' WHERE ppath LIKE 'START TAB (%)';"
json_file="/tmp/state.json"

jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
# update the current position of MainUI
if [ "$silent" = false ]; then
jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
fi

sync
sleep 0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,27 @@ rm /mnt/SDCARD/System/starts/start_tab.sh

# Menu modification to reflect the change immediately

# update crossmix.json configuration file
script_name=$(basename "$0" .sh)

json_file="/mnt/SDCARD/System/etc/crossmix.json"
if [ ! -f "$json_file" ]; then
echo "{}" >"$json_file"
fi
/mnt/SDCARD/System/bin/jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"
jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"

# update database of "System Tools" database
database_file="/mnt/SDCARD/Apps/SystemTools/Menu/Menu_cache7.db"

sqlite3 "$database_file" "UPDATE Menu_roms SET disp = 'START TAB ($script_name)',pinyin = 'START TAB ($script_name)',cpinyin = 'START TAB ($script_name)',opinyin = 'START TAB ($script_name)' WHERE disp LIKE 'START TAB (%)';"
sqlite3 "$database_file" "UPDATE Menu_roms SET ppath = 'START TAB ($script_name)' WHERE ppath LIKE 'START TAB (%)';"
json_file="/tmp/state.json"

jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
# update the current position of MainUI
if [ "$silent" = false ]; then
jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
fi

sync
sleep 0.1
pkill -f sdl2imgshow

Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
PATH="/mnt/SDCARD/System/bin:$PATH"
LD_LIBRARY_PATH="/mnt/SDCARD/System/lib:/usr/trimui/lib:$LD_LIBRARY_PATH"

/mnt/SDCARD/System/bin/sdl2imgshow \
-i "/mnt/SDCARD/trimui/res/crossmix-os/bg-info.png" \
-f "/mnt/SDCARD/System/resources/DejaVuSans.ttf" \
-s 50 \
-c "220,220,220" \
-t "$(basename "$0" .sh) by default." &
silent=false
for arg in "$@"; do
if [ "$arg" = "-s" ]; then
silent=true
break
fi
done

if [ "$silent" = false ]; then
/mnt/SDCARD/System/bin/sdl2imgshow \
-i "/mnt/SDCARD/trimui/res/crossmix-os/bg-info.png" \
-f "/mnt/SDCARD/System/resources/DejaVuSans.ttf" \
-s 50 \
-c "220,220,220" \
-t "$(basename "$0" .sh) by default." &
fi

cat >/mnt/SDCARD/System/starts/start_tab.sh <<-EOM
cat > /tmp/state.json <<- EOM2
Expand All @@ -26,21 +36,25 @@ chmod a+x /mnt/SDCARD/System/starts/start_tab.sh

# Menu modification to reflect the change immediately

# update crossmix.json configuration file
script_name=$(basename "$0" .sh)

json_file="/mnt/SDCARD/System/etc/crossmix.json"
if [ ! -f "$json_file" ]; then
echo "{}" >"$json_file"
fi
/mnt/SDCARD/System/bin/jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"
jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"

# update database of "System Tools" database
database_file="/mnt/SDCARD/Apps/SystemTools/Menu/Menu_cache7.db"

sqlite3 "$database_file" "UPDATE Menu_roms SET disp = 'START TAB ($script_name)',pinyin = 'START TAB ($script_name)',cpinyin = 'START TAB ($script_name)',opinyin = 'START TAB ($script_name)' WHERE disp LIKE 'START TAB (%)';"
sqlite3 "$database_file" "UPDATE Menu_roms SET ppath = 'START TAB ($script_name)' WHERE ppath LIKE 'START TAB (%)';"
json_file="/tmp/state.json"

jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
# update the current position of MainUI
if [ "$silent" = false ]; then
jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
fi

sync
sleep 0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,25 @@ chmod a+x /mnt/SDCARD/System/starts/start_tab.sh

# Menu modification to reflect the change immediately

# update crossmix.json configuration file
script_name=$(basename "$0" .sh)

json_file="/mnt/SDCARD/System/etc/crossmix.json"
if [ ! -f "$json_file" ]; then
echo "{}" >"$json_file"
fi
/mnt/SDCARD/System/bin/jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"
jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"

# update database of "System Tools" database
database_file="/mnt/SDCARD/Apps/SystemTools/Menu/Menu_cache7.db"

sqlite3 "$database_file" "UPDATE Menu_roms SET disp = 'START TAB ($script_name)',pinyin = 'START TAB ($script_name)',cpinyin = 'START TAB ($script_name)',opinyin = 'START TAB ($script_name)' WHERE disp LIKE 'START TAB (%)';"
sqlite3 "$database_file" "UPDATE Menu_roms SET ppath = 'START TAB ($script_name)' WHERE ppath LIKE 'START TAB (%)';"
json_file="/tmp/state.json"

jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
# update the current position of MainUI
if [ "$silent" = false ]; then
jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
fi

sync
sleep 0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
PATH="/mnt/SDCARD/System/bin:$PATH"
LD_LIBRARY_PATH="/mnt/SDCARD/System/lib:/usr/trimui/lib:$LD_LIBRARY_PATH"

/mnt/SDCARD/System/bin/sdl2imgshow \
-i "/mnt/SDCARD/trimui/res/crossmix-os/bg-info.png" \
-f "/mnt/SDCARD/System/resources/DejaVuSans.ttf" \
-s 50 \
-c "220,220,220" \
-t "$(basename "$0" .sh) by default." &
silent=false
for arg in "$@"; do
if [ "$arg" = "-s" ]; then
silent=true
break
fi
done

if [ "$silent" = false ]; then
/mnt/SDCARD/System/bin/sdl2imgshow \
-i "/mnt/SDCARD/trimui/res/crossmix-os/bg-info.png" \
-f "/mnt/SDCARD/System/resources/DejaVuSans.ttf" \
-s 50 \
-c "220,220,220" \
-t "$(basename "$0" .sh) by default." &
fi

cat >/mnt/SDCARD/System/starts/start_tab.sh <<-EOM
cat > /tmp/state.json <<- EOM2
Expand All @@ -26,21 +36,25 @@ chmod a+x /mnt/SDCARD/System/starts/start_tab.sh

# Menu modification to reflect the change immediately

# update crossmix.json configuration file
script_name=$(basename "$0" .sh)

json_file="/mnt/SDCARD/System/etc/crossmix.json"
if [ ! -f "$json_file" ]; then
echo "{}" >"$json_file"
fi
/mnt/SDCARD/System/bin/jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"
jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"

# update database of "System Tools" database
database_file="/mnt/SDCARD/Apps/SystemTools/Menu/Menu_cache7.db"

sqlite3 "$database_file" "UPDATE Menu_roms SET disp = 'START TAB ($script_name)',pinyin = 'START TAB ($script_name)',cpinyin = 'START TAB ($script_name)',opinyin = 'START TAB ($script_name)' WHERE disp LIKE 'START TAB (%)';"
sqlite3 "$database_file" "UPDATE Menu_roms SET ppath = 'START TAB ($script_name)' WHERE ppath LIKE 'START TAB (%)';"
json_file="/tmp/state.json"

jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
# update the current position of MainUI
if [ "$silent" = false ]; then
jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
fi

sync
sleep 0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
PATH="/mnt/SDCARD/System/bin:$PATH"
LD_LIBRARY_PATH="/mnt/SDCARD/System/lib:/usr/trimui/lib:$LD_LIBRARY_PATH"

/mnt/SDCARD/System/bin/sdl2imgshow \
-i "/mnt/SDCARD/trimui/res/crossmix-os/bg-info.png" \
-f "/mnt/SDCARD/System/resources/DejaVuSans.ttf" \
-s 50 \
-c "220,220,220" \
-t "$(basename "$0" .sh) by default." &
silent=false
for arg in "$@"; do
if [ "$arg" = "-s" ]; then
silent=true
break
fi
done

if [ "$silent" = false ]; then
/mnt/SDCARD/System/bin/sdl2imgshow \
-i "/mnt/SDCARD/trimui/res/crossmix-os/bg-info.png" \
-f "/mnt/SDCARD/System/resources/DejaVuSans.ttf" \
-s 50 \
-c "220,220,220" \
-t "$(basename "$0" .sh) by default." &
fi

cat >/mnt/SDCARD/System/starts/start_tab.sh <<-EOM
cat > /tmp/state.json <<- EOM2
Expand All @@ -26,21 +36,25 @@ chmod a+x /mnt/SDCARD/System/starts/start_tab.sh

# Menu modification to reflect the change immediately

# update crossmix.json configuration file
script_name=$(basename "$0" .sh)

json_file="/mnt/SDCARD/System/etc/crossmix.json"
if [ ! -f "$json_file" ]; then
echo "{}" >"$json_file"
fi
/mnt/SDCARD/System/bin/jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"
jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"

# update database of "System Tools" database
database_file="/mnt/SDCARD/Apps/SystemTools/Menu/Menu_cache7.db"

sqlite3 "$database_file" "UPDATE Menu_roms SET disp = 'START TAB ($script_name)',pinyin = 'START TAB ($script_name)',cpinyin = 'START TAB ($script_name)',opinyin = 'START TAB ($script_name)' WHERE disp LIKE 'START TAB (%)';"
sqlite3 "$database_file" "UPDATE Menu_roms SET ppath = 'START TAB ($script_name)' WHERE ppath LIKE 'START TAB (%)';"
json_file="/tmp/state.json"

jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
# update the current position of MainUI
if [ "$silent" = false ]; then
jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
fi

sync
sleep 0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
PATH="/mnt/SDCARD/System/bin:$PATH"
LD_LIBRARY_PATH="/mnt/SDCARD/System/lib:/usr/trimui/lib:$LD_LIBRARY_PATH"

/mnt/SDCARD/System/bin/sdl2imgshow \
-i "/mnt/SDCARD/trimui/res/crossmix-os/bg-info.png" \
-f "/mnt/SDCARD/System/resources/DejaVuSans.ttf" \
-s 50 \
-c "220,220,220" \
-t "$(basename "$0" .sh) by default." &
silent=false
for arg in "$@"; do
if [ "$arg" = "-s" ]; then
silent=true
break
fi
done

if [ "$silent" = false ]; then
/mnt/SDCARD/System/bin/sdl2imgshow \
-i "/mnt/SDCARD/trimui/res/crossmix-os/bg-info.png" \
-f "/mnt/SDCARD/System/resources/DejaVuSans.ttf" \
-s 50 \
-c "220,220,220" \
-t "$(basename "$0" .sh) by default." &
fi

cat >/mnt/SDCARD/System/starts/start_tab.sh <<-EOM
cat > /tmp/state.json <<- EOM2
Expand All @@ -26,21 +36,25 @@ chmod a+x /mnt/SDCARD/System/starts/start_tab.sh

# Menu modification to reflect the change immediately

# update crossmix.json configuration file
script_name=$(basename "$0" .sh)

json_file="/mnt/SDCARD/System/etc/crossmix.json"
if [ ! -f "$json_file" ]; then
echo "{}" >"$json_file"
fi
/mnt/SDCARD/System/bin/jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"
jq --arg script_name "$script_name" '. += {"START TAB": $script_name}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"

# update database of "System Tools" database
database_file="/mnt/SDCARD/Apps/SystemTools/Menu/Menu_cache7.db"

sqlite3 "$database_file" "UPDATE Menu_roms SET disp = 'START TAB ($script_name)',pinyin = 'START TAB ($script_name)',cpinyin = 'START TAB ($script_name)',opinyin = 'START TAB ($script_name)' WHERE disp LIKE 'START TAB (%)';"
sqlite3 "$database_file" "UPDATE Menu_roms SET ppath = 'START TAB ($script_name)' WHERE ppath LIKE 'START TAB (%)';"
json_file="/tmp/state.json"

jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
# update the current position of MainUI
if [ "$silent" = false ]; then
jq --arg script_name "$script_name" '.list |= map(if (.ppath | index("START TAB ")) then .ppath = "START TAB (\($script_name))" else . end)' "$json_file" >"$json_file.tmp" && mv "$json_file.tmp" "$json_file"
fi

sync
sleep 0.1
Expand Down
Binary file modified Best/Free Games Collection/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Best/Free Games Collection/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Loading

0 comments on commit bc57ff1

Please sign in to comment.