From: Ismaƫl Bouya Date: Sun, 11 Nov 2018 16:08:37 +0000 (+0100) Subject: Add zeal docsets X-Git-Tag: v1.0~25 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=2f756cbbc66ec03fdc0ca9eaeafd2fb5620f431c;p=perso%2FImmae%2FConfig%2FAnsible.git Add zeal docsets --- diff --git a/roles/contexts/fretlink/defaults/main.yml b/roles/contexts/fretlink/defaults/main.yml new file mode 100644 index 0000000..ee9836f --- /dev/null +++ b/roles/contexts/fretlink/defaults/main.yml @@ -0,0 +1,15 @@ +--- +zeal_roles: + - Ansible + - Bash + - Docker + - Haskell + - MongoDB + - NodeJS + - PostgreSQL + - Puppet + - React + - Redis + - Rust + - Vim + - XSLT diff --git a/roles/contexts/fretlink/tasks/main.yml b/roles/contexts/fretlink/tasks/main.yml index 07861ed..78f733a 100644 --- a/roles/contexts/fretlink/tasks/main.yml +++ b/roles/contexts/fretlink/tasks/main.yml @@ -28,6 +28,25 @@ - [ "docsets", "path", "{{ lookup('env', 'XDG_DATA_HOME') }}/Zeal/Zeal/docsets" ] - [ "search", "fuzzy_search_enabled", "false" ] - [ "tabs", "open_new_tab_after_active", "false" ] +- name: Zeal docsets + block: + - name: Check missing Zeal docsets + register: zeal_missing_docsets + shell: "for i in {{ zeal_roles | join(' ') }}; do [ -d $XDG_DATA_HOME/Zeal/Zeal/docsets/$i.docset ] || echo $i; done" + changed_when: zeal_missing_docsets.stdout != "" + check_mode: no + - name: Ask for Zeal docsets + when: zeal_missing_docsets.stdout != "" + pause: + prompt: "install Zeal docsets ? [y/N]" + register: zeal_install_docsets + check_mode: no + - name: Zeal docsets + when: zeal_missing_docsets.stdout != "" and zeal_install_docsets.user_input.startswith("y") + shell: "dasht-docsets-install {{ item }}" + args: + creates: "$XDG_DATA_HOME/Zeal/Zeal/docsets/{{ item }}.docset" + loop: "{{ zeal_missing_docsets.stdout.split('\n') }}" - name: Create pm2 config dir file: path: $XDG_CONFIG_HOME/pm2 diff --git a/roles/init/templates/pam_environment.j2 b/roles/init/templates/pam_environment.j2 index fc65a10..3b8e96e 100644 --- a/roles/init/templates/pam_environment.j2 +++ b/roles/init/templates/pam_environment.j2 @@ -65,6 +65,9 @@ NPM_CONFIG_USERCONFIG DEFAULT="${XDG_CONFIG_HOME}/npm/npmrc" # TMUX TMUX_TMPDIR DEFAULT="${XDG_RUNTIME_DIR}" +# Zeal +DASHT_DOCSETS_DIR DEFAULT="${XDG_DATA_HOME}/Zeal/Zeal/docsets/" + # node_modules/pm2/paths.js PM2_HOME DEFAULT="${XDG_DATA_HOME}/pm2" PM2_CONF_FILE DEFAULT="${XDG_CONFIG_HOME}/pm2/conf.js" diff --git a/site.yml b/site.yml index 87f4858..28a64ed 100644 --- a/site.yml +++ b/site.yml @@ -22,4 +22,5 @@ - tools - gnupg - cron - - contexts/fretlink + - role: contexts/fretlink + tags: ["fretlink"]