Add a swaybar indicator for the touchpad status
This commit is contained in:
parent
539fcf48eb
commit
c203b4c140
1 changed files with 8 additions and 1 deletions
|
|
@ -1,5 +1,12 @@
|
|||
#! /usr/bin/sh
|
||||
|
||||
touchpad=$(swaymsg -t get_inputs | jq -r '[.[] | select(.type == "touchpad")][0] | .libinput.send_events')
|
||||
if [ "${touchpad}" = "enabled" ]; then
|
||||
touchpad_active="✅"
|
||||
else
|
||||
touchpad_active="❎"
|
||||
fi
|
||||
|
||||
today=$(date +'%Y-%m-%d')
|
||||
|
||||
now=$(date +'%H:%M:%S')
|
||||
|
|
@ -70,4 +77,4 @@ case "${battery_state}" in
|
|||
;;
|
||||
esac
|
||||
|
||||
echo 📆${today} ${clock_face}${now} ${audio_symbol}${audio_volume}% ${battery_symbol}${battery}%
|
||||
echo 🕹️${touchpad_active} 📆${today} ${clock_face}${now} ${audio_symbol}${audio_volume}% ${battery_symbol}${battery}%
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue