Skip to content

Instantly share code, notes, and snippets.

@soyuka
Created September 5, 2022 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soyuka/9e9b2591499a1cdc84724949667814e6 to your computer and use it in GitHub Desktop.
Save soyuka/9e9b2591499a1cdc84724949667814e6 to your computer and use it in GitHub Desktop.
Switch theme alacritty
#!/bin/bash
from=$(cat ~/.config/sway/current_scheme)
if [ "$from" = "black" ]; then
from=black
to=white
else
from=white
to=black
fi
alacritty="s/color.${from}.yml/color.${to}.yml/g"
vim="s/color.${from}/color.${to}/g"
sed -i -e $alacritty ~/.config/alacritty/alacritty.yml
sed -i -e $vim ~/.vimrc
echo $to > ~/.config/sway/current_scheme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment