1
0
Fork 0
mirror of https://github.com/eoli3n/dotfiles synced 2024-06-06 06:46:09 +02:00
eoli3n-dotfiles/roles/fish/tasks/main.yml
2020-01-04 21:32:08 +01:00

58 lines
1.4 KiB
YAML

---
- name: Get oh-my-fish installer
get_url:
url: https://get.oh-my.fish
dest: /tmp/oh-my.fish
mode: '7550'
changed_when: false
- name: Install oh-my-fish
shell: fish -c "/tmp/oh-my.fish --noninteractive -y"
args:
creates: ~/.config/fish/conf.d/omf.fish
- name: Remove oh-my-fish installer
file:
path: /tmp/oh-my.fish
state: absent
changed_when: false
- name: Install pureprompt plugin
shell: |
fish -c "omf install pure"
fish -c "ln -s $OMF_PATH/themes/pure/conf.d/pure.fish ~/.config/fish/conf.d/pure.fish"
fish -c "ln -s $OMF_PATH/themes/pure/conf.d/_pure_init.fish ~/.config/fish/conf.d/pure_init.fish"
args:
creates: ~/.config/fish/conf.d/pure.fish
- name: check git plugin install
shell: grep git ~/.config/fish/fish_variables
register: gitcheck
ignore_errors: True
changed_when: false
- name: Install git plugin
shell: fish -c "omf install https://github.com/jhillyerd/plugin-git"
when: gitcheck is failed
- name: Globale fish configuration
copy:
src: config.fish
dest: ~/.config/fish/
backup: yes
- name: Laptops fish configuration
copy:
src: laptop.fish
dest: ~/.config/fish/conf.d/
backup: yes
when: "'laptop' in {{ group_names }}"
- name: copy aliases
synchronize:
src: files/functions
dest: ~/.config/fish/
- debug:
msg: "Do not forget to 'chsh /usr/bin/fish'"