Remove old color swap stuff
This commit is contained in:
parent
61c854604d
commit
5d465408c5
2 changed files with 1 additions and 42 deletions
|
@ -1,31 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
color_file=$HOME/.config/$USER/color.yml
|
osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to not dark mode'
|
||||||
if ! test -f $color_file; then
|
|
||||||
mkdir -p $HOME/.config/$USER
|
|
||||||
echo light > $color_file
|
|
||||||
fi
|
|
||||||
old_color=$(cat $color_file)
|
|
||||||
|
|
||||||
if [[ $old_color == "dark" ]]; then
|
|
||||||
new_color=light
|
|
||||||
else
|
|
||||||
new_color=dark
|
|
||||||
fi
|
|
||||||
|
|
||||||
alacritty=$HOME/.config/alacritty/
|
|
||||||
ln -sf $alacritty/themes/$new_color.toml $alacritty/theme.toml
|
|
||||||
# Alacritty does not notice update of imported symlink
|
|
||||||
touch $alacritty/alacritty.toml
|
|
||||||
|
|
||||||
echo $new_color > $color_file
|
|
||||||
|
|
||||||
if tmux info &> /dev/null; then
|
|
||||||
for pane_info in $(tmux list-panes -a -F '#{pane_id}-#{pane_current_command}'); do
|
|
||||||
IFS=- read pane cmd <<< "$pane_info"
|
|
||||||
|
|
||||||
if [[ $cmd == "vim" || $cmd == "nvim" ]]; then
|
|
||||||
tmux send-keys -t $pane ":lua ChangeBackground()" ENTER
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
13
install.sh
13
install.sh
|
@ -190,17 +190,6 @@ install_darwin_brew_cask_packages() {
|
||||||
echo done
|
echo done
|
||||||
}
|
}
|
||||||
|
|
||||||
install_color_default() {
|
|
||||||
echo -n Checking color default file...
|
|
||||||
if [[ -f $HOME/.config/$USER/color.yml ]]; then
|
|
||||||
echo -n already installed...
|
|
||||||
else
|
|
||||||
echo -n installing....
|
|
||||||
$HOME/dotfiles/bin/bin/toggle-color-mode
|
|
||||||
fi
|
|
||||||
echo done
|
|
||||||
}
|
|
||||||
|
|
||||||
install_darwin_profile_hack() {
|
install_darwin_profile_hack() {
|
||||||
echo -n Checking profile hack...
|
echo -n Checking profile hack...
|
||||||
if [[ ! -f /etc/zprofile ]]; then
|
if [[ ! -f /etc/zprofile ]]; then
|
||||||
|
@ -253,7 +242,6 @@ install_linux() {
|
||||||
install_alacritty
|
install_alacritty
|
||||||
install_alacritty_terminfo
|
install_alacritty_terminfo
|
||||||
install_stow_paths
|
install_stow_paths
|
||||||
install_color_default
|
|
||||||
}
|
}
|
||||||
|
|
||||||
install_darwin() {
|
install_darwin() {
|
||||||
|
@ -268,7 +256,6 @@ install_darwin() {
|
||||||
install_darwin_brew_cask_packages
|
install_darwin_brew_cask_packages
|
||||||
install_tmux_terminfo
|
install_tmux_terminfo
|
||||||
install_stow_paths
|
install_stow_paths
|
||||||
install_color_default
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|
Loading…
Reference in a new issue