Files
config-bash/rc.after.d/apps
T
xavier e8eba3619a feat: Move prefered apps logic from profile.d to rc.d
Without this, mise is not yet activated when evaluating the prefered
apps scripts and mise installed apps are considered not installed (for
exemple nvim for the EDITOR variable)
2026-07-14 18:20:41 +02:00

31 lines
520 B
Bash

#!/bin/bash
# Defined prefered applications
# EDITOR
if (command -v nvim &>/dev/null); then
export EDITOR=nvim
fi
# PAGER
if (command -v less &>/dev/null); then
export PAGER=less
fi
# MANPAGER
if (command -v nvim &>/dev/null); then
export MANPAGER='nvim +Man!'
elif (command -v bat &>/dev/null); then
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
fi
# TERMINAL
if (command -v kitty &>/dev/null); then
export TERMINAL=kitty
fi
# BROWSER
if (command -v firefox &>/dev/null); then
export BROWSER=firefox
fi