Moved checkmark to icons

master
Maarten van Gompel 4 years ago
parent 47c62388e0
commit 2f62b7c446
  1. 2
      scripts/appscripts/sxmo_rss.sh
  2. 8
      scripts/appscripts/sxmo_youtube.sh
  3. 8
      scripts/core/sxmo_appmenu.sh
  4. 6
      scripts/core/sxmo_common.sh
  5. 10
      scripts/core/sxmo_gpsutil.sh
  6. 4
      scripts/core/sxmo_networks.sh
  7. 12
      scripts/modem/sxmo_modemcall.sh

@ -60,7 +60,7 @@ rsstimespanmenu() {
1 day ago 1 day ago
2 day ago 2 day ago
1970-01-01 1970-01-01
Fetch $([ "$FETCHENABLED" = "1" ] && echo "enabled ✓" || echo "disabled (use cache)") Fetch $([ "$FETCHENABLED" = "1" ] && echo "enabled $icon_chk" || echo "disabled (use cache)")
" "
CHOICE="$( CHOICE="$(
echo "$CHOICES" | echo "$CHOICES" |

@ -27,10 +27,10 @@ searchmenu() {
ENTRY="$( ENTRY="$(
printf %b " printf %b "
Close Menu Close Menu
Show 1 Result $([ "$NRESULTS" = "1" ] && echo "") Show 1 Result $([ "$NRESULTS" = "1" ] && echo "$icon_chk")
Show 5 Results $([ "$NRESULTS" = "5" ] && echo "") Show 5 Results $([ "$NRESULTS" = "5" ] && echo "$icon_chk")
Show 10 Results $([ "$NRESULTS" = "10" ] && echo "") Show 10 Results $([ "$NRESULTS" = "10" ] && echo "$icon_chk")
Show 20 Results $([ "$NRESULTS" = "20" ] && echo "") Show 20 Results $([ "$NRESULTS" = "20" ] && echo "$icon_chk")
$HISTORY $HISTORY
" | " |
xargs -0 echo | xargs -0 echo |

@ -127,10 +127,10 @@ programchoicesinit() {
# Audio Out menu # Audio Out menu
CURRENTDEV="$(sxmo_audiocurrentdevice.sh)" CURRENTDEV="$(sxmo_audiocurrentdevice.sh)"
CHOICES=" CHOICES="
$icon_hdp Headphones $([ "$CURRENTDEV" = "Headphone" ] && echo "") ^ 1 ^ sxmo_audioout.sh Headphones $icon_hdp Headphones $([ "$CURRENTDEV" = "Headphone" ] && echo "$icon_chk") ^ 1 ^ sxmo_audioout.sh Headphones
$icon_spk Speaker $([ "$CURRENTDEV" = "Line Out" ] && echo "") ^ 1 ^ sxmo_audioout.sh Speaker $icon_spk Speaker $([ "$CURRENTDEV" = "Line Out" ] && echo "$icon_chk") ^ 1 ^ sxmo_audioout.sh Speaker
$icon_phn Earpiece $([ "$CURRENTDEV" = "Earpiece" ] && echo "") ^ 1 ^ sxmo_audioout.sh Earpiece $icon_phn Earpiece $([ "$CURRENTDEV" = "Earpiece" ] && echo "$icon_chk") ^ 1 ^ sxmo_audioout.sh Earpiece
$icon_mut None $([ "$CURRENTDEV" = "None" ] && echo "") ^ 1 ^ sxmo_audioout.sh None $icon_mut None $([ "$CURRENTDEV" = "None" ] && echo "$icon_chk") ^ 1 ^ sxmo_audioout.sh None
$icon_aru Volume up ^ 1 ^ sxmo_vol.sh up $icon_aru Volume up ^ 1 ^ sxmo_vol.sh up
$icon_ard Volume down ^ 1 ^ sxmo_vol.sh down $icon_ard Volume down ^ 1 ^ sxmo_vol.sh down
" "

@ -23,6 +23,7 @@ command -v "$KEYBOARD" > /dev/null || export KEYBOARD=svkbd-mobile-intl
# user's computer # user's computer
#aliases aren't expanded in bash #aliases aren't expanded in bash
# shellcheck disable=SC2039
command -v shopt > /dev/null && shopt -s expand_aliases command -v shopt > /dev/null && shopt -s expand_aliases
alias find="busybox find" alias find="busybox find"
@ -32,6 +33,9 @@ alias xargs="busybox xargs"
SXMO_COMMON_INCLUDED=1 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; [ "$SXMO_NO_ICONS" = "1" ] && return 0;
#this script is meant to be sourced #this script is meant to be sourced
@ -212,6 +216,8 @@ icon_snd="" #send
icon_phx="" #hangup icon_phx="" #hangup
# shellcheck disable=SC2034 # shellcheck disable=SC2034
icon_wn2="" icon_wn2=""
# shellcheck disable=SC2034
icon_chk=""
#allow the user to override icons #allow the user to override icons
if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/icons" ]; then if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/icons" ]; then

@ -214,11 +214,11 @@ menumaptype() {
CURRENTMAPTYPE="$(gsettings get org.foxtrotgps repo-name | tr -d "'")" CURRENTMAPTYPE="$(gsettings get org.foxtrotgps repo-name | tr -d "'")"
CHOICES=$(echo " CHOICES=$(echo "
Close Menu Close Menu
OSM $([ "$CURRENTMAPTYPE" = "OSM" ] && echo "") ^ OSM OSM $([ "$CURRENTMAPTYPE" = "OSM" ] && echo "$icon_chk") ^ OSM
OpenCycleMap $([ "$CURRENTMAPTYPE" = "OpenCycleMap" ] && echo "") ^ OpenCycleMap OpenCycleMap $([ "$CURRENTMAPTYPE" = "OpenCycleMap" ] && echo "$icon_chk") ^ OpenCycleMap
Google Maps $([ "$CURRENTMAPTYPE" = "Google Maps (testing only)" ] && echo "") ^ Google Maps (testing only) Google Maps $([ "$CURRENTMAPTYPE" = "Google Maps (testing only)" ] && echo "$icon_chk") ^ Google Maps (testing only)
Google Sat $([ "$CURRENTMAPTYPE" = "Google Sat (testing only)" ] && echo "") ^ Google Sat (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 "") ^ Maps-for-free.com Maps-for-free.com $([ "$CURRENTMAPTYPE" = "Maps-for-free.com" ] && echo "$icon_chk") ^ Maps-for-free.com
" | sed '/^[[:space:]]*$/d' | awk '{$1=$1};1') " | sed '/^[[:space:]]*$/d' | awk '{$1=$1};1')
CHOICE="$( CHOICE="$(
echo "$CHOICES" | echo "$CHOICES" |

@ -5,7 +5,7 @@
. "$(dirname "$0")/sxmo_common.sh" . "$(dirname "$0")/sxmo_common.sh"
connections() { 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)" INACTIVE="$(nmcli -c no -t c show | cut -d: -f1,3)"
printf %b "$ACTIVE\n$INACTIVE" | sort -u -t: -k1,1 printf %b "$ACTIVE\n$INACTIVE" | sort -u -t: -k1,1
} }
@ -13,7 +13,7 @@ connections() {
toggleconnection() { toggleconnection() {
CONNLINE="$1" CONNLINE="$1"
CONNNAME="$(echo "$CHOICE" | cut -d: -f1)" 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)" RES="$(nmcli c down "$CONNNAME" 2>&1)"
else else
RES="$(nmcli c up "$CONNNAME" 2>&1)" RES="$(nmcli c up "$CONNNAME" 2>&1)"

@ -177,12 +177,12 @@ incallmenuloop() {
$([ "$WINDOWIFIED" = 0 ] && echo "$icon_lck Screenlock ^ togglewindowify; sxmo_screenlock &") $([ "$WINDOWIFIED" = 0 ] && echo "$icon_lck Screenlock ^ togglewindowify; sxmo_screenlock &")
$icon_aru Volume up ^ sxmo_vol.sh up $icon_aru Volume up ^ sxmo_vol.sh up
$icon_ard Volume down ^ sxmo_vol.sh down $icon_ard Volume down ^ sxmo_vol.sh down
$icon_phn Earpiece $(echo -- "$FLAGS" | grep -q -- -e && echo ) ^ toggleflagset -e $icon_phn Earpiece $(echo -- "$FLAGS" | grep -q -- -e && echo "$icon_chk") ^ toggleflagset -e
$icon_mic Mic $(echo -- "$FLAGS" | grep -q -- -m && echo ) ^ toggleflagset -m $icon_mic Mic $(echo -- "$FLAGS" | grep -q -- -m && echo "$icon_chk") ^ toggleflagset -m
$icon_itm Linejack $(echo -- "$FLAGS" | grep -q -- -h && echo ) ^ toggleflagset -h $icon_itm Linejack $(echo -- "$FLAGS" | grep -q -- -h && echo "$icon_chk") ^ toggleflagset -h
$icon_itm Linemic $(echo -- "$FLAGS" | grep -q -- -l && echo ) ^ toggleflagset -l $icon_itm Linemic $(echo -- "$FLAGS" | grep -q -- -l && echo "$icon_chk") ^ toggleflagset -l
$icon_spk Speakerphone $(echo -- "$FLAGS" | grep -q -- -s && echo ) ^ toggleflagset -s $icon_spk Speakerphone $(echo -- "$FLAGS" | grep -q -- -s && echo "$icon_chk") ^ toggleflagset -s
$icon_itm Echomic $(echo -- "$FLAGS" | grep -q -- -z && echo ) ^ toggleflagset -z $icon_itm Echomic $(echo -- "$FLAGS" | grep -q -- -z && echo "$icon_chk") ^ toggleflagset -z
$icon_mus DTMF Tones ^ dtmfmenu $CALLID $icon_mus DTMF Tones ^ dtmfmenu $CALLID
$icon_phx Hangup ^ hangup $CALLID $icon_phx Hangup ^ hangup $CALLID
" "

Loading…
Cancel
Save