06-09-2022, 04:47 AM
(06-08-2022, 08:25 PM)SwordfishII Wrote: echo -n 1500000 | sudo tee /sys/class/power_supply/axp20x-usb/input_current_limit
A side note, you can close force close kgx with "kill $PPID" at the end of the script.
Wish I could get around having to enter my password for the sudo part though
Check the NOPASSWD option in /etc/sudoers - you can use it to allow specific commands to be run without requiring the password. Something like:
Code:
your_user_name ALL=(ALL) NOPASSWD:/usr/bin/tee /sys/class/power_supply/axp20x-usb/input_current_limit,some_other_command_you_want