Change order of items in the status bar, additionally, add bluetooth device
This commit is contained in:
parent
ecdbcad9d0
commit
de34f66995
1 changed files with 13 additions and 1 deletions
|
|
@ -27,8 +27,20 @@ while true; do
|
|||
brightness=$(brightnessctl | grep -oP '[0-9]+(?=%)')
|
||||
brightness_status="Brightness: $brightness%"
|
||||
|
||||
bluetooth_device=$(bluetoothctl devices Connected | awk '{$1=$2=""; print $0}' | sed 's/^ *//g')
|
||||
if [ -z "$bluetooth_device" ]; then
|
||||
bluetooth_status=""
|
||||
else
|
||||
bluetooth_status="Bluetooth: $bluetooth_device"
|
||||
fi
|
||||
|
||||
# Combine all statuses
|
||||
echo "$battery | $network_status | $brightness_status | $date_time "
|
||||
final_status=""
|
||||
if [ -n "$bluetooth_status" ]; then
|
||||
final_status="$bluetooth_status | "
|
||||
fi
|
||||
final_status="$final_status$brightness_status | $battery | $network_status | $date_time "
|
||||
echo "$final_status"
|
||||
|
||||
sleep 1
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue