more complete

This commit is contained in:
2024-01-13 13:01:54 +03:00
parent e5d888de1c
commit 833d3eeb43
37 changed files with 1696 additions and 6 deletions

View File

@@ -0,0 +1,4 @@
cargo install nu_plugin_clipboard
register ~/.cargo/bin/nu_plugin_clipboard
# DOESNT WORK

10
nushell/plugins/dns.nu Normal file
View File

@@ -0,0 +1,10 @@
# https://github.com/dead10ck/nu_plugin_dns
use ../tools/runonce.nu
runonce run 'nu_plugin_dns' {
^cargo install nu_plugin_dns
register ~/.cargo/bin/nu_plugin_dns
}

View File

@@ -0,0 +1,8 @@
# https://github.com/FMotalleb/nu_plugin_port_list
run_once 'nu_plugin_highlight' {
cargo install nu_plugin_highlight
register ~/.cargo/bin/nu_plugin_highlight
}

11
nushell/plugins/net.nu Normal file
View File

@@ -0,0 +1,11 @@
use ../tools/runonce.nu
runonce run 'nu_plugin_net' {
cargo install nu_plugin_net
register ~/.cargo/bin/nu_plugin_net
}
# https://docs.rs/crate/nu_plugin_net/1.3.0

View File

@@ -0,0 +1,32 @@
# https://github.com/FMotalleb/nu_plugin_desktop_notifications
cargo install nu_plugin_desktop_notifications
register ~/.cargo/bin/nu_plugin_desktop_notifications
notify -t "test notification body" --summary "test title"
# OTHER IMPLEMENTATION
def "notify_on_done" [
task: closure
] {
let start = date now
let result = do $task
let end = date now
let total = $end - $start | format duration sec
let body = $"given task finished in ($total)"
notify "task is done" $body
return $result
}
def notify [title message] {
# ^osascript -e 'display notification "' + $message + '" with title "' + $title + '"'
let msg = 'display notification "' + $message + '" with title "' + $title + '"'
$msg
^osascript -e $msg
}
notify_on_done { port scan 8.8.8.8 53 }

View File

@@ -0,0 +1,2 @@
# https://github.com/Trivernis/nu-plugin-dialog

View File

@@ -0,0 +1,10 @@
# https://github.com/FMotalleb/nu_plugin_port_list
run_once 'nu_plugin_port_list' {
cargo install nu_plugin_port_list
register ~/.cargo/bin/nu_plugin_port_list
}
port list -4 -t | where state == LISTEN | select [pid,local_port ] | sort-by local_port

View File

@@ -0,0 +1,8 @@
# https://github.com/FMotalleb/nu_plugin_port_scan
cargo install nu_plugin_port_scan
register ~/.cargo/bin/nu_plugin_port_scan
50..60 | par-each { |it| port scan 8.8.8.8 $it -t 100ms } | where is_open | collect { $in }

View File

@@ -0,0 +1,11 @@
use ../tools/runonce.nu
runonce run 'nu_plugin_query' {
cargo install nu_plugin_query
register ~/.cargo/bin/nu_plugin_query
}
# https://www.nushell.sh/commands/docs/query_web.html