diff --git a/conf/bat.conf b/conf/bat.conf new file mode 100644 index 00000000..9aba7520 --- /dev/null +++ b/conf/bat.conf @@ -0,0 +1,12 @@ +# $(bat --config-file) + +# Enable this to use italic text on the terminal. +--italic-text=always +# 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. +# Use ".gitignore"-style highlighting for ".*ignore" files +--map-syntax ".*ignore:Git Ignore" diff --git a/install b/install index 3c6c58c3..f38fe11e 100755 --- a/install +++ b/install @@ -37,7 +37,7 @@ cp -v rc/zshrc $HOME/.zshrc cp -v rc/profile $HOME/.profile # Create configuration directories missed later -mkdir -vp $HOME/.config/{autostart,foot,git,MangoHud,mpv,nvim,systemd/user,yt-dlp}/ +mkdir -vp $HOME/.config/{autostart,bat,foot,git,MangoHud,mpv,nvim,systemd/user,yt-dlp}/ # terminfo just in case it needs to be copied to remote system mkdir -vp $HOME/.terminfo/{A..z} @@ -67,6 +67,15 @@ if [ ! -f $HOME/.config/foot/foot.ini ]; then cp -v conf/foot/foot.ini $HOME/.config/foot/foot.ini fi +# A cat(1) clone with wings. +if hash bat 2> /dev/null; then + mkdir -vp $(bat --config-dir) + if [ ! -f $(bat --config-file) ]; then + bat --generate-config-file + cat conf/bat.conf >> $(bat --config-file) + fi +fi + # the media player cp -v conf/mpv.conf $HOME/.config/mpv/mpv.conf mkdir -vp $HOME/.var/app/io.mpv.Mpv/config/mpv