From 7c51568d3f9af337bc49a9860375b2b46e9188c5 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sun, 2 Aug 2020 13:34:02 +0200 Subject: [PATCH] Added dark/light mode switchers --- bin/dark | 5 +++++ bin/install.sh | 7 +++++++ bin/light | 5 +++++ 3 files changed, 17 insertions(+) create mode 100755 bin/dark create mode 100755 bin/install.sh create mode 100755 bin/light diff --git a/bin/dark b/bin/dark new file mode 100755 index 0000000..5e2d3b0 --- /dev/null +++ b/bin/dark @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +sed --in-place --follow-symlinks --expression "s/^colors: \*light/colors: *dark/" ~/.config/alacritty/alacritty.yml +sed --in-place --follow-symlinks --expression "s/^set background=light/set background=dark/" ~/.config/nvim/init.vim +sed --in-place --follow-symlinks --expression "s/light/dark/" ~/.tmux.conf && tmux source-file ~/.tmux.conf diff --git a/bin/install.sh b/bin/install.sh new file mode 100755 index 0000000..098dac1 --- /dev/null +++ b/bin/install.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +TARGET_DIR=~/.local/bin + +mkdir --parents ~/.local/bin +ln -svrf light ${TARGET_DIR}/light +ln -svrf dark ${TARGET_DIR}/dark diff --git a/bin/light b/bin/light new file mode 100755 index 0000000..36daee0 --- /dev/null +++ b/bin/light @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +sed --in-place --follow-symlinks --expression "s/^colors: \*dark/colors: *light/" ~/.config/alacritty/alacritty.yml +sed --in-place --follow-symlinks --expression "s/^set background=dark/set background=light/" ~/.config/nvim/init.vim +sed --in-place --follow-symlinks --expression "s/dark/light/" ~/.tmux.conf && tmux source-file ~/.tmux.conf