home
/
code
/
khatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fd50dae
)
Update bluetooth censor and test drive
author
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 2 Nov 2020 09:21:39 +0000
(
04:21
-0500)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 2 Nov 2020 09:21:39 +0000
(
04:21
-0500)
x2/sanity_check
patch
|
blob
|
blame
|
history
x2/src/bash/exe/khatus_sensor_bluetooth.sh
patch
|
blob
|
blame
|
history
x2/src/bash/exe/khatus_sensor_bluetooth_power.sh
patch
|
blob
|
blame
|
history
diff --git
a/x2/sanity_check
b/x2/sanity_check
index
97b8b82
..
dec9325
100755
(executable)
--- a/
x2/sanity_check
+++ b/
x2/sanity_check
@@
-15,6
+15,10
@@
# - USB CableCreation : enxa0cec8c818ab
# - USB StarTech : enx00133b9c9bdb
# - USB CableCreation : enxa0cec8c818ab
# - USB StarTech : enx00133b9c9bdb
+# disk io devices
+#----------------
+# - Dell XPS 13 : nvme0n1
+
ETH='enx00133b9c9bdb'
WIFI='wlp0s20f3'
ETH='enx00133b9c9bdb'
WIFI='wlp0s20f3'
@@
-22,6
+26,7
@@
WIFI='wlp0s20f3'
--dir_bin ./bin \
--wifi_interface "$WIFI" \
--screen_brightness_device_name intel_backlight \
--dir_bin ./bin \
--wifi_interface "$WIFI" \
--screen_brightness_device_name intel_backlight \
+ --disk_io_device nvme0n1 \
| stdbuf -o L tee \
>(stdbuf -o L ./bin/khatus_bar \
-v Opt_Mpd_Song_Max_Chars=10 \
| stdbuf -o L tee \
>(stdbuf -o L ./bin/khatus_bar \
-v Opt_Mpd_Song_Max_Chars=10 \
diff --git
a/x2/src/bash/exe/khatus_sensor_bluetooth.sh
b/x2/src/bash/exe/khatus_sensor_bluetooth.sh
index
4e696c8
..
af84abd
100644
(file)
--- a/
x2/src/bash/exe/khatus_sensor_bluetooth.sh
+++ b/
x2/src/bash/exe/khatus_sensor_bluetooth.sh
@@
-7,13
+7,14
@@
FS1='|' # Fields separator, level 1 (a record's fields)
FS2=':' # Fields separator, level 2 (a field's subfields)
count_powered_controllers() {
FS2=':' # Fields separator, level 2 (a field's subfields)
count_powered_controllers() {
-
bluetoothctl -- show
| grep -c 'Powered: yes'
+
echo show | bluetoothctl
| grep -c 'Powered: yes'
}
count_connected_devices() {
}
count_connected_devices() {
- bluetoothctl -- paired-devices \
- | awk '{print $2}' \
- | xargs -I % bluetoothctl -- info % \
+ echo paired-devices \
+ | bluetoothctl \
+ | awk '/^Device +[0-9a-zA-Z][0-9a-zA-Z]:/ {print $2}' \
+ | xargs -I % sh -c 'echo info % | bluetoothctl' \
| grep -c 'Connected: yes'
}
| grep -c 'Connected: yes'
}
diff --git
a/x2/src/bash/exe/khatus_sensor_bluetooth_power.sh
b/x2/src/bash/exe/khatus_sensor_bluetooth_power.sh
index
83c3dbb
..
3b6c5d9
100644
(file)
--- a/
x2/src/bash/exe/khatus_sensor_bluetooth_power.sh
+++ b/
x2/src/bash/exe/khatus_sensor_bluetooth_power.sh
@@
-4,4
+4,4
@@
set -e
dir_bin="$1"
dir_bin="$1"
-
bluetoothctl -- show
| "$dir_bin"/khatus_parse_bluetoothctl_show
+
echo show | bluetoothctl
| "$dir_bin"/khatus_parse_bluetoothctl_show
This page took
0.024355 seconds
and
4
git commands to generate.