From 7d3c9dcad46dbb91beb95e5190832bee18504206 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Wed, 12 Mar 2025 23:59:16 +0100 Subject: [PATCH] add catppuccin bat themes --- playbooks/dependencies/bat.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/playbooks/dependencies/bat.yaml b/playbooks/dependencies/bat.yaml index 6d07d50..4f8aa30 100644 --- a/playbooks/dependencies/bat.yaml +++ b/playbooks/dependencies/bat.yaml @@ -13,3 +13,29 @@ src: /usr/bin/batcat dest: /home/gaugendre/.local/bin/bat state: link + - name: Get bat config dir + ansible.builtin.command: /usr/bin/batcat --config-dir + register: confdir + changed_when: false + check_mode: false + - name: Create bat themes dir + ansible.builtin.file: + path: "{{ confdir.stdout }}/themes" + state: directory + mode: "0775" + - name: Download Catppuccin themes + ansible.builtin.get_url: + url: https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20{{ item }}.tmTheme + dest: "{{ confdir.stdout }}/themes/Catppuccin {{ item }}.tmTheme" + mode: "0664" + notify: + - Rebuild bat theme cache + loop: + - Latte + - Mocha + - Macchiato + - Frappe + handlers: + - name: Rebuild bat theme cache + ansible.builtin.command: /usr/bin/batcat cache --build + changed_when: true