configuration form the arch linux stored

This commit is contained in:
filipriec
2025-09-22 08:27:51 +02:00
commit 3e6d1a0d61
166 changed files with 807076 additions and 0 deletions

36
scripts/lichess_perf.sh Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
# Function to revert settings
cleanup() {
# Revert CPU governor to default
sudo cpupower frequency-set -g schedutil >/dev/null 2>&1
# Reset Firefox priorities
for pid in $(pgrep -f "firefox.*lichess-perf"); do
renice -n 0 -p $pid >/dev/null 2>&1
ionice -c 2 -n 7 -p $pid >/dev/null 2>&1
done
exit 0
}
# Trap signals to ensure cleanup
trap cleanup SIGINT SIGTERM EXIT
# Activate performance mode for CPU
sudo cpupower frequency-set -g performance >/dev/null 2>&1
# Launch Firefox with dedicated profile
firefox -P lichess-perf &
# Wait for Firefox to start
sleep 5
# Apply maximum priority to Firefox processes
for pid in $(pgrep -f "firefox.*lichess-perf"); do
renice -n -20 -p $pid >/dev/null 2>&1
ionice -c 1 -n 0 -p $pid >/dev/null 2>&1
done
# Wait until Firefox window closes
while pgrep -f "firefox.*lichess-perf" >/dev/null; do
sleep 5
done