Add powertop

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-09-30 12:53:24 +04:00
parent 41b417309d
commit 7386cd2f54
3 changed files with 28 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
SEARCH_STRINGS=(
"Mouse"
"Razer DeathAdder Elite"
)
for search_string in "${SEARCH_STRINGS[@]}"; do
echo "Searching for devices matching: ${search_string}"
for f in $(grep -l "${search_string}" /sys/bus/usb/devices/*/product 2>/dev/null | sed "s/product/power\\/control/"); do
echo "Setting power control to 'on' for: ${f}"
echo on >| "${f}"
done
done