bash – question for custom command in lxqt session

Im running lxqt session in noble. For checking the charging my PS5 controller

I made a custom command that shows me if bat of PS5 controlleris full through upower.

[customcommand]
alignment=Right
click=
command=upower -i /org/freedesktop/UPower/devices/battery_ps_controller_battery_14o3ao9ao34oc2o06 |grep percent|awk {'print $2'}
icon=
outputImage=false
repeatTimer=300
text=%1
type=customcommand

This is a little bit unflexible because I have more different controller to charge.

So I thought instead of command=upower -i /org/freedesktop/UPower/devices/ I put the path to a script in: command=/path/to/some-script

I could not find something during my search if it is possible.
Before I break my brain about the script it would be nice to know.

Read more here: Source link