Add treefmt

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-02-16 18:53:11 +00:00
parent 22c82653dd
commit 2888bb8b72
70 changed files with 414 additions and 291 deletions

View File

@@ -1,3 +1,5 @@
# shellcheck shell=bash
SEARCH_STRINGS=(
"Mouse"
"Razer DeathAdder V3 HyperSpeed"
@@ -6,8 +8,9 @@ SEARCH_STRINGS=(
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"
grep -l "$search_string" /sys/bus/usb/devices/*/product 2>/dev/null | sed "s/product/power\\/control/" | while IFS= read -r device
do
echo "Setting power control to 'on' for: $device"
echo on >| "$device"
done
done