tail
This commit is contained in:
parent
c4e40203e3
commit
391be9df43
2 changed files with 12 additions and 12 deletions
|
|
@ -13,7 +13,7 @@ def check-mullvad [] {
|
||||||
}
|
}
|
||||||
|
|
||||||
# switch to a specific exit node, or none
|
# switch to a specific exit node, or none
|
||||||
def tse [exit_node: string = ""] {
|
def te [exit_node: string = ""] {
|
||||||
if ($exit_node | is-empty) and (ps | find deluge | is-not-empty) {
|
if ($exit_node | is-empty) and (ps | find deluge | is-not-empty) {
|
||||||
print "stop summoning first!"
|
print "stop summoning first!"
|
||||||
return false
|
return false
|
||||||
|
|
@ -30,7 +30,7 @@ def tse [exit_node: string = ""] {
|
||||||
}
|
}
|
||||||
|
|
||||||
# list all mullvad exit nodes
|
# list all mullvad exit nodes
|
||||||
def tsx [] {
|
def tx [] {
|
||||||
tailscale exit-node list
|
tailscale exit-node list
|
||||||
| lines
|
| lines
|
||||||
| drop 4
|
| drop 4
|
||||||
|
|
@ -43,7 +43,7 @@ tailscale exit-node list
|
||||||
|
|
||||||
# sort mullvad exit nodes by fastest ping
|
# sort mullvad exit nodes by fastest ping
|
||||||
def tsp [] {
|
def tsp [] {
|
||||||
tsx
|
tx
|
||||||
| where COUNTRY == USA
|
| where COUNTRY == USA
|
||||||
| par-each {
|
| par-each {
|
||||||
insert ping {
|
insert ping {
|
||||||
|
|
@ -66,15 +66,15 @@ tsx
|
||||||
}
|
}
|
||||||
|
|
||||||
# switch to a random mullvad exit node
|
# switch to a random mullvad exit node
|
||||||
def tsr [] {
|
def tr [] {
|
||||||
tsx
|
tx
|
||||||
| get (random int 0..($in | length))
|
| get (random int 0..($in | length))
|
||||||
| tse $in.IP
|
| te $in.IP
|
||||||
| return $in
|
| return $in
|
||||||
}
|
}
|
||||||
|
|
||||||
alias ts = tailscale
|
alias t = tailscale
|
||||||
alias tss = tailscale status
|
alias ts = tailscale status
|
||||||
alias tsu = tailscale up
|
alias tu = tailscale up
|
||||||
alias tsd = tailscale down
|
alias td = tailscale down
|
||||||
alias tsa = tailscale exit-node suggest
|
alias ta = tailscale exit-node suggest
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ def "config stuff" [] {
|
||||||
hx ~/projects/NOflake/users/tao/nushell/stuff.nu
|
hx ~/projects/NOflake/users/tao/nushell/stuff.nu
|
||||||
}
|
}
|
||||||
def deluge-gtk [] {
|
def deluge-gtk [] {
|
||||||
tsr
|
tr
|
||||||
deluge-gtk
|
deluge-gtk
|
||||||
}
|
}
|
||||||
alias deluge = deluge-gtk
|
alias deluge = deluge-gtk
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue