Moved checkmark to icons
This commit is contained in:
parent
47c62388e0
commit
2f62b7c446
7 changed files with 28 additions and 22 deletions
|
@ -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" |
|
||||
|
|
|
@ -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 |
|
||||
|
|
|
@ -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
|
||||
"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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" |
|
||||
|
|
|
@ -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)"
|
||||
|
|
|
@ -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
|
||||
"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue