diff --git a/roles/tmux/tasks/Darwin.yaml b/roles/tmux/tasks/Darwin.yaml index 6eabb95..4693bcb 100644 --- a/roles/tmux/tasks/Darwin.yaml +++ b/roles/tmux/tasks/Darwin.yaml @@ -7,3 +7,38 @@ - reattach-to-user-namespace - urlview state: latest + +- name: check terminal info description exists + command: /usr/bin/infocmp -x tmux-256color + changed_when: false + failed_when: false + register: terminfo_exists + +- name: download latest terminal info descriptions + when: terminfo_exists.rc == 1 + get_url: + url: https://invisible-island.net/datafiles/current/terminfo.src.gz + dest: ~/terminfo.src.gz + +- name: extract latest terminfo info descriptions + when: terminfo_exists.rc == 1 + command: /usr/bin/gunzip ~/terminfo.src.gz + +- name: compile terminal info + when: terminfo_exists.rc == 1 + command: /usr/bin/tic -xe tmux-256color ~/terminfo.src + +- name: cleanup downloaded terminal info descriptions + when: terminfo_exists.rc == 1 + file: + path: '{{item}}' + state: absent + with_items: + - ~/temrinfo.src.gz + - ~/terminfo.src + +- name: check terminal info description exists + when: terminfo_exists.rc == 1 + command: /usr/bin/infocmp -x tmux-256color + changed_when: false + register: terminfo_exists