Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

27 lines
1.1KB

  1. #!/usr/bin/fish
  2. {{ ansible_managed | comment }}
  3. {% if workspaces[workspace].type == "tmux" %}
  4. exec urxvt -title tmux-workspace -e fish -c 'ssh -t {{workspaces[workspace].host}} tmux attach -d -t {{workspaces[workspace].session}}'
  5. {% elif "vncviewer" in workspaces[workspace].type %}
  6. {% if workspaces[workspace].fetch_vnc_passsword_file | default(false) %}
  7. if not test -d ~/.vnc/passwd.{{workspaces[workspace].host}}
  8. rsync {{workspaces[workspace].host}}:~/.vnc/passwd ~/.vnc/passwd.{{workspaces[workspace].host}}
  9. end
  10. {% endif %}
  11. {% if workspaces[workspace].type == "vncviewer-ssh-socket" %}
  12. socat "UNIX-LISTEN:.vnc/socket.{{workspaces[workspace].host}},reuseaddr" EXEC:'ssh {{workspaces[workspace].host}} socat STDIO UNIX-CONNECT\:.vnc/socket' &
  13. exec xtigervncviewer .vnc/socket.{{workspaces[workspace].host}}
  14. {% elif workspaces[workspace].type == "vncviewer-ssh-tcp" %}
  15. exec xtigervncviewer localhost:{{workspaces[workspace].display|default(home_vncserver_display_number)}} -via {{workspaces[workspace].host}} -PasswordFile ~/.vnc/passwd.{{workspaces[workspace].host}}
  16. {% endif %}
  17. {% endif %}