From 5d465408c58058895df446f4f628132d8e9faa55 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 31 Dec 2024 12:30:36 -0500 Subject: [PATCH] Remove old color swap stuff --- bin/bin/toggle-color-mode | 30 +----------------------------- install.sh | 13 ------------- 2 files changed, 1 insertion(+), 42 deletions(-) diff --git a/bin/bin/toggle-color-mode b/bin/bin/toggle-color-mode index 888e4e4..f2aa378 100755 --- a/bin/bin/toggle-color-mode +++ b/bin/bin/toggle-color-mode @@ -1,31 +1,3 @@ #!/bin/bash -color_file=$HOME/.config/$USER/color.yml -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 +osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to not dark mode' diff --git a/install.sh b/install.sh index 9c185fa..fee87e0 100755 --- a/install.sh +++ b/install.sh @@ -190,17 +190,6 @@ install_darwin_brew_cask_packages() { 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() { echo -n Checking profile hack... if [[ ! -f /etc/zprofile ]]; then @@ -253,7 +242,6 @@ install_linux() { install_alacritty install_alacritty_terminfo install_stow_paths - install_color_default } install_darwin() { @@ -268,7 +256,6 @@ install_darwin() { install_darwin_brew_cask_packages install_tmux_terminfo install_stow_paths - install_color_default } main() {