You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
940 B
41 lines
940 B
2 years ago
|
#!/usr/bin/env sh
|
||
|
|
||
|
set -eu
|
||
|
|
||
|
exec >> ~/.redshift-hooks.log 2>&1
|
||
|
|
||
|
|
||
|
update_terminal() {
|
||
|
pkill -SIGUSR1 kitty
|
||
|
}
|
||
|
|
||
|
day_setup() {
|
||
|
echo "include gruvbox/gruvbox_light.conf" > "$HOME"/.config/kitty/coloscheme.conf
|
||
|
echo "vim.opt.background = \"light\"" > "$HOME"/.config/lvim/lua/background.lua
|
||
|
bash ~/scripts/xfce4-night-mode/xfce4-night-mode.sh day
|
||
|
update_terminal
|
||
|
}
|
||
|
|
||
|
night_setup() {
|
||
|
echo "include gruvbox/gruvbox_dark.conf" > "$HOME"/.config/kitty/coloscheme.conf
|
||
|
echo "vim.opt.background = \"dark\"" > "$HOME"/.config/lvim/lua/background.lua
|
||
|
bash ~/scripts/xfce4-night-mode/xfce4-night-mode.sh night
|
||
|
update_terminal
|
||
|
}
|
||
|
|
||
|
if [ "$1" = period-changed ]; then
|
||
|
echo $(date +"%y-%m-%d %H:%M:%S") $@
|
||
|
case $3 in
|
||
|
daytime)
|
||
|
day_setup
|
||
|
;;
|
||
|
transition)
|
||
|
if [ "$2" = none ]; then
|
||
|
day_setup
|
||
|
fi
|
||
|
;;
|
||
|
night)
|
||
|
night_setup
|
||
|
esac
|
||
|
fi
|