Skip to content

Commit

Permalink
bat: Adding theme and config
Browse files Browse the repository at this point in the history
  • Loading branch information
TechDufus committed Dec 16, 2024
1 parent 5fd35f9 commit cbdadf3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
28 changes: 28 additions & 0 deletions roles/bat/files/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This is `bat`s configuration file. Each line either contains a comment or
# a command-line option that you want to pass to `bat` by default. You can
# run `bat --help` to get a list of all possible configuration options.

# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes`
# for a list of all available themes
--theme="Catppuccino Mocha"

# Show line numbers, Git modifications and file header (but no grid)
--style="numbers,changes,header"

# Enable this to use italic text on the terminal. This is not supported on all
# terminal emulators (like tmux, by default):
#--italic-text=always

# Uncomment the following line to disable automatic paging:
#--paging=never

# Uncomment the following line if you are using less version >= 551 and want to
# enable mouse scrolling support in `bat` when running inside tmux. This might
# disable text selection, unless you press shift.
#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse"

# Syntax mappings: map a certain filename pattern to a language.
# Example 1: use the C++ syntax for Arduino .ino files
# Example 2: Use ".gitignore"-style highlighting for ".ignore" files
#--map-syntax "*.ino:C++"
#--map-syntax ".ignore:Git Ignore"
20 changes: 20 additions & 0 deletions roles/bat/tasks/MacOSX.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,23 @@
community.general.homebrew:
name: bat
state: present

# wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme

- name: "Bat | MacOSX | Create bat themes directory"
ansible.builtin.file:
path: "{{ lookup('env', 'HOME') }}/.config/bat/themes"
state: directory
mode: "0755"

- name: "Bat | MacOSX | Install bat config"
ansible.builtin.copy:
src: config
dest: "{{ lookup('env', 'HOME') }}/.config/bat/config"
mode: "0644"

- name: "Bat | MacOSX | Install bat themes"
ansible.builtin.get_url:
url: "https://raw.githubusercontent.com/catppuccin/bat/main/themes/Catppuccin%20Mocha.tmTheme"
dest: "{{ lookup('env', 'HOME') }}/.config/bat/themes/Catppuccino Mocha.tmTheme"
mode: "0644"

0 comments on commit cbdadf3

Please sign in to comment.