|
@@ -1,12 +1,26 @@ |
|
|
#!/usr/bin/fish |
|
|
#!/usr/bin/fish |
|
|
{{ ansible_managed | comment }} |
|
|
{{ ansible_managed | comment }} |
|
|
|
|
|
|
|
|
{% if workspaces[workspace].type == "vncviewer" %} |
|
|
|
|
|
|
|
|
{% if workspaces[workspace].type == "tmux" %} |
|
|
|
|
|
|
|
|
xtigervncviewer localhost:{{workspaces[workspace].display|default(home_vncserver_display_number)}} -via {{workspaces[workspace].host}} -PasswordFile ~/.vnc/passwd.{{workspaces[workspace].host}} |
|
|
|
|
|
|
|
|
exec urxvt -title tmux-workspace -e fish -c 'ssh -t {{workspaces[workspace].host}} tmux attach -d -t {{workspaces[workspace].session}}' |
|
|
|
|
|
|
|
|
{% elif workspaces[workspace].type == "tmux" %} |
|
|
|
|
|
|
|
|
{% elif "vncviewer" in workspaces[workspace].type %} |
|
|
|
|
|
|
|
|
urxvt -title tmux-workspace -e fish -c 'ssh -t {{workspaces[workspace].host}} tmux attach -d -t {{workspaces[workspace].session}}' |
|
|
|
|
|
|
|
|
{% if workspaces[workspace].fetch_vnc_passsword_file | default(true) %} |
|
|
|
|
|
if not test -d ~/.vnc/passwd.{{workspaces[workspace].host}} |
|
|
|
|
|
rsync {{workspaces[workspace].host}}:~/.vnc/passwd ~/.vnc/passwd.{{workspaces[workspace].host}} |
|
|
|
|
|
end |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
{% if workspaces[workspace].type == "vncviewer-ssh-socket" %} |
|
|
|
|
|
|
|
|
|
|
|
socat "UNIX-LISTEN:.vnc/socket.anix,reuseaddr" EXEC:'ssh {{workspaces[workspace].host}} socat STDIO UNIX-CONNECT\:.vnc/socket' & |
|
|
|
|
|
exec xtigervncviewer .vnc/socket.{{workspaces[workspace].host}} -PasswordFile ~/.vnc/passwd.{{workspaces[workspace].host}} |
|
|
|
|
|
|
|
|
|
|
|
{% elif workspaces[workspace].type == "vncviewer-ssh-tcp" %} |
|
|
|
|
|
|
|
|
|
|
|
exec xtigervncviewer localhost:{{workspaces[workspace].display|default(home_vncserver_display_number)}} -via {{workspaces[workspace].host}} -PasswordFile ~/.vnc/passwd.{{workspaces[workspace].host}} |
|
|
|
|
|
|
|
|
|
|
|
{% endif %} |
|
|
{% endif %} |
|
|
{% endif %} |