aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2020-11-30 19:11:03 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2020-11-30 21:33:22 +0300
commit4516b146acaf1692488a9e9d795e5c07092f867a (patch)
tree2b4be1711d2cb323f5d9f6e134cab3574bcd3f9f /dotfiles/.local/bin
parent516ad4df7a0bd72ffa5fa46bf85d93a2a87d4e53 (diff)
downloadswayrice-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-xdotfiles/.local/bin/chcolors20
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