Set background to macOS on cd

work
mat ess 2022-06-27 15:02:02 -04:00
parent 460346ba2b
commit fd2f8bd752
1 changed files with 11 additions and 8 deletions

View File

@ -68,14 +68,17 @@
# Set `$term_background` based on whether macOS is light or dark mode. Other Fish functions # Set `$term_background` based on whether macOS is light or dark mode. Other Fish functions
# trigger when this variable changes. We use a universal variable so that all instances of Fish # trigger when this variable changes. We use a universal variable so that all instances of Fish
# have the same value for the variable. # have the same value for the variable.
set-background-to-macOS.body = '' set-background-to-macOS = {
# Returns 'Dark' if in dark mode fails otherwise. body = ''
if defaults read -g AppleInterfaceStyle &>/dev/null # Returns 'Dark' if in dark mode fails otherwise.
set -U term_background dark if defaults read -g AppleInterfaceStyle &>/dev/null
else set -U term_background dark
set -U term_background light else
end set -U term_background light
''; end
'';
onVariable = "PWD";
};
# Sets Fish Shell to light or dark colorscheme based on `$term_background`. # Sets Fish Shell to light or dark colorscheme based on `$term_background`.
set-shell-colors = { set-shell-colors = {