Auto dark/light mode switching, fix Mason

This commit is contained in:
Bartek Stalewski 2024-09-26 02:21:11 +02:00
parent 0d1e6f2967
commit 4d516d6b9d
No known key found for this signature in database
7 changed files with 58 additions and 23 deletions

View file

@ -12,7 +12,11 @@ gd() {
alias less='less -R'
if [[ $(command -v bat) ]]; then
alias cat='bat -pp --color=always --tabs=2 --theme=Monokai\ Extended\ Bright'
if [[ "${macos_interface_style}" = "Dark" ]]; then
alias cat='bat -pp --color=always --tabs=2 --theme=Monokai\ Extended\ Bright'
else
alias cat='bat -pp --color=always --tabs=2 --theme=Monokai\ Extended\ Light'
fi
fi
if [[ $(command -v eza) ]]; then
@ -44,9 +48,6 @@ elif [ $(command -v vim) ] ; then
else
export EDITOR=vi
fi
if [ $(command -v zed) ] && [ $(id -u) -ne 0 ]; then
alias vim=zed
fi
if [[ $(command -v rg) ]]; then
alias grep='rg -i'