From 82e2195e2e191b9885b32a888f013a945e066ab1 Mon Sep 17 00:00:00 2001 From: adam <56338480+adastx@users.noreply.github.com> Date: Fri, 28 Oct 2022 18:48:56 +0200 Subject: scripts: minor cleanup --- .local/bin/scheme | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.local/bin/scheme b/.local/bin/scheme index 4708316..205d0ca 100755 --- a/.local/bin/scheme +++ b/.local/bin/scheme @@ -13,40 +13,40 @@ main () { set_scheme () { if [[ $1 == "dark" ]]; then - GTK_THEME=$(<$XDG_CONFIG_HOME/scheme/gtk-theme-dark) - QT_THEME=$(<$XDG_CONFIG_HOME/scheme/qt-theme-dark) - TERM_THEME=$(<$XDG_CONFIG_HOME/scheme/term-theme-dark) + GTK_THEME=$(<"$XDG_CONFIG_HOME"/scheme/gtk-theme-dark) + QT_THEME=$(<"$XDG_CONFIG_HOME"/scheme/qt-theme-dark) + TERM_THEME=$(<"$XDG_CONFIG_HOME"/scheme/term-theme-dark) FZF_COLOR=dark PREFER_DARK="true" PREFER_DARK_STR="prefer-dark" else - GTK_THEME=$(<$XDG_CONFIG_HOME/scheme/gtk-theme-light) - QT_THEME=$(<$XDG_CONFIG_HOME/scheme/qt-theme-light) - TERM_THEME=$(<$XDG_CONFIG_HOME/scheme/term-theme-light) + GTK_THEME=$(<"$XDG_CONFIG_HOME"/scheme/gtk-theme-light) + QT_THEME=$(<"$XDG_CONFIG_HOME"/scheme/qt-theme-light) + TERM_THEME=$(<"$XDG_CONFIG_HOME"/scheme/term-theme-light) FZF_COLOR=light PREFER_DARK="false" PREFER_DARK_STR="prefer-light" fi - sed -ir "s|^colors: .*$|colors: $TERM_THEME|" $XDG_CONFIG_HOME/alacritty/alacritty.yml + sed -ir "s|^colors: .*$|colors: $TERM_THEME|" "$XDG_CONFIG_HOME"/alacritty/alacritty.yml sed -ir "s|theme=.*$|theme=$QT_THEME|" \ - $XDG_CONFIG_HOME/Kvantum/kvantum.kvconfig + "$XDG_CONFIG_HOME"/Kvantum/kvantum.kvconfig sed -ir "s|gtk-theme-name=.*$|gtk-theme-name=\"$GTK_THEME\"|" \ - $XDG_CONFIG_HOME/gtk-2.0/gtkrc + "$XDG_CONFIG_HOME"/gtk-2.0/gtkrc sed -ir \ -e "s|gtk-theme-name=.*$|gtk-theme-name=$GTK_THEME|" \ -e "s|gtk-application-prefer-dark-theme=.*$|gtk-application-prefer-dark-theme=$PREFER_DARK|" \ - $XDG_CONFIG_HOME/gtk-3.0/settings.ini \ - $XDG_CONFIG_HOME/gtk-4.0/settings.ini + "$XDG_CONFIG_HOME"/gtk-3.0/settings.ini \ + "$XDG_CONFIG_HOME"/gtk-4.0/settings.ini gsettings set org.gnome.desktop.interface color-scheme $PREFER_DARK_STR - gsettings set org.gnome.desktop.interface gtk-theme $GTK_THEME - gsettings set org.gnome.desktop.wm.preferences theme $GTK_THEME + gsettings set org.gnome.desktop.interface gtk-theme "$GTK_THEME" + gsettings set org.gnome.desktop.wm.preferences theme "$GTK_THEME" - echo -n $FZF_COLOR > $XDG_CONFIG_HOME/scheme/fzf-color + echo -n $FZF_COLOR > "$XDG_CONFIG_HOME"/scheme/fzf-color # todo: # - send nvim clients theme update -- cgit v1.2.3-70-g09d2