This commit is contained in:
Tao Tien 2025-10-16 20:01:15 -07:00
parent 35d2762ab1
commit f6a221c385

View file

@ -39,13 +39,13 @@ def "snapper clear" [] {
snapper delete $"($first.number)-($last.number)"
}
let mode_path: path = (
glob "/sys/devices/platform/nct6775.656/hwmon/hwmon*/pwm2_enable" | get 0
)
def quiet [] {
match (hostname) {
"NOcomputer" => {sudo -- nu -c $"5 o> ($mode_path)"}
"NOcomputer" => {
const mode_path: path = "/sys/devices/platform/nct6775.656/hwmon/hwmon*/pwm2_enable"
sudo -- nu -c $"5 o> ($mode_path)"
}
"NOlaptop" => {
sudo ectool fanduty 42
}
@ -54,15 +54,25 @@ def quiet [] {
def loud [] {
match (hostname) {
"NOcomputer" => {sudo -- nu -c $"5 o> ($mode_path)"}
"NOlaptop" => {sudo ectool autofanctrl}
"NOcomputer" => {
const mode_path: path = "/sys/devices/platform/nct6775.656/hwmon/hwmon*/pwm2_enable"
sudo -- nu -c $"5 o> ($mode_path)"
}
"NOlaptop" => {
sudo ectool autofanctrl
}
}
}
def louder [] {
match (hostname) {
"NOcomputer" => {sudo -- nu -c $"0 o> ($mode_path)"}
"NOlaptop" => {sudo ectool fanduty 100}
"NOcomputer" => {
const mode_path: path = "/sys/devices/platform/nct6775.656/hwmon/hwmon*/pwm2_enable"
sudo -- nu -c $"0 o> ($mode_path)"
}
"NOlaptop" => {
sudo ectool fanduty 100
}
}
}