~xdavidwu/dotfiles

b94c2533988725f6f676ee9c2fe3f95381641f4b — xdavidwu 3 years ago eb4076a
bashrc: functions: use doas
1 files changed, 5 insertions(+), 5 deletions(-)

M .bashrc
M .bashrc => .bashrc +5 -5
@@ 99,19 99,19 @@ play-playlist() {
psave() {
	if [ "$1" = "perf" ];then
		echo powersave perfomance
		echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference >/dev/null
		echo performance | doas tee /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference >/dev/null
	elif [ "$1" = "off" ];then
		echo powersave off
		echo balance_performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference >/dev/null
		echo balance_performance | doas tee /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference >/dev/null
	else
		echo powersave on
		echo power | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference >/dev/null
		echo power | doas tee /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference >/dev/null
	fi
}

timesync() {
	sudo busybox ntpd -dqn -p time.stdtime.gov.tw
	sudo busybox hwclock -wu
	doas busybox ntpd -dqn -p time.stdtime.gov.tw
	doas busybox hwclock -wu
}

sleepto() {