dotfiles/config/automatrop/roles/color/tasks/main.yml

119 lines
4.2 KiB
YAML

- name: Ensure directories for theme are present
file:
state: directory
path: "{{ ansible_env.HOME }}/{{ item }}"
with_items:
- ".config/Xresources"
- ".config/rofi"
- ".local/bin"
- ".config/qutebrowser"
- ".config/tridactyl/themes"
- name: Download base16 theme for Xresources
get_url:
url: "https://raw.githubusercontent.com/chriskempson/base16-xresources/master/xresources/base16-{{ base16_scheme }}-256.Xresources"
dest: "{{ ansible_env.HOME }}/.config/Xresources/theme"
mode: "u+rw,g=r,o=r"
notify:
- xrdb-reload
- name: Download base16 theme for i3
get_url:
url: "https://raw.githubusercontent.com/khamer/base16-i3/master/colors/base16-{{ base16_scheme }}.config"
dest: "{{ ansible_env.HOME }}/.config/i3/theme"
mode: "u+rw,g=r,o=r"
- name: Configure i3
template:
src: "{{ ansible_env.HOME }}/.config/i3/config.j2"
dest: "{{ ansible_env.HOME }}/.config/i3/config"
mode: "u+rw,g=r,o=r"
notify:
- i3-reload
- name: Download base16 theme for rofi
get_url:
url: "https://raw.githubusercontent.com/0xdec/base16-rofi/master/themes/base16-{{ base16_scheme }}.{{ item }}"
dest: "{{ ansible_env.HOME }}/.config/rofi/theme.{{ item }}"
mode: "u+rw,g=r,o=r"
with_items:
- rasi
- config
- name: Download base16 theme for Termux
get_url:
url: "https://raw.githubusercontent.com/kdrag0n/base16-termux/master/colors/base16-{{ base16_scheme }}.properties"
dest: "{{ ansible_env.HOME }}/.termux/color.properties"
mode: "u+rw,g=r,o=r"
# TODO Only on Termux
- name: Download base16 theme for Alacritty
get_url:
url: "https://raw.githubusercontent.com/aaron-williamson/base16-alacritty/master/colors/base16-{{ base16_scheme }}.yml"
dest: "{{ ansible_env.HOME }}/.config/alacritty/theme.yml"
mode: "u+rw,g=r,o=r"
- name: Configure Alacritty
template:
src: "{{ ansible_env.HOME }}/.config/alacritty/alacritty.yml.j2"
dest: "{{ ansible_env.HOME }}/.config/alacritty/alacritty.yml"
mode: "u+rw,g=r,o=r"
# Alacritty has live config reload, so no command to execute
- name: Download base16 theme for shell
get_url:
url: "https://raw.githubusercontent.com/chriskempson/base16-shell/master/scripts/base16-{{ base16_scheme }}.sh"
dest: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApply"
mode: "u+rwx,g=rx,o=rx"
notify:
- shell-reload
when: False # Not currently used
- name: Download base16 theme for fzf
get_url:
url: "https://raw.githubusercontent.com/nicodebo/base16-fzf/master/bash/base16-{{ base16_scheme }}.config"
dest: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApplyFzf"
mode: "u+rw,g=r,o=r"
notify:
- fzf-reload
- name: Set used base16 theme for vim
copy:
path: "{{ ansible_env.HOME }}/.config/vim/colorscheme.vim"
mode: "u+rw,g=r,o=r"
content: "colorscheme base16-{{ base16_scheme }}"
when: False # Not currently used
- name: Download base16 theme for qutebrowser
get_url:
url: "https://raw.githubusercontent.com/theova/base16-qutebrowser/master/themes/default/base16-{{ base16_scheme }}.config.py"
dest: "{{ ansible_env.HOME }}/.config/qutebrowser/theme.py"
mode: "u+rw,g=r,o=r"
notify:
- qutebrowser-reload
- name: Download base16 theme for Tridactyl
get_url:
url: "https://raw.githubusercontent.com/bezmi/base16-tridactyl/master/base16-{{ base16_scheme }}.css"
dest: "{{ ansible_env.HOME }}/.config/tridactyl/themes/theme.css"
mode: "u+rw,g=r,o=r"
when: False # Not currently used
- name: Download base16 theme for Dunst
get_url:
url: "https://raw.githubusercontent.com/khamer/base16-dunst/master/themes/base16-{{ base16_scheme }}.dunstrc"
dest: "{{ ansible_env.HOME }}/.config/dunst/theme"
mode: "u+rw,g=r,o=r"
- name: Configure Dunst
template:
src: "{{ ansible_env.HOME }}/.config/dunst/dunstrc.j2"
dest: "{{ ansible_env.HOME }}/.config/dunst/dunstrc"
mode: "u+rw,g=r,o=r"
# TODO mechanism to switching light/dark quickly
# TODO dunst (template online, but not to my liking)
# TODO bar (might change bar in the future, so...)
# TODO highlight (there IS a template but the colors look different from vim and mostly the same from when there's no config)
# TODO https://github.com/makuto/auto-base16-theme ? :P