feat: touchpad script
This commit is contained in:
parent
a5f73b3795
commit
487dead221
1 changed files with 20 additions and 8 deletions
|
@ -1,9 +1,21 @@
|
|||
#!/bin/bash
|
||||
# xinput disable "Synaptics TM3145-005"
|
||||
value=$(xinput --list-props "Synaptics TM3145-005" | head -n 2 | tail -c 2)
|
||||
if [[ $value -eq 0 ]]
|
||||
then
|
||||
xinput enable "Synaptics TM3145-005"
|
||||
else
|
||||
xinput disable "Synaptics TM3145-005"
|
||||
fi
|
||||
|
||||
# Check the status of the Bluetooth
|
||||
bluetooth_status=$(bluetoothctl show | awk '/Powered/ {print $2}')
|
||||
connected_devices=$(bluetoothctl info | grep -iE 'Connected: yes')
|
||||
|
||||
# Set the icon based on Bluetooth status
|
||||
if [ "$bluetooth_status" == "yes" ] && [ ! -z "$connected_devices" ]; then
|
||||
# Bluetooth is on and connected to a device
|
||||
icon=" "
|
||||
elif [ "$bluetooth_status" == "yes" ]; then
|
||||
# Bluetooth is on but not connected to a device
|
||||
icon=""
|
||||
else
|
||||
# Bluetooth is off
|
||||
icon="❌"
|
||||
fi
|
||||
|
||||
# Print the icon
|
||||
echo "$icon"
|
||||
|
||||
|
|
Loading…
Reference in a new issue