diff --git a/config.yaml b/config.yaml index b040558..a498ed1 100644 --- a/config.yaml +++ b/config.yaml @@ -275,6 +275,10 @@ dotfiles: # {{{ dst: ~/.local/share/metapkg/PKGBUILD actions: - install_meta + bat: + src: bat + dst: ~/.config/bat/config + # }}} actions: #{{{ diff --git a/dotfiles/bat b/dotfiles/bat new file mode 100644 index 0000000..68f4bf8 --- /dev/null +++ b/dotfiles/bat @@ -0,0 +1,29 @@ +# {{@@ header() @@}} +# +# 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. + +# {%@@ if color.type == "light" @@%} # +--theme GitHub +# {%@@ endif @@%} # + +# 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 .ino files +# Example 2: Use ".gitignore"-style highlighting for ".ignore" files +#--map-syntax "*.ino:C++" +#--map-syntax ".ignore:Git Ignore" + +# vim: ft=sh diff --git a/dotfiles/fish/alias.fish b/dotfiles/fish/alias.fish index d8a5998..02195ea 100644 --- a/dotfiles/fish/alias.fish +++ b/dotfiles/fish/alias.fish @@ -34,9 +34,8 @@ alias crm 'command rm -i' command -qs exa && alias ls 'exa --git' -{%@@ set bat_command = "bat " + ("--theme GitHub" * (color.type == "light")) @@%} command -qs bat && - alias cat "{{@@ bat_command @@}}" + alias cat "bat" ################################################################ # The ever usefull "z" command diff --git a/dotfiles/fish/env.fish b/dotfiles/fish/env.fish index f544194..1e7b8c5 100644 --- a/dotfiles/fish/env.fish +++ b/dotfiles/fish/env.fish @@ -39,9 +39,8 @@ set -xU LESS_TERMCAP_us (printf "\e[01;32m") # Fzf settings ################################################################ -{%@@ set bat_command = "bat " + ("--theme GitHub" * (color.type == "light")) @@%} set -x FZF_DEFAULT_OPTS "\ ---preview '{{@@ bat_command @@}} --style=numbers --color=always {}' \ +--preview 'bat --style=numbers --color=always {}' \ --color='\ bg+:{{@@ color.bg_light @@}},\ hl+:{{@@ color.normal.green @@}},\