cleanup nu
This commit is contained in:
commit
5d3d1e0587
3 changed files with 50 additions and 68 deletions
|
|
@ -39,43 +39,26 @@ def "snapper clear" [] {
|
|||
snapper delete $"($first.number)-($last.number)"
|
||||
}
|
||||
|
||||
|
||||
def quiet [] {
|
||||
def "fans" [duty?: int] {
|
||||
match (hostname) {
|
||||
"NOcomputer" => {
|
||||
let mode_path: path = (glob "/sys/devices/platform/nct6775.656/hwmon/hwmon*/pwm2_enable" | get 0)
|
||||
sudo -- nu -c $"5 o> ($mode_path)"
|
||||
match $duty {
|
||||
100 => { sudo -- nu -c $"0 o> ($mode_path)" }
|
||||
_ => { sudo -- nu -c $"5 o> ($mode_path)" }
|
||||
}
|
||||
}
|
||||
"NOlaptop" => {
|
||||
sudo ectool fanduty 42
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def loud [] {
|
||||
match (hostname) {
|
||||
"NOcomputer" => {
|
||||
let mode_path: path = (glob "/sys/devices/platform/nct6775.656/hwmon/hwmon*/pwm2_enable" | get 0)
|
||||
sudo -- nu -c $"5 o> ($mode_path)"
|
||||
}
|
||||
"NOlaptop" => {
|
||||
sudo ectool autofanctrl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def louder [] {
|
||||
match (hostname) {
|
||||
"NOcomputer" => {
|
||||
let mode_path: path = (glob "/sys/devices/platform/nct6775.656/hwmon/hwmon*/pwm2_enable" | get 0)
|
||||
sudo -- nu -c $"0 o> ($mode_path)"
|
||||
}
|
||||
"NOlaptop" => {
|
||||
sudo ectool fanduty 100
|
||||
match $duty {
|
||||
null => { sudo ectool autofanctl }
|
||||
_ => { sudo ectool fanduty $duty }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
alias "fans max" = fans 100
|
||||
alias "fans quiet" = fans 42
|
||||
|
||||
def asciicam [] {
|
||||
$env.DISPLAY = null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue