From 60526dff281ac40060f021c49d04765bf8f9eda5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Sun, 10 Jan 2021 14:55:27 +0100 Subject: [PATCH] More colors stuff --- .gitmodules | 3 + config/automatrop/plugins/modules/aur | 1 + config/automatrop/roles/color/tasks/main.yml | 76 +++++++++---------- .../roles/mnussbaum.base16-builder-ansible | 2 +- config/scripts/crepuscule | 2 +- config/scripts/jour | 2 +- config/scripts/nuit | 2 +- 7 files changed, 46 insertions(+), 42 deletions(-) create mode 160000 config/automatrop/plugins/modules/aur diff --git a/.gitmodules b/.gitmodules index 6269d2d..e444087 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "config/automatrop/roles/mnussbaum.base16-builder-ansible"] path = config/automatrop/roles/mnussbaum.base16-builder-ansible url = https://github.com/GeoffreyFrogeye/base16-builder-ansible.git +[submodule "config/automatrop/plugins/modules/aur"] + path = config/automatrop/plugins/modules/aur + url = https://github.com/kewlfft/ansible-aur.git diff --git a/config/automatrop/plugins/modules/aur b/config/automatrop/plugins/modules/aur new file mode 160000 index 0000000..592c6d9 --- /dev/null +++ b/config/automatrop/plugins/modules/aur @@ -0,0 +1 @@ +Subproject commit 592c6d9841674211f904cf9ea2a951fca3fd5a80 diff --git a/config/automatrop/roles/color/tasks/main.yml b/config/automatrop/roles/color/tasks/main.yml index 40bb9e5..e6436d1 100644 --- a/config/automatrop/roles/color/tasks/main.yml +++ b/config/automatrop/roles/color/tasks/main.yml @@ -26,6 +26,14 @@ - dunst register: base16_schemes +- 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 +# However, it doesn't work with yaml includes, hence the template + - name: Set base16 theme for Xresources copy: content: "{{ base16_schemes['schemes'][base16_scheme]['xresources']['xresources']['base16-' + base16_scheme + '-256.Xresources'] }}" @@ -34,6 +42,22 @@ notify: - xrdb-reload +- name: Download base16 theme for qutebrowser + copy: + content: "{{ base16_schemes['schemes'][base16_scheme]['qutebrowser']['themes/minimal']['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 + copy: + content: "{{ base16_schemes['schemes'][base16_scheme]['tridactyl']['base16-' + base16_scheme + '.config.py'] }}" + # 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: Configure i3 template: src: "{{ ansible_env.HOME }}/.config/i3/config.j2" @@ -51,6 +75,20 @@ - rasi - config +- 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" + +- name: Download base16 theme for fzf + copy: + content: "{{ base16_schemes['schemes'][base16_scheme]['fzf']['bash']['base16-' + base16_scheme + '.config'] }}" + dest: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApplyFzf" + mode: "u+rw,g=r,o=r" + notify: + - fzf-reload + - name: Download base16 theme for Termux copy: content: "{{ base16_schemes['schemes'][base16_scheme]['termux']['colors']['base16-' + base16_scheme + '.properties'] }}" @@ -58,14 +96,6 @@ mode: "u+rw,g=r,o=r" # TODO Only on Termux -- 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 -# However, it doesn't work with yaml includes, hence the template - - name: Download base16 theme for shell copy: content: "{{ base16_schemes['schemes'][base16_scheme]['shell']['script']['base16-' + base16_scheme + '.sh'] }}" @@ -75,14 +105,6 @@ - shell-reload when: False # Not currently used -- name: Download base16 theme for fzf - copy: - content: "{{ base16_schemes['schemes'][base16_scheme]['fzf']['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" @@ -90,28 +112,6 @@ content: "colorscheme base16-{{ base16_scheme }}" when: False # Not currently used -- name: Download base16 theme for qutebrowser - copy: - content: "{{ base16_schemes['schemes'][base16_scheme]['qutebrowser']['themes/minimal']['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 - copy: - content: "{{ base16_schemes['schemes'][base16_scheme]['tridactyl']['base16-' + base16_scheme + '.config.py'] }}" - # 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: 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 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 diff --git a/config/automatrop/roles/mnussbaum.base16-builder-ansible b/config/automatrop/roles/mnussbaum.base16-builder-ansible index f631614..a977bb2 160000 --- a/config/automatrop/roles/mnussbaum.base16-builder-ansible +++ b/config/automatrop/roles/mnussbaum.base16-builder-ansible @@ -1 +1 @@ -Subproject commit f63161458533d5dc1a75529fb4e1fb04bc6885e6 +Subproject commit a977bb298fb9e1c057e0b2587dbd4d047e13f5bd diff --git a/config/scripts/crepuscule b/config/scripts/crepuscule index cccd794..7a7d73f 100755 --- a/config/scripts/crepuscule +++ b/config/scripts/crepuscule @@ -5,4 +5,4 @@ cd ~/.dotfiles/config/automatrop echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness xrandr --output HDMI-0 --brightness 1 -ansible-playbook playbooks/default.yml -e base16_scheme=solarized-dark +ansible-playbook playbooks/default.yml -e base16_scheme=solarized-dark --tags color --inventory 'localhost' diff --git a/config/scripts/jour b/config/scripts/jour index d651683..a7b54a3 100755 --- a/config/scripts/jour +++ b/config/scripts/jour @@ -5,4 +5,4 @@ cd ~/.dotfiles/config/automatrop echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness xrandr --output HDMI-0 --brightness 1 -ansible-playbook playbooks/default.yml -e base16_scheme=solarized-light +ansible-playbook playbooks/default.yml -e base16_scheme=solarized-light --tags color --inventory 'localhost' diff --git a/config/scripts/nuit b/config/scripts/nuit index 03ce6e9..80fd993 100755 --- a/config/scripts/nuit +++ b/config/scripts/nuit @@ -5,4 +5,4 @@ cd ~/.dotfiles/config/automatrop echo 1 | sudo tee /sys/class/backlight/intel_backlight/brightness xrandr --output HDMI-0 --brightness 0.5 -ansible-playbook playbooks/default.yml -e base16_scheme=solarized-dark +ansible-playbook playbooks/default.yml -e base16_scheme=solarized-dark --tags color --inventory 'localhost'