Add dark mode support
This commit is contained in:
parent
b74f8ffd93
commit
7122baebd7
3 changed files with 35 additions and 9 deletions
6
bin/isdark
Executable file
6
bin/isdark
Executable file
|
@ -0,0 +1,6 @@
|
|||
#! /usr/bin/env osascript
|
||||
tell application "System Events"
|
||||
tell appearance preferences
|
||||
dark mode
|
||||
end tell
|
||||
end tell
|
|
@ -141,8 +141,16 @@ syntax on
|
|||
filetype plugin indent on
|
||||
|
||||
" Theme configuration
|
||||
|
||||
if $MACOS_DARKMODE
|
||||
set background=dark
|
||||
else
|
||||
set background=light
|
||||
endif
|
||||
|
||||
let g:gruvbox_italic = 1
|
||||
colorscheme maxbucknell
|
||||
|
||||
colorscheme gruvbox
|
||||
|
||||
" I want floating windows to have the same syntax highlighting as normal vim
|
||||
" things.
|
||||
|
|
|
@ -30,11 +30,14 @@ PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/2.6.0/bin:$PATH"
|
|||
export PYTHONPATH="$PYTHONPATH:$HOME/dotfiles/lib/python"
|
||||
|
||||
# Rust
|
||||
source $HOME/.cargo/env
|
||||
# source $HOME/.cargo/env
|
||||
|
||||
# Go
|
||||
PATH="$HOME/go/bin:$PATH"
|
||||
|
||||
# Yarn ffs
|
||||
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
|
||||
|
||||
## Completion
|
||||
|
||||
# Load up the extra Z Shell completions
|
||||
|
@ -160,6 +163,15 @@ setopt extended_history
|
|||
# to do things correctly and see if it's slow.
|
||||
setopt hist_lex_words
|
||||
|
||||
# Dark Mode Support
|
||||
isdark="$($HOME/dotfiles/bin/isdark)"
|
||||
if [[ "$isdark" == 'true' ]]
|
||||
then
|
||||
export MACOS_DARKMODE=1
|
||||
else
|
||||
export MACOS_DARKMODE=0
|
||||
fi
|
||||
|
||||
# Liquid Prompt!
|
||||
source "$HOME/.zsh/liquidprompt/liquidprompt"
|
||||
|
||||
|
@ -197,11 +209,11 @@ function select_session {
|
|||
fi
|
||||
}
|
||||
|
||||
if [ -z "$TMUX" ]
|
||||
then
|
||||
neofetch
|
||||
fi
|
||||
# Disabling the below because Tmux has been playing up.
|
||||
#
|
||||
# if [ -z "$TMUX" ]
|
||||
# then
|
||||
# neofetch
|
||||
# fi
|
||||
|
||||
select_session
|
||||
|
||||
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
|
||||
# select_session
|
||||
|
|
Loading…
Add table
Reference in a new issue