From 0b8bba8c9ba915a9c6b18177874952aaef893f9c Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Fri, 21 Jun 2024 13:21:56 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20Meilleure=20gestion=20des=20application?= =?UTF-8?q?s=20par=20d=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- profile.d/apps | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/profile.d/apps b/profile.d/apps index ee2aa18..a7bc59a 100644 --- a/profile.d/apps +++ b/profile.d/apps @@ -1,8 +1,24 @@ #!/bin/bash # Defined prefered applications -export TERMINAL=kitty -export PAGER=less -export EDITOR=nvim -export BROWSER=firefox +# EDITOR +if (command -v nvim &>/dev/null); then + export EDITOR=nvim +fi + +# PAGER +export PAGER=less + +# 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 +export TERMINAL=kitty + +# BROWSER +export BROWSER=firefox