Initial commit: console.fish
Signed-off-by: George Kaklamanos <gkaklas@gkaklas.gr>
This commit is contained in:
parent
3484d073ee
commit
9da267410a
1 changed files with 11 additions and 0 deletions
11
console.fish
Executable file
11
console.fish
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env nix
|
||||
#! nix --quiet --extra-experimental-features nix-command --extra-experimental-features flakes shell nixpkgs#fish nixpkgs#hcloud nixpkgs#jq nixpkgs#choose nixpkgs#urlencode nixpkgs#novnc nixpkgs#wl-clipboard --command fish
|
||||
|
||||
set console (hcloud server request-console $argv[1] -o json 2> /dev/null )
|
||||
set path (echo $console|jq --raw-output .wss_url|choose -f "cloud" 1|urlencode)
|
||||
set pass (echo $console|jq --raw-output .password)
|
||||
echo $pass|wl-copy
|
||||
echo "Password (copied): $pass"
|
||||
echo "Path (auto-filled): $path"
|
||||
xdg-open "http://localhost:6080/vnc.html?host=web-console.hetzner.cloud&port=443&path=$path" 2> /dev/null
|
||||
novnc 2> /dev/null > /dev/null
|
Loading…
Add table
Add a link
Reference in a new issue