#!/bin/bash

if [ "$1" -eq "0" ]; then
	sed -i "/RADEON_POWER_PROFILE_ON_BAT/ cRADEON_POWER_PROFILE_ON_BAT=default" "$2"/.config/slimbookbattery/custom/ahorrodeenergia
	sed -i "/RADEON_DPM_STATE_ON_BAT/ cRADEON_DPM_STATE_ON_BAT=battery" "$2"/.config/slimbookbattery/custom/ahorrodeenergia
	sed -i "/RADEON_DPM_PERF_LEVEL_ON_BAT/ cRADEON_DPM_PERF_LEVEL_ON_BAT=auto" "$2"/.config/slimbookbattery/custom/ahorrodeenergia
elif [ "$1" -eq "1" ]; then
	sed -i "/RADEON_POWER_PROFILE_ON_BAT/ cRADEON_POWER_PROFILE_ON_BAT=low" "$2"/.config/slimbookbattery/custom/ahorrodeenergia
	sed -i "/RADEON_DPM_STATE_ON_BAT/ cRADEON_DPM_STATE_ON_BAT=battery" "$2"/.config/slimbookbattery/custom/ahorrodeenergia
	sed -i "/RADEON_DPM_PERF_LEVEL_ON_BAT/ cRADEON_DPM_PERF_LEVEL_ON_BAT=auto" "$2"/.config/slimbookbattery/custom/ahorrodeenergia
fi
