From c0e6502b994c806842646321b767700814c72c75 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Wed, 10 Feb 2021 11:39:58 +0100 Subject: [PATCH] workspace focus --- tasks/workspaces.yaml | 2 +- templates/workspaces/workspace.focus.fish.j2 | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tasks/workspaces.yaml b/tasks/workspaces.yaml index d241ec9..efec6b9 100644 --- a/tasks/workspaces.yaml +++ b/tasks/workspaces.yaml @@ -17,7 +17,7 @@ src: workspaces/workspace.focus.fish.j2 dest: ~/.workspaces/{{workspace}}.focus mode: 0755 - with_items: "{{workspaces|dict2items|json_query(\"[?value.type=='vncviewer'].key\") }}" + with_items: "{{ workspaces }}" loop_control: loop_var: workspace diff --git a/templates/workspaces/workspace.focus.fish.j2 b/templates/workspaces/workspace.focus.fish.j2 index 4864de0..6cf9071 100644 --- a/templates/workspaces/workspace.focus.fish.j2 +++ b/templates/workspaces/workspace.focus.fish.j2 @@ -1,6 +1,11 @@ #!/usr/bin/fish {{ ansible_managed | comment }} + +{% if workspaces[workspace].type is defined %} +{% if workspaces[workspace].type == "vncviewer" %} i3-msg mode remote +{% endif %} +{% endif %} {% if workspaces[workspace].activity is defined %} {% if workspaces[workspace].activity %}