add a simple config file for bat

This commit is contained in:
Aminda Suomalainen 2025-10-13 12:12:49 +03:00
parent c6582f1c47
commit 83458dea40
Signed by: Mikaela
GPG Key ID: 99392F62BAE30723
2 changed files with 22 additions and 1 deletions

12
conf/bat.conf Normal file
View File

@ -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"

11
install
View File

@ -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