~mil/sxmo-utils

825fce515963c6586d37fb57c0d27fd24fabc657 — Zach DeCook a month ago a0b9131
Bluetooth Menu: Show device type icons

watch appears twice in this list because we're waiting on upstream bluez to merge the class detection for it

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2 files changed, 23 insertions(+), 3 deletions(-)

M configs/default_hooks/sxmo_hook_icons.sh
M scripts/core/sxmo_bluetoothmenu.sh
M configs/default_hooks/sxmo_hook_icons.sh => configs/default_hooks/sxmo_hook_icons.sh +6 -1
@@ 26,7 26,6 @@ icon_aru=""
icon_att=""
icon_bel=""
icon_bok=""
icon_btd="" # bluethooth device
icon_bth="" # bluetooth
icon_cal=""
icon_cam=""


@@ 36,12 35,14 @@ icon_chs="♜" #chess
icon_clc="" #calculator
icon_clk=""
icon_cls="" #close
icon_com="" # (Laptop) Computer (💻)
icon_cpy=""
icon_del="﫧" #delete
icon_dir="" #directory folder
icon_dof="" # dot off
icon_don="" # dot on
icon_dot="" # searching, connecting, etc.
icon_drw="" # Drawing tablet
icon_ear="" # earpiece
icon_edt="" #editor
icon_eml="" #email


@@ 54,6 55,7 @@ icon_fil="" #file
icon_fll="" #flashlight
icon_flt="" #filter/pipe
icon_fnd="" #search/find
icon_gam="" # gaming controller (🎮)
icon_glb="" #globe
icon_gps='' #gps
icon_grd=""


@@ 75,6 77,7 @@ icon_mmc=""
icon_mnu=""
icon_mod="" # modem
icon_mov=""
icon_mse="" # computer mouse (🖱️)
icon_msg="" #text
icon_mus=""
icon_mut="" #mute


@@ 89,6 92,7 @@ icon_phn="" #phone
icon_phx="" #hangup
icon_plk="" # phone locked
icon_pls=""
icon_prn="🖶" # printer (🖨️)
icon_prv="" #previous
icon_pst=""
icon_pwr="⏻" #power


@@ 123,6 127,7 @@ icon_wif=""
icon_wfo="睊" # wifi off
icon_wfh="" # wifi hotspot
icon_win="" #window
icon_wat="" # watch (⌚)
icon_wn2=""
icon_wrh=""
icon_wtr="" #weather

M scripts/core/sxmo_bluetoothmenu.sh => scripts/core/sxmo_bluetoothmenu.sh +17 -2
@@ 18,7 18,7 @@ _device_list() {
	bluetoothctl devices | \
		cut -d" " -f2 | \
		xargs -n1 bluetoothctl info | \
		awk -v "bluetooth_icon=$icon_btd" '
		awk '
			function print_cached_device() {
				print icon " " name " " mac
				name=icon=mac=""


@@ 27,7 27,22 @@ _device_list() {
			/Device/ && name { print_cached_device() }
			/Device/ { mac=$2 }
			/Name:/ { $1="";$0=$0;$1=$1; name=$0 }
			/Icon:/ { icon=bluetooth_icon }
			/Icon: computer/ { icon="'$icon_com'" }
			/Icon: phone/ { icon="'$icon_phn'" }
			/Icon: modem/ { icon="'$icon_mod'" }
			/Appearance: 0x00c2/ { icon="'$icon_wat'" }
			/Icon: watch/ { icon="'$icon_wat'" }
			/Icon: network-wireless/ { icon="'$icon_wif'" }
			/Icon: audio-headset/ { icon="'$icon_hdp'" }
			/Icon: audio-headphones/ { icon="'$icon_spk'" }
			/Icon: camera-video/ { icon="'$icon_vid'" }
			/Icon: audio-card/ { icon="'$icon_mus'" }
			/Icon: input-gaming/ { icon="'$icon_gam'" }
			/Icon: input-keyboard/ { icon="'$icon_kbd'" }
			/Icon: input-tablet/ { icon="'$icon_drw'" }
			/Icon: input-mouse/ { icon="'$icon_mse'" }
			/Icon: printer/ { icon="'$icon_prn'" }
			/Icon: camera-photo/ { icon="'$icon_cam'" }
			END { print_cached_device() }
		'
}