This commit is contained in:
Tao Tien 2025-10-16 17:25:13 -07:00
parent 90d3fecdc7
commit 01abe6ae00
6 changed files with 36 additions and 11 deletions

View file

@ -73,4 +73,5 @@ def cpedit [file: path] {
mv $file $"($file).sym"; cp $"($file).sym" $file; chmod +w $file
}
alias core-job = job
alias job = job list

View file

@ -10,6 +10,13 @@ def ns [...packages: string] {
# }
def rebuild [subcommand, --builders: string] {
if (
df -h | detect columns --guess | where "Mounted on" == "/" or "Mounted on" == "/boot" | get Use% | each {parse "{usage}%" | get usage | into int} | flatten | all {$in < 99}
) {
print "not enough disk space!"
return false
}
mut builders = $builders;
if (open /etc/hostname --raw) == "NOlaptop\n" and ($builders != "") {
if (ping -c1 -W1 nocomputer | complete | $in.exit_code == 0) {

View file

@ -50,7 +50,7 @@ def "fans" [duty?: int] {
}
"NOlaptop" => {
match $duty {
null => { sudo ectool autofanctl }
null => { sudo ectool autofanctrl }
_ => { sudo ectool fanduty $duty }
}
}

View file

@ -78,5 +78,6 @@ alias ts = tailscale status
alias tu = tailscale up
alias td = tailscale down
alias ta = tailscale exit-node suggest
alias tt = tailscale switch --list | detect columns | input list -d Tailnet | get ID | t switch $in
alias wno = ssh root@whyfi "etherwake -i br-lan 04:42:1A:E7:62:C3"