dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 4a06142710eddaf4c3a83d6225a28308b6d55433
parent cf2849c7e830cb26d93bb95dc5a58f401f624c92
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Thu,  1 Aug 2019 18:17:00 +0200

vim: don't use env variable for theme, but consult osascript

Former-commit-id: 7841cde82876a9c8e357a1265736614d6750e52f
Diffstat:
Mvim/vimrc | 11+++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/vim/vimrc b/vim/vimrc @@ -232,14 +232,9 @@ if has('termguicolors') set termguicolors endif -if has_key(environ(), 'THEME') - if environ()['THEME'] == 'DARK' - set background=dark - colorscheme junipero - else - set background=light - colorscheme kuroi - endif +if system("osascript -e 'tell application \"System Events\" to tell appearance preferences to return (get dark mode as text)'") == "true\n" + set background=dark + colorscheme junipero else set background=light colorscheme kuroi