diff --git a/scripts/appscripts/sxmo_rss.sh b/scripts/appscripts/sxmo_rss.sh index 0e9b769..47d16c0 100755 --- a/scripts/appscripts/sxmo_rss.sh +++ b/scripts/appscripts/sxmo_rss.sh @@ -60,7 +60,7 @@ rsstimespanmenu() { 1 day ago 2 day ago 1970-01-01 - Fetch $([ "$FETCHENABLED" = "1" ] && echo "enabled ✓" || echo "disabled (use cache)") + Fetch $([ "$FETCHENABLED" = "1" ] && echo "enabled $icon_chk" || echo "disabled (use cache)") " CHOICE="$( echo "$CHOICES" | diff --git a/scripts/appscripts/sxmo_youtube.sh b/scripts/appscripts/sxmo_youtube.sh index e61eb8e..97da972 100755 --- a/scripts/appscripts/sxmo_youtube.sh +++ b/scripts/appscripts/sxmo_youtube.sh @@ -27,10 +27,10 @@ searchmenu() { ENTRY="$( printf %b " Close Menu - Show 1 Result $([ "$NRESULTS" = "1" ] && echo "✓") - Show 5 Results $([ "$NRESULTS" = "5" ] && echo "✓") - Show 10 Results $([ "$NRESULTS" = "10" ] && echo "✓") - Show 20 Results $([ "$NRESULTS" = "20" ] && echo "✓") + Show 1 Result $([ "$NRESULTS" = "1" ] && echo "$icon_chk") + Show 5 Results $([ "$NRESULTS" = "5" ] && echo "$icon_chk") + Show 10 Results $([ "$NRESULTS" = "10" ] && echo "$icon_chk") + Show 20 Results $([ "$NRESULTS" = "20" ] && echo "$icon_chk") $HISTORY " | xargs -0 echo | diff --git a/scripts/core/sxmo_appmenu.sh b/scripts/core/sxmo_appmenu.sh index 71ba415..79f10a9 100755 --- a/scripts/core/sxmo_appmenu.sh +++ b/scripts/core/sxmo_appmenu.sh @@ -127,10 +127,10 @@ programchoicesinit() { # Audio Out menu CURRENTDEV="$(sxmo_audiocurrentdevice.sh)" CHOICES=" - $icon_hdp Headphones $([ "$CURRENTDEV" = "Headphone" ] && echo "✓") ^ 1 ^ sxmo_audioout.sh Headphones - $icon_spk Speaker $([ "$CURRENTDEV" = "Line Out" ] && echo "✓") ^ 1 ^ sxmo_audioout.sh Speaker - $icon_phn Earpiece $([ "$CURRENTDEV" = "Earpiece" ] && echo "✓") ^ 1 ^ sxmo_audioout.sh Earpiece - $icon_mut None $([ "$CURRENTDEV" = "None" ] && echo "✓") ^ 1 ^ sxmo_audioout.sh None + $icon_hdp Headphones $([ "$CURRENTDEV" = "Headphone" ] && echo "$icon_chk") ^ 1 ^ sxmo_audioout.sh Headphones + $icon_spk Speaker $([ "$CURRENTDEV" = "Line Out" ] && echo "$icon_chk") ^ 1 ^ sxmo_audioout.sh Speaker + $icon_phn Earpiece $([ "$CURRENTDEV" = "Earpiece" ] && echo "$icon_chk") ^ 1 ^ sxmo_audioout.sh Earpiece + $icon_mut None $([ "$CURRENTDEV" = "None" ] && echo "$icon_chk") ^ 1 ^ sxmo_audioout.sh None $icon_aru Volume up ^ 1 ^ sxmo_vol.sh up $icon_ard Volume down ^ 1 ^ sxmo_vol.sh down " diff --git a/scripts/core/sxmo_common.sh b/scripts/core/sxmo_common.sh index a43a9f5..b683305 100644 --- a/scripts/core/sxmo_common.sh +++ b/scripts/core/sxmo_common.sh @@ -23,6 +23,7 @@ command -v "$KEYBOARD" > /dev/null || export KEYBOARD=svkbd-mobile-intl # user's computer #aliases aren't expanded in bash +# shellcheck disable=SC2039 command -v shopt > /dev/null && shopt -s expand_aliases alias find="busybox find" @@ -32,6 +33,9 @@ alias xargs="busybox xargs" SXMO_COMMON_INCLUDED=1 +# shellcheck disable=SC2034 +icon_chk="[x]" #we override this later if the user wants icons + [ "$SXMO_NO_ICONS" = "1" ] && return 0; #this script is meant to be sourced @@ -212,6 +216,8 @@ icon_snd="" #send icon_phx="" #hangup # shellcheck disable=SC2034 icon_wn2="" +# shellcheck disable=SC2034 +icon_chk="" #allow the user to override icons if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/icons" ]; then diff --git a/scripts/core/sxmo_gpsutil.sh b/scripts/core/sxmo_gpsutil.sh index 56350e9..f39a29f 100755 --- a/scripts/core/sxmo_gpsutil.sh +++ b/scripts/core/sxmo_gpsutil.sh @@ -214,11 +214,11 @@ menumaptype() { CURRENTMAPTYPE="$(gsettings get org.foxtrotgps repo-name | tr -d "'")" CHOICES=$(echo " Close Menu - OSM $([ "$CURRENTMAPTYPE" = "OSM" ] && echo "✓") ^ OSM - OpenCycleMap $([ "$CURRENTMAPTYPE" = "OpenCycleMap" ] && echo "✓") ^ OpenCycleMap - Google Maps $([ "$CURRENTMAPTYPE" = "Google Maps (testing only)" ] && echo "✓") ^ Google Maps (testing only) - Google Sat $([ "$CURRENTMAPTYPE" = "Google Sat (testing only)" ] && echo "✓") ^ Google Sat (testing only) - Maps-for-free.com $([ "$CURRENTMAPTYPE" = "Maps-for-free.com" ] && echo "✓") ^ Maps-for-free.com + OSM $([ "$CURRENTMAPTYPE" = "OSM" ] && echo "$icon_chk") ^ OSM + OpenCycleMap $([ "$CURRENTMAPTYPE" = "OpenCycleMap" ] && echo "$icon_chk") ^ OpenCycleMap + Google Maps $([ "$CURRENTMAPTYPE" = "Google Maps (testing only)" ] && echo "$icon_chk") ^ Google Maps (testing only) + Google Sat $([ "$CURRENTMAPTYPE" = "Google Sat (testing only)" ] && echo "$icon_chk") ^ Google Sat (testing only) + Maps-for-free.com $([ "$CURRENTMAPTYPE" = "Maps-for-free.com" ] && echo "$icon_chk") ^ Maps-for-free.com " | sed '/^[[:space:]]*$/d' | awk '{$1=$1};1') CHOICE="$( echo "$CHOICES" | diff --git a/scripts/core/sxmo_networks.sh b/scripts/core/sxmo_networks.sh index 144f76f..f60cc9f 100755 --- a/scripts/core/sxmo_networks.sh +++ b/scripts/core/sxmo_networks.sh @@ -5,7 +5,7 @@ . "$(dirname "$0")/sxmo_common.sh" connections() { - ACTIVE="$(nmcli -c no -t c show --active | cut -d: -f1,3 | sed 's/$/ ✓/')" + ACTIVE="$(nmcli -c no -t c show --active | cut -d: -f1,3 | sed "s/$/ $icon_chk/")" INACTIVE="$(nmcli -c no -t c show | cut -d: -f1,3)" printf %b "$ACTIVE\n$INACTIVE" | sort -u -t: -k1,1 } @@ -13,7 +13,7 @@ connections() { toggleconnection() { CONNLINE="$1" CONNNAME="$(echo "$CHOICE" | cut -d: -f1)" - if echo "$CONNLINE" | grep "✓"; then + if echo "$CONNLINE" | grep "$icon_chk"; then RES="$(nmcli c down "$CONNNAME" 2>&1)" else RES="$(nmcli c up "$CONNNAME" 2>&1)" diff --git a/scripts/modem/sxmo_modemcall.sh b/scripts/modem/sxmo_modemcall.sh index 41de0bd..49ef212 100755 --- a/scripts/modem/sxmo_modemcall.sh +++ b/scripts/modem/sxmo_modemcall.sh @@ -177,12 +177,12 @@ incallmenuloop() { $([ "$WINDOWIFIED" = 0 ] && echo "$icon_lck Screenlock ^ togglewindowify; sxmo_screenlock &") $icon_aru Volume up ^ sxmo_vol.sh up $icon_ard Volume down ^ sxmo_vol.sh down - $icon_phn Earpiece $(echo -- "$FLAGS" | grep -q -- -e && echo ✓) ^ toggleflagset -e - $icon_mic Mic $(echo -- "$FLAGS" | grep -q -- -m && echo ✓) ^ toggleflagset -m - $icon_itm Linejack $(echo -- "$FLAGS" | grep -q -- -h && echo ✓) ^ toggleflagset -h - $icon_itm Linemic $(echo -- "$FLAGS" | grep -q -- -l && echo ✓) ^ toggleflagset -l - $icon_spk Speakerphone $(echo -- "$FLAGS" | grep -q -- -s && echo ✓) ^ toggleflagset -s - $icon_itm Echomic $(echo -- "$FLAGS" | grep -q -- -z && echo ✓) ^ toggleflagset -z + $icon_phn Earpiece $(echo -- "$FLAGS" | grep -q -- -e && echo "$icon_chk") ^ toggleflagset -e + $icon_mic Mic $(echo -- "$FLAGS" | grep -q -- -m && echo "$icon_chk") ^ toggleflagset -m + $icon_itm Linejack $(echo -- "$FLAGS" | grep -q -- -h && echo "$icon_chk") ^ toggleflagset -h + $icon_itm Linemic $(echo -- "$FLAGS" | grep -q -- -l && echo "$icon_chk") ^ toggleflagset -l + $icon_spk Speakerphone $(echo -- "$FLAGS" | grep -q -- -s && echo "$icon_chk") ^ toggleflagset -s + $icon_itm Echomic $(echo -- "$FLAGS" | grep -q -- -z && echo "$icon_chk") ^ toggleflagset -z $icon_mus DTMF Tones ^ dtmfmenu $CALLID $icon_phx Hangup ^ hangup $CALLID "