diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2020-11-30 19:11:03 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2020-11-30 21:33:22 +0300 |
commit | 4516b146acaf1692488a9e9d795e5c07092f867a (patch) | |
tree | 2b4be1711d2cb323f5d9f6e134cab3574bcd3f9f /dotfiles/.local/bin | |
parent | 516ad4df7a0bd72ffa5fa46bf85d93a2a87d4e53 (diff) | |
download | swayrice-4516b146acaf1692488a9e9d795e5c07092f867a.tar.gz swayrice-4516b146acaf1692488a9e9d795e5c07092f867a.zip |
Colorschemes, terminal emulator config
* Easy way to change color scheme from dark to light on the fly
* Sound alert for bell in alacritty
Diffstat (limited to 'dotfiles/.local/bin')
-rwxr-xr-x | dotfiles/.local/bin/chcolors | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/chcolors b/dotfiles/.local/bin/chcolors new file mode 100755 index 0000000..7732267 --- /dev/null +++ b/dotfiles/.local/bin/chcolors @@ -0,0 +1,20 @@ +#!/bin/sh + +COLORSCHEME="dark" + +if [ -f $HOME/.cache/colorscheme ]; then + source $HOME/.cache/colorscheme +fi + +case $COLORSCHEME in + dark) + COLORSCHEME="light" ;; + *) + COLORSCHEME="dark" ;; +esac + +sed -i --follow-symlinks \ + "s/^colors:.*/colors: \*$COLORSCHEME/g" \ + $HOME/.config/alacritty/alacritty.yml + +echo "export COLORSCHEME=$COLORSCHEME" > $HOME/.cache/colorscheme |