Update script to ensure neovim and ghostty are synchronized
This commit is contained in:
parent
d79f5f60df
commit
d36ded958e
1 changed files with 7 additions and 7 deletions
|
@ -13,18 +13,18 @@ sed -E -i '' \
|
||||||
-e 's/^([[:space:]]*theme[[:space:]]*=[[:space:]]*)zenwritten-light/\1zenwritten-dark/' \
|
-e 's/^([[:space:]]*theme[[:space:]]*=[[:space:]]*)zenwritten-light/\1zenwritten-dark/' \
|
||||||
"$GHOSTTY_CONF"
|
"$GHOSTTY_CONF"
|
||||||
|
|
||||||
# Toggle Neovim vim.g.light_mode true/false
|
|
||||||
sed -E -i '' \
|
|
||||||
-e 's/(vim\.g\.light_mode[[:space:]]*=[[:space:]]*)true/\1false/' \
|
|
||||||
-e 't' \
|
|
||||||
-e 's/(vim\.g\.light_mode[[:space:]]*=[[:space:]]*)false/\1true/' \
|
|
||||||
"$NVIM_CONF"
|
|
||||||
|
|
||||||
# Determine new mode from Ghostty theme
|
# Determine new mode from Ghostty theme
|
||||||
if grep -Eq '^\s*theme\s*=\s*zenwritten-light' "$GHOSTTY_CONF"; then
|
if grep -Eq '^\s*theme\s*=\s*zenwritten-light' "$GHOSTTY_CONF"; then
|
||||||
MODE="light"
|
MODE="light"
|
||||||
|
# Toggle Neovim vim.g.light_mode true/false
|
||||||
|
sed -E -i '' \
|
||||||
|
-e 's/(vim\.g\.light_mode[[:space:]]*=[[:space:]]*).*/\1true/' \
|
||||||
|
"$NVIM_CONF"
|
||||||
else
|
else
|
||||||
MODE="dark"
|
MODE="dark"
|
||||||
|
sed -E -i '' \
|
||||||
|
-e 's/(vim\.g\.light_mode[[:space:]]*=[[:space:]]*).*/\1false/' \
|
||||||
|
"$NVIM_CONF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Reload neovim theme
|
# Reload neovim theme
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue